Revision e40b183d

View differences:

libswscale/Makefile
3 3
NAME = swscale
4 4
FFLIBS = avutil
5 5

  
6
OBJS = rgb2rgb.o swscale.o
6
OBJS = rgb2rgb.o swscale.o swscale_avoption.o
7 7

  
8 8
OBJS-$(ARCH_BFIN)          +=  swscale_bfin.o yuv2rgb_bfin.o
9 9
OBJS-$(CONFIG_GPL)         +=  yuv2rgb.o
libswscale/swscale.c
72 72
#include "rgb2rgb.h"
73 73
#include "libavutil/x86_cpu.h"
74 74
#include "libavutil/bswap.h"
75
#include "libavcodec/opt.h"
76 75

  
77 76
#undef MOVNTQ
78 77
#undef PAVGB
......
232 231
extern const uint8_t dither_8x8_73[8][8];
233 232
extern const uint8_t dither_8x8_220[8][8];
234 233

  
235
static const char * sws_context_to_name(void * ptr) {
236
    return "swscaler";
237
}
238

  
239
#define OFFSET(x) offsetof(SwsContext, x)
240
#define DEFAULT 0
241
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
242

  
243
static const AVOption options[] = {
244
    { "sws_flags", "scaler/cpu flags", OFFSET(flags), FF_OPT_TYPE_FLAGS, DEFAULT, 0, UINT_MAX, VE, "sws_flags" },
245
    { "fast_bilinear", "fast bilinear", 0, FF_OPT_TYPE_CONST, SWS_FAST_BILINEAR, INT_MIN, INT_MAX, VE, "sws_flags" },
246
    { "bilinear", "bilinear", 0, FF_OPT_TYPE_CONST, SWS_BILINEAR, INT_MIN, INT_MAX, VE, "sws_flags" },
247
    { "bicubic", "bicubic", 0, FF_OPT_TYPE_CONST, SWS_BICUBIC, INT_MIN, INT_MAX, VE, "sws_flags" },
248
    { "experimental", "experimental", 0, FF_OPT_TYPE_CONST, SWS_X, INT_MIN, INT_MAX, VE, "sws_flags" },
249
    { "neighbor", "nearest neighbor", 0, FF_OPT_TYPE_CONST, SWS_POINT, INT_MIN, INT_MAX, VE, "sws_flags" },
250
    { "area", "averaging area", 0, FF_OPT_TYPE_CONST, SWS_AREA, INT_MIN, INT_MAX, VE, "sws_flags" },
251
    { "bicublin", "luma bicubic, chroma bilinear", 0, FF_OPT_TYPE_CONST, SWS_BICUBLIN, INT_MIN, INT_MAX, VE, "sws_flags" },
252
    { "gauss", "gaussian", 0, FF_OPT_TYPE_CONST, SWS_GAUSS, INT_MIN, INT_MAX, VE, "sws_flags" },
253
    { "sinc", "sinc", 0, FF_OPT_TYPE_CONST, SWS_SINC, INT_MIN, INT_MAX, VE, "sws_flags" },
254
    { "lanczos", "lanczos", 0, FF_OPT_TYPE_CONST, SWS_LANCZOS, INT_MIN, INT_MAX, VE, "sws_flags" },
255
    { "spline", "natural bicubic spline", 0, FF_OPT_TYPE_CONST, SWS_SPLINE, INT_MIN, INT_MAX, VE, "sws_flags" },
256
    { "print_info", "print info", 0, FF_OPT_TYPE_CONST, SWS_PRINT_INFO, INT_MIN, INT_MAX, VE, "sws_flags" },
257
    { "accurate_rnd", "accurate rounding", 0, FF_OPT_TYPE_CONST, SWS_ACCURATE_RND, INT_MIN, INT_MAX, VE, "sws_flags" },
258
    { "mmx", "MMX SIMD acceleration", 0, FF_OPT_TYPE_CONST, SWS_CPU_CAPS_MMX, INT_MIN, INT_MAX, VE, "sws_flags" },
259
    { "mmx2", "MMX2 SIMD acceleration", 0, FF_OPT_TYPE_CONST, SWS_CPU_CAPS_MMX2, INT_MIN, INT_MAX, VE, "sws_flags" },
260
    { "3dnow", "3DNOW SIMD acceleration", 0, FF_OPT_TYPE_CONST, SWS_CPU_CAPS_3DNOW, INT_MIN, INT_MAX, VE, "sws_flags" },
261
    { "altivec", "AltiVec SIMD acceleration", 0, FF_OPT_TYPE_CONST, SWS_CPU_CAPS_ALTIVEC, INT_MIN, INT_MAX, VE, "sws_flags" },
262
    { "bfin", "Blackfin SIMD acceleration", 0, FF_OPT_TYPE_CONST, SWS_CPU_CAPS_BFIN, INT_MIN, INT_MAX, VE, "sws_flags" },
263
    { "full_chroma_int", "full chroma interpolation", 0 , FF_OPT_TYPE_CONST, SWS_FULL_CHR_H_INT, INT_MIN, INT_MAX, VE, "sws_flags" },
264
    { "full_chroma_inp", "full chroma input", 0 , FF_OPT_TYPE_CONST, SWS_FULL_CHR_H_INP, INT_MIN, INT_MAX, VE, "sws_flags" },
265
    { NULL }
266
};
267

  
268
#undef VE
269
#undef DEFAULT
270

  
271
static const AVClass sws_context_class = { "SWScaler", sws_context_to_name, options };
272

  
273 234
const char *sws_format_name(enum PixelFormat format)
274 235
{
275 236
    switch (format) {
libswscale/swscale_internal.h
278 278
extern const DECLARE_ALIGNED(8, uint64_t, ff_dither4[2]);
279 279
extern const DECLARE_ALIGNED(8, uint64_t, ff_dither8[2]);
280 280

  
281
extern const AVClass sws_context_class;
282

  
281 283
#endif /* FFMPEG_SWSCALE_INTERNAL_H */

Also available in: Unified diff