diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-08 20:54:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-08 21:06:57 +0200 |
commit | ac627b3d38d370027406c93c2dcaac0b1712a7d4 (patch) | |
tree | d2d1f39e96a75d864681349c4fbd37692e558683 /libswscale/utils.c | |
parent | 89715a3cf187c271f7cf4c230b23cd6f6d638e32 (diff) | |
parent | 716d413c13981da15323c7a3821860536eefdbbb (diff) | |
download | ffmpeg-streaming-ac627b3d38d370027406c93c2dcaac0b1712a7d4.zip ffmpeg-streaming-ac627b3d38d370027406c93c2dcaac0b1712a7d4.tar.gz |
Merge commit '716d413c13981da15323c7a3821860536eefdbbb'
* commit '716d413c13981da15323c7a3821860536eefdbbb':
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Conflicts:
doc/examples/muxing.c
ffmpeg.h
ffmpeg_filter.c
ffmpeg_opt.c
ffplay.c
ffprobe.c
libavcodec/8bps.c
libavcodec/aasc.c
libavcodec/aura.c
libavcodec/avcodec.h
libavcodec/avs.c
libavcodec/bfi.c
libavcodec/bmp.c
libavcodec/bmpenc.c
libavcodec/c93.c
libavcodec/cscd.c
libavcodec/cyuv.c
libavcodec/dpx.c
libavcodec/dpxenc.c
libavcodec/eatgv.c
libavcodec/escape124.c
libavcodec/ffv1.c
libavcodec/flashsv.c
libavcodec/fraps.c
libavcodec/h264.c
libavcodec/huffyuv.c
libavcodec/iff.c
libavcodec/imgconvert.c
libavcodec/indeo3.c
libavcodec/kmvc.c
libavcodec/libopenjpegdec.c
libavcodec/libopenjpegenc.c
libavcodec/libx264.c
libavcodec/ljpegenc.c
libavcodec/mjpegdec.c
libavcodec/mjpegenc.c
libavcodec/motionpixels.c
libavcodec/mpeg12.c
libavcodec/mpeg12enc.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo_enc.c
libavcodec/pamenc.c
libavcodec/pcxenc.c
libavcodec/pgssubdec.c
libavcodec/pngdec.c
libavcodec/pngenc.c
libavcodec/pnm.c
libavcodec/pnmdec.c
libavcodec/pnmenc.c
libavcodec/ptx.c
libavcodec/qdrw.c
libavcodec/qpeg.c
libavcodec/qtrleenc.c
libavcodec/raw.c
libavcodec/rawdec.c
libavcodec/rl2.c
libavcodec/sgidec.c
libavcodec/sgienc.c
libavcodec/snowdec.c
libavcodec/snowenc.c
libavcodec/sunrast.c
libavcodec/targa.c
libavcodec/targaenc.c
libavcodec/tiff.c
libavcodec/tiffenc.c
libavcodec/tmv.c
libavcodec/truemotion2.c
libavcodec/utils.c
libavcodec/vb.c
libavcodec/vp3.c
libavcodec/wnv1.c
libavcodec/xl.c
libavcodec/xwddec.c
libavcodec/xwdenc.c
libavcodec/yop.c
libavdevice/v4l2.c
libavdevice/x11grab.c
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/buffersrc.c
libavfilter/drawutils.c
libavfilter/formats.c
libavfilter/src_movie.c
libavfilter/vf_ass.c
libavfilter/vf_drawtext.c
libavfilter/vf_fade.c
libavfilter/vf_format.c
libavfilter/vf_hflip.c
libavfilter/vf_lut.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
libavfilter/vf_scale.c
libavfilter/vf_transpose.c
libavfilter/vf_yadif.c
libavfilter/video.c
libavfilter/vsrc_testsrc.c
libavformat/movenc.c
libavformat/mxf.h
libavformat/utils.c
libavformat/yuv4mpeg.c
libavutil/imgutils.c
libavutil/pixdesc.c
libswscale/input.c
libswscale/output.c
libswscale/swscale_internal.h
libswscale/swscale_unscaled.c
libswscale/utils.c
libswscale/x86/swscale_template.c
libswscale/x86/yuv2rgb.c
libswscale/x86/yuv2rgb_template.c
libswscale/yuv2rgb.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r-- | libswscale/utils.c | 284 |
1 files changed, 142 insertions, 142 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 4b14c73..9c839d8 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -75,127 +75,127 @@ typedef struct FormatEntry { int is_supported_in, is_supported_out; } FormatEntry; -static const FormatEntry format_entries[PIX_FMT_NB] = { - [PIX_FMT_YUV420P] = { 1, 1 }, - [PIX_FMT_YUYV422] = { 1, 1 }, - [PIX_FMT_RGB24] = { 1, 1 }, - [PIX_FMT_BGR24] = { 1, 1 }, - [PIX_FMT_YUV422P] = { 1, 1 }, - [PIX_FMT_YUV444P] = { 1, 1 }, - [PIX_FMT_YUV410P] = { 1, 1 }, - [PIX_FMT_YUV411P] = { 1, 1 }, - [PIX_FMT_GRAY8] = { 1, 1 }, - [PIX_FMT_MONOWHITE] = { 1, 1 }, - [PIX_FMT_MONOBLACK] = { 1, 1 }, - [PIX_FMT_PAL8] = { 1, 0 }, - [PIX_FMT_YUVJ420P] = { 1, 1 }, - [PIX_FMT_YUVJ422P] = { 1, 1 }, - [PIX_FMT_YUVJ444P] = { 1, 1 }, - [PIX_FMT_UYVY422] = { 1, 1 }, - [PIX_FMT_UYYVYY411] = { 0, 0 }, - [PIX_FMT_BGR8] = { 1, 1 }, - [PIX_FMT_BGR4] = { 0, 1 }, - [PIX_FMT_BGR4_BYTE] = { 1, 1 }, - [PIX_FMT_RGB8] = { 1, 1 }, - [PIX_FMT_RGB4] = { 0, 1 }, - [PIX_FMT_RGB4_BYTE] = { 1, 1 }, - [PIX_FMT_NV12] = { 1, 1 }, - [PIX_FMT_NV21] = { 1, 1 }, - [PIX_FMT_ARGB] = { 1, 1 }, - [PIX_FMT_RGBA] = { 1, 1 }, - [PIX_FMT_ABGR] = { 1, 1 }, - [PIX_FMT_BGRA] = { 1, 1 }, - [PIX_FMT_0RGB] = { 1, 1 }, - [PIX_FMT_RGB0] = { 1, 1 }, - [PIX_FMT_0BGR] = { 1, 1 }, - [PIX_FMT_BGR0] = { 1, 1 }, - [PIX_FMT_GRAY16BE] = { 1, 1 }, - [PIX_FMT_GRAY16LE] = { 1, 1 }, - [PIX_FMT_YUV440P] = { 1, 1 }, - [PIX_FMT_YUVJ440P] = { 1, 1 }, - [PIX_FMT_YUVA420P] = { 1, 1 }, - [PIX_FMT_YUVA422P] = { 1, 1 }, - [PIX_FMT_YUVA444P] = { 1, 1 }, - [PIX_FMT_RGB48BE] = { 1, 1 }, - [PIX_FMT_RGB48LE] = { 1, 1 }, - [PIX_FMT_RGBA64BE] = { 1, 0 }, - [PIX_FMT_RGBA64LE] = { 1, 0 }, - [PIX_FMT_RGB565BE] = { 1, 1 }, - [PIX_FMT_RGB565LE] = { 1, 1 }, - [PIX_FMT_RGB555BE] = { 1, 1 }, - [PIX_FMT_RGB555LE] = { 1, 1 }, - [PIX_FMT_BGR565BE] = { 1, 1 }, - [PIX_FMT_BGR565LE] = { 1, 1 }, - [PIX_FMT_BGR555BE] = { 1, 1 }, - [PIX_FMT_BGR555LE] = { 1, 1 }, - [PIX_FMT_YUV420P16LE] = { 1, 1 }, - [PIX_FMT_YUV420P16BE] = { 1, 1 }, - [PIX_FMT_YUV422P16LE] = { 1, 1 }, - [PIX_FMT_YUV422P16BE] = { 1, 1 }, - [PIX_FMT_YUV444P16LE] = { 1, 1 }, - [PIX_FMT_YUV444P16BE] = { 1, 1 }, - [PIX_FMT_RGB444LE] = { 1, 1 }, - [PIX_FMT_RGB444BE] = { 1, 1 }, - [PIX_FMT_BGR444LE] = { 1, 1 }, - [PIX_FMT_BGR444BE] = { 1, 1 }, - [PIX_FMT_Y400A] = { 1, 0 }, - [PIX_FMT_BGR48BE] = { 1, 1 }, - [PIX_FMT_BGR48LE] = { 1, 1 }, - [PIX_FMT_BGRA64BE] = { 0, 0 }, - [PIX_FMT_BGRA64LE] = { 0, 0 }, - [PIX_FMT_YUV420P9BE] = { 1, 1 }, - [PIX_FMT_YUV420P9LE] = { 1, 1 }, - [PIX_FMT_YUV420P10BE] = { 1, 1 }, - [PIX_FMT_YUV420P10LE] = { 1, 1 }, - [PIX_FMT_YUV420P12BE] = { 1, 1 }, - [PIX_FMT_YUV420P12LE] = { 1, 1 }, - [PIX_FMT_YUV420P14BE] = { 1, 1 }, - [PIX_FMT_YUV420P14LE] = { 1, 1 }, - [PIX_FMT_YUV422P9BE] = { 1, 1 }, - [PIX_FMT_YUV422P9LE] = { 1, 1 }, - [PIX_FMT_YUV422P10BE] = { 1, 1 }, - [PIX_FMT_YUV422P10LE] = { 1, 1 }, - [PIX_FMT_YUV422P12BE] = { 1, 1 }, - [PIX_FMT_YUV422P12LE] = { 1, 1 }, - [PIX_FMT_YUV422P14BE] = { 1, 1 }, - [PIX_FMT_YUV422P14LE] = { 1, 1 }, - [PIX_FMT_YUV444P9BE] = { 1, 1 }, - [PIX_FMT_YUV444P9LE] = { 1, 1 }, - [PIX_FMT_YUV444P10BE] = { 1, 1 }, - [PIX_FMT_YUV444P10LE] = { 1, 1 }, - [PIX_FMT_YUV444P12BE] = { 1, 1 }, - [PIX_FMT_YUV444P12LE] = { 1, 1 }, - [PIX_FMT_YUV444P14BE] = { 1, 1 }, - [PIX_FMT_YUV444P14LE] = { 1, 1 }, - [PIX_FMT_GBRP] = { 1, 0 }, - [PIX_FMT_GBRP9LE] = { 1, 0 }, - [PIX_FMT_GBRP9BE] = { 1, 0 }, - [PIX_FMT_GBRP10LE] = { 1, 0 }, - [PIX_FMT_GBRP10BE] = { 1, 0 }, - [PIX_FMT_GBRP12LE] = { 1, 0 }, - [PIX_FMT_GBRP12BE] = { 1, 0 }, - [PIX_FMT_GBRP14LE] = { 1, 0 }, - [PIX_FMT_GBRP14BE] = { 1, 0 }, - [PIX_FMT_GBRP16LE] = { 1, 0 }, - [PIX_FMT_GBRP16BE] = { 1, 0 }, +static const FormatEntry format_entries[AV_PIX_FMT_NB] = { + [AV_PIX_FMT_YUV420P] = { 1, 1 }, + [AV_PIX_FMT_YUYV422] = { 1, 1 }, + [AV_PIX_FMT_RGB24] = { 1, 1 }, + [AV_PIX_FMT_BGR24] = { 1, 1 }, + [AV_PIX_FMT_YUV422P] = { 1, 1 }, + [AV_PIX_FMT_YUV444P] = { 1, 1 }, + [AV_PIX_FMT_YUV410P] = { 1, 1 }, + [AV_PIX_FMT_YUV411P] = { 1, 1 }, + [AV_PIX_FMT_GRAY8] = { 1, 1 }, + [AV_PIX_FMT_MONOWHITE] = { 1, 1 }, + [AV_PIX_FMT_MONOBLACK] = { 1, 1 }, + [AV_PIX_FMT_PAL8] = { 1, 0 }, + [AV_PIX_FMT_YUVJ420P] = { 1, 1 }, + [AV_PIX_FMT_YUVJ422P] = { 1, 1 }, + [AV_PIX_FMT_YUVJ444P] = { 1, 1 }, + [AV_PIX_FMT_UYVY422] = { 1, 1 }, + [AV_PIX_FMT_UYYVYY411] = { 0, 0 }, + [AV_PIX_FMT_BGR8] = { 1, 1 }, + [AV_PIX_FMT_BGR4] = { 0, 1 }, + [AV_PIX_FMT_BGR4_BYTE] = { 1, 1 }, + [AV_PIX_FMT_RGB8] = { 1, 1 }, + [AV_PIX_FMT_RGB4] = { 0, 1 }, + [AV_PIX_FMT_RGB4_BYTE] = { 1, 1 }, + [AV_PIX_FMT_NV12] = { 1, 1 }, + [AV_PIX_FMT_NV21] = { 1, 1 }, + [AV_PIX_FMT_ARGB] = { 1, 1 }, + [AV_PIX_FMT_RGBA] = { 1, 1 }, + [AV_PIX_FMT_ABGR] = { 1, 1 }, + [AV_PIX_FMT_BGRA] = { 1, 1 }, + [AV_PIX_FMT_0RGB] = { 1, 1 }, + [AV_PIX_FMT_RGB0] = { 1, 1 }, + [AV_PIX_FMT_0BGR] = { 1, 1 }, + [AV_PIX_FMT_BGR0] = { 1, 1 }, + [AV_PIX_FMT_GRAY16BE] = { 1, 1 }, + [AV_PIX_FMT_GRAY16LE] = { 1, 1 }, + [AV_PIX_FMT_YUV440P] = { 1, 1 }, + [AV_PIX_FMT_YUVJ440P] = { 1, 1 }, + [AV_PIX_FMT_YUVA420P] = { 1, 1 }, + [AV_PIX_FMT_YUVA422P] = { 1, 1 }, + [AV_PIX_FMT_YUVA444P] = { 1, 1 }, + [AV_PIX_FMT_RGB48BE] = { 1, 1 }, + [AV_PIX_FMT_RGB48LE] = { 1, 1 }, + [AV_PIX_FMT_RGBA64BE] = { 1, 0 }, + [AV_PIX_FMT_RGBA64LE] = { 1, 0 }, + [AV_PIX_FMT_RGB565BE] = { 1, 1 }, + [AV_PIX_FMT_RGB565LE] = { 1, 1 }, + [AV_PIX_FMT_RGB555BE] = { 1, 1 }, + [AV_PIX_FMT_RGB555LE] = { 1, 1 }, + [AV_PIX_FMT_BGR565BE] = { 1, 1 }, + [AV_PIX_FMT_BGR565LE] = { 1, 1 }, + [AV_PIX_FMT_BGR555BE] = { 1, 1 }, + [AV_PIX_FMT_BGR555LE] = { 1, 1 }, + [AV_PIX_FMT_YUV420P16LE] = { 1, 1 }, + [AV_PIX_FMT_YUV420P16BE] = { 1, 1 }, + [AV_PIX_FMT_YUV422P16LE] = { 1, 1 }, + [AV_PIX_FMT_YUV422P16BE] = { 1, 1 }, + [AV_PIX_FMT_YUV444P16LE] = { 1, 1 }, + [AV_PIX_FMT_YUV444P16BE] = { 1, 1 }, + [AV_PIX_FMT_RGB444LE] = { 1, 1 }, + [AV_PIX_FMT_RGB444BE] = { 1, 1 }, + [AV_PIX_FMT_BGR444LE] = { 1, 1 }, + [AV_PIX_FMT_BGR444BE] = { 1, 1 }, + [AV_PIX_FMT_Y400A] = { 1, 0 }, + [AV_PIX_FMT_BGR48BE] = { 1, 1 }, + [AV_PIX_FMT_BGR48LE] = { 1, 1 }, + [AV_PIX_FMT_BGRA64BE] = { 0, 0 }, + [AV_PIX_FMT_BGRA64LE] = { 0, 0 }, + [AV_PIX_FMT_YUV420P9BE] = { 1, 1 }, + [AV_PIX_FMT_YUV420P9LE] = { 1, 1 }, + [AV_PIX_FMT_YUV420P10BE] = { 1, 1 }, + [AV_PIX_FMT_YUV420P10LE] = { 1, 1 }, + [AV_PIX_FMT_YUV420P12BE] = { 1, 1 }, + [AV_PIX_FMT_YUV420P12LE] = { 1, 1 }, + [AV_PIX_FMT_YUV420P14BE] = { 1, 1 }, + [AV_PIX_FMT_YUV420P14LE] = { 1, 1 }, + [AV_PIX_FMT_YUV422P9BE] = { 1, 1 }, + [AV_PIX_FMT_YUV422P9LE] = { 1, 1 }, + [AV_PIX_FMT_YUV422P10BE] = { 1, 1 }, + [AV_PIX_FMT_YUV422P10LE] = { 1, 1 }, + [AV_PIX_FMT_YUV422P12BE] = { 1, 1 }, + [AV_PIX_FMT_YUV422P12LE] = { 1, 1 }, + [AV_PIX_FMT_YUV422P14BE] = { 1, 1 }, + [AV_PIX_FMT_YUV422P14LE] = { 1, 1 }, + [AV_PIX_FMT_YUV444P9BE] = { 1, 1 }, + [AV_PIX_FMT_YUV444P9LE] = { 1, 1 }, + [AV_PIX_FMT_YUV444P10BE] = { 1, 1 }, + [AV_PIX_FMT_YUV444P10LE] = { 1, 1 }, + [AV_PIX_FMT_YUV444P12BE] = { 1, 1 }, + [AV_PIX_FMT_YUV444P12LE] = { 1, 1 }, + [AV_PIX_FMT_YUV444P14BE] = { 1, 1 }, + [AV_PIX_FMT_YUV444P14LE] = { 1, 1 }, + [AV_PIX_FMT_GBRP] = { 1, 0 }, + [AV_PIX_FMT_GBRP9LE] = { 1, 0 }, + [AV_PIX_FMT_GBRP9BE] = { 1, 0 }, + [AV_PIX_FMT_GBRP10LE] = { 1, 0 }, + [AV_PIX_FMT_GBRP10BE] = { 1, 0 }, + [AV_PIX_FMT_GBRP12LE] = { 1, 0 }, + [AV_PIX_FMT_GBRP12BE] = { 1, 0 }, + [AV_PIX_FMT_GBRP14LE] = { 1, 0 }, + [AV_PIX_FMT_GBRP14BE] = { 1, 0 }, + [AV_PIX_FMT_GBRP16LE] = { 1, 0 }, + [AV_PIX_FMT_GBRP16BE] = { 1, 0 }, }; -int sws_isSupportedInput(enum PixelFormat pix_fmt) +int sws_isSupportedInput(enum AVPixelFormat pix_fmt) { - return (unsigned)pix_fmt < PIX_FMT_NB ? + return (unsigned)pix_fmt < AV_PIX_FMT_NB ? format_entries[pix_fmt].is_supported_in : 0; } -int sws_isSupportedOutput(enum PixelFormat pix_fmt) +int sws_isSupportedOutput(enum AVPixelFormat pix_fmt) { - return (unsigned)pix_fmt < PIX_FMT_NB ? + return (unsigned)pix_fmt < AV_PIX_FMT_NB ? format_entries[pix_fmt].is_supported_out : 0; } extern const int32_t ff_yuv2rgb_coeffs[8][4]; #if FF_API_SWS_FORMAT_NAME -const char *sws_format_name(enum PixelFormat format) +const char *sws_format_name(enum AVPixelFormat format) { return av_get_pix_fmt_name(format); } @@ -765,7 +765,7 @@ static int initMMX2HScaler(int dstW, int xInc, uint8_t *filterCode, } #endif /* HAVE_MMXEXT_INLINE */ -static void getSubSampleFactors(int *h, int *v, enum PixelFormat format) +static void getSubSampleFactors(int *h, int *v, enum AVPixelFormat format) { *h = av_pix_fmt_descriptors[format].log2_chroma_w; *v = av_pix_fmt_descriptors[format].log2_chroma_h; @@ -817,33 +817,33 @@ int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, return 0; } -static int handle_jpeg(enum PixelFormat *format) +static int handle_jpeg(enum AVPixelFormat *format) { switch (*format) { - case PIX_FMT_YUVJ420P: - *format = PIX_FMT_YUV420P; + case AV_PIX_FMT_YUVJ420P: + *format = AV_PIX_FMT_YUV420P; return 1; - case PIX_FMT_YUVJ422P: - *format = PIX_FMT_YUV422P; + case AV_PIX_FMT_YUVJ422P: + *format = AV_PIX_FMT_YUV422P; return 1; - case PIX_FMT_YUVJ444P: - *format = PIX_FMT_YUV444P; + case AV_PIX_FMT_YUVJ444P: + *format = AV_PIX_FMT_YUV444P; return 1; - case PIX_FMT_YUVJ440P: - *format = PIX_FMT_YUV440P; + case AV_PIX_FMT_YUVJ440P: + *format = AV_PIX_FMT_YUV440P; return 1; default: return 0; } } -static int handle_0alpha(enum PixelFormat *format) +static int handle_0alpha(enum AVPixelFormat *format) { switch (*format) { - case PIX_FMT_0BGR : *format = PIX_FMT_ABGR ; return 1; - case PIX_FMT_BGR0 : *format = PIX_FMT_BGRA ; return 4; - case PIX_FMT_0RGB : *format = PIX_FMT_ARGB ; return 1; - case PIX_FMT_RGB0 : *format = PIX_FMT_RGBA ; return 4; + case AV_PIX_FMT_0BGR : *format = AV_PIX_FMT_ABGR ; return 1; + case AV_PIX_FMT_BGR0 : *format = AV_PIX_FMT_BGRA ; return 4; + case AV_PIX_FMT_0RGB : *format = AV_PIX_FMT_ARGB ; return 1; + case AV_PIX_FMT_RGB0 : *format = AV_PIX_FMT_RGBA ; return 4; default: return 0; } } @@ -871,8 +871,8 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, int dstH = c->dstH; int dst_stride = FFALIGN(dstW * sizeof(int16_t) + 66, 16); int flags, cpu_flags; - enum PixelFormat srcFormat = c->srcFormat; - enum PixelFormat dstFormat = c->dstFormat; + enum AVPixelFormat srcFormat = c->srcFormat; + enum AVPixelFormat dstFormat = c->dstFormat; cpu_flags = av_get_cpu_flags(); flags = c->flags; @@ -963,12 +963,12 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, * chroma interpolation */ if (flags & SWS_FULL_CHR_H_INT && isAnyRGB(dstFormat) && - dstFormat != PIX_FMT_RGBA && - dstFormat != PIX_FMT_ARGB && - dstFormat != PIX_FMT_BGRA && - dstFormat != PIX_FMT_ABGR && - dstFormat != PIX_FMT_RGB24 && - dstFormat != PIX_FMT_BGR24) { + dstFormat != AV_PIX_FMT_RGBA && + dstFormat != AV_PIX_FMT_ARGB && + dstFormat != AV_PIX_FMT_BGRA && + dstFormat != AV_PIX_FMT_ABGR && + dstFormat != AV_PIX_FMT_RGB24 && + dstFormat != AV_PIX_FMT_BGR24) { av_log(c, AV_LOG_WARNING, "full chroma interpolation for destination format '%s' not yet implemented\n", av_get_pix_fmt_name(dstFormat)); @@ -986,9 +986,9 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, /* drop every other pixel for chroma calculation unless user * wants full chroma */ if (isAnyRGB(srcFormat) && !(flags & SWS_FULL_CHR_H_INP) && - srcFormat != PIX_FMT_RGB8 && srcFormat != PIX_FMT_BGR8 && - srcFormat != PIX_FMT_RGB4 && srcFormat != PIX_FMT_BGR4 && - srcFormat != PIX_FMT_RGB4_BYTE && srcFormat != PIX_FMT_BGR4_BYTE && + srcFormat != AV_PIX_FMT_RGB8 && srcFormat != AV_PIX_FMT_BGR8 && + srcFormat != AV_PIX_FMT_RGB4 && srcFormat != AV_PIX_FMT_BGR4 && + srcFormat != AV_PIX_FMT_RGB4_BYTE && srcFormat != AV_PIX_FMT_BGR4_BYTE && ((dstW >> c->chrDstHSubSample) <= (srcW >> 1) || (flags & SWS_FAST_BILINEAR))) c->chrSrcHSubSample = 1; @@ -1021,7 +1021,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, c->dstBpc = 1 + av_pix_fmt_descriptors[dstFormat].comp[0].depth_minus1; if (c->dstBpc < 8) c->dstBpc = 8; - if (isAnyRGB(srcFormat) || srcFormat == PIX_FMT_PAL8) + if (isAnyRGB(srcFormat) || srcFormat == AV_PIX_FMT_PAL8) c->srcBpc = 16; if (c->dstBpc == 16) dst_stride <<= 1; @@ -1264,9 +1264,9 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, av_log(c, AV_LOG_INFO, "from %s to %s%s ", av_get_pix_fmt_name(srcFormat), #ifdef DITHER1XBPP - dstFormat == PIX_FMT_BGR555 || dstFormat == PIX_FMT_BGR565 || - dstFormat == PIX_FMT_RGB444BE || dstFormat == PIX_FMT_RGB444LE || - dstFormat == PIX_FMT_BGR444BE || dstFormat == PIX_FMT_BGR444LE ? + dstFormat == AV_PIX_FMT_BGR555 || dstFormat == AV_PIX_FMT_BGR565 || + dstFormat == AV_PIX_FMT_RGB444BE || dstFormat == AV_PIX_FMT_RGB444LE || + dstFormat == AV_PIX_FMT_BGR444BE || dstFormat == AV_PIX_FMT_BGR444LE ? "dithered " : "", #else "", @@ -1301,8 +1301,8 @@ fail: // FIXME replace things by appropriate error codes } #if FF_API_SWS_GETCONTEXT -SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, - int dstW, int dstH, enum PixelFormat dstFormat, +SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat, + int dstW, int dstH, enum AVPixelFormat dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, const double *param) { @@ -1714,9 +1714,9 @@ void sws_freeContext(SwsContext *c) } struct SwsContext *sws_getCachedContext(struct SwsContext *context, int srcW, - int srcH, enum PixelFormat srcFormat, + int srcH, enum AVPixelFormat srcFormat, int dstW, int dstH, - enum PixelFormat dstFormat, int flags, + enum AVPixelFormat dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, const double *param) |