diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-12 01:25:37 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-12 01:25:37 +0100 |
commit | 7fad19a63dc52db4bf2bebbd9d261675956b1b34 (patch) | |
tree | 8997428f45d54f3177dc6cd208d0375daa6fe201 /libswscale | |
parent | 16abd687798bbf9192ba4954765e61de96065b8b (diff) | |
parent | 599b4c6efddaed33b1667c386b34b07729ba732b (diff) | |
download | ffmpeg-7fad19a63dc52db4bf2bebbd9d261675956b1b34.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
x86: cabac: replace explicit memory references with "m" operands
avplay: don't request a stereo downmix
wmapro: use av_float2int()
lavc: avoid invalid memcpy() in avcodec_default_release_buffer()
lavu: replace int/float punning functions
lavfi: install libavfilter/vsrc_buffer.h
Remove extraneous semicolons
sdp: Restore the original mp4 format h264 extradata if converted
rtpenc: Add support for mp4 format h264
rtpenc: Simplify code by introducing a separate end pointer
movenc: Use the actual converted sample for RTP hinting
Fix a bunch of common typos.
Conflicts:
doc/developer.texi
doc/eval.texi
doc/filters.texi
doc/protocols.texi
ffmpeg.c
ffplay.c
libavcodec/mpegvideo.h
libavcodec/x86/cabac.h
libavfilter/Makefile
libavformat/avformat.h
libavformat/cafdec.c
libavformat/flvdec.c
libavformat/flvenc.c
libavformat/gxfenc.c
libavformat/img2.c
libavformat/movenc.c
libavformat/mpegts.c
libavformat/rtpenc_h264.c
libavformat/utils.c
libavformat/wtv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/rgb2rgb.c | 8 | ||||
-rw-r--r-- | libswscale/swscale.c | 120 | ||||
-rw-r--r-- | libswscale/x86/swscale_mmx.c | 2 |
3 files changed, 65 insertions, 65 deletions
diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c index adb3005753..5b84f89ec5 100644 --- a/libswscale/rgb2rgb.c +++ b/libswscale/rgb2rgb.c @@ -310,8 +310,8 @@ void shuffle_bytes_##a##b##c##d(const uint8_t *src, uint8_t *dst, int src_size) } \ } -DEFINE_SHUFFLE_BYTES(0, 3, 2, 1); -DEFINE_SHUFFLE_BYTES(1, 2, 3, 0); -DEFINE_SHUFFLE_BYTES(3, 0, 1, 2); -DEFINE_SHUFFLE_BYTES(3, 2, 1, 0); +DEFINE_SHUFFLE_BYTES(0, 3, 2, 1) +DEFINE_SHUFFLE_BYTES(1, 2, 3, 0) +DEFINE_SHUFFLE_BYTES(3, 0, 1, 2) +DEFINE_SHUFFLE_BYTES(3, 2, 1, 0) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 6a55e4fe69..ca444b2669 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -396,12 +396,12 @@ static void yuv2planeX_ ## bits ## BE_LE ## _c(const int16_t *filter, int filter filterSize, (const typeX_t **) src, \ (uint16_t *) dest, dstW, is_be, bits); \ } -yuv2NBPS( 9, BE, 1, 10, int16_t); -yuv2NBPS( 9, LE, 0, 10, int16_t); -yuv2NBPS(10, BE, 1, 10, int16_t); -yuv2NBPS(10, LE, 0, 10, int16_t); -yuv2NBPS(16, BE, 1, 16, int32_t); -yuv2NBPS(16, LE, 0, 16, int32_t); +yuv2NBPS( 9, BE, 1, 10, int16_t) +yuv2NBPS( 9, LE, 0, 10, int16_t) +yuv2NBPS(10, BE, 1, 10, int16_t) +yuv2NBPS(10, LE, 0, 10, int16_t) +yuv2NBPS(16, BE, 1, 16, int32_t) +yuv2NBPS(16, LE, 0, 16, int32_t) static void yuv2planeX_8_c(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, @@ -586,8 +586,8 @@ static void name ## ext ## _1_c(SwsContext *c, const int16_t *_buf0, \ dstW, uvalpha, y, fmt); \ } -YUV2PACKED16WRAPPER(yuv2gray16,, LE, PIX_FMT_GRAY16LE); -YUV2PACKED16WRAPPER(yuv2gray16,, BE, PIX_FMT_GRAY16BE); +YUV2PACKED16WRAPPER(yuv2gray16,, LE, PIX_FMT_GRAY16LE) +YUV2PACKED16WRAPPER(yuv2gray16,, BE, PIX_FMT_GRAY16BE) #define output_pixel(pos, acc) \ if (target == PIX_FMT_MONOBLACK) { \ @@ -715,8 +715,8 @@ static void name ## ext ## _1_c(SwsContext *c, const int16_t *buf0, \ y, fmt); \ } -YUV2PACKEDWRAPPER(yuv2mono,, white, PIX_FMT_MONOWHITE); -YUV2PACKEDWRAPPER(yuv2mono,, black, PIX_FMT_MONOBLACK); +YUV2PACKEDWRAPPER(yuv2mono,, white, PIX_FMT_MONOWHITE) +YUV2PACKEDWRAPPER(yuv2mono,, black, PIX_FMT_MONOBLACK) #define output_pixels(pos, Y1, U, Y2, V) \ if (target == PIX_FMT_YUYV422) { \ @@ -827,8 +827,8 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0, #undef output_pixels -YUV2PACKEDWRAPPER(yuv2, 422, yuyv422, PIX_FMT_YUYV422); -YUV2PACKEDWRAPPER(yuv2, 422, uyvy422, PIX_FMT_UYVY422); +YUV2PACKEDWRAPPER(yuv2, 422, yuyv422, PIX_FMT_YUYV422) +YUV2PACKEDWRAPPER(yuv2, 422, uyvy422, PIX_FMT_UYVY422) #define R_B ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? R : B) #define B_R ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? B : R) @@ -1009,10 +1009,10 @@ yuv2rgb48_1_c_template(SwsContext *c, const int32_t *buf0, #undef r_b #undef b_r -YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE); -YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, PIX_FMT_RGB48LE); -YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE); -YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, PIX_FMT_BGR48LE); +YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE) +YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, PIX_FMT_RGB48LE) +YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE) +YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, PIX_FMT_BGR48LE) static av_always_inline void yuv2rgb_write(uint8_t *_dest, int i, int Y1, int Y2, @@ -1310,24 +1310,24 @@ static void name ## ext ## _1_c(SwsContext *c, const int16_t *buf0, \ } #if CONFIG_SMALL -YUV2RGBWRAPPER(yuv2rgb,, 32_1, PIX_FMT_RGB32_1, CONFIG_SWSCALE_ALPHA && c->alpPixBuf); -YUV2RGBWRAPPER(yuv2rgb,, 32, PIX_FMT_RGB32, CONFIG_SWSCALE_ALPHA && c->alpPixBuf); +YUV2RGBWRAPPER(yuv2rgb,, 32_1, PIX_FMT_RGB32_1, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) +YUV2RGBWRAPPER(yuv2rgb,, 32, PIX_FMT_RGB32, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) #else #if CONFIG_SWSCALE_ALPHA -YUV2RGBWRAPPER(yuv2rgb,, a32_1, PIX_FMT_RGB32_1, 1); -YUV2RGBWRAPPER(yuv2rgb,, a32, PIX_FMT_RGB32, 1); +YUV2RGBWRAPPER(yuv2rgb,, a32_1, PIX_FMT_RGB32_1, 1) +YUV2RGBWRAPPER(yuv2rgb,, a32, PIX_FMT_RGB32, 1) #endif -YUV2RGBWRAPPER(yuv2rgb,, x32_1, PIX_FMT_RGB32_1, 0); -YUV2RGBWRAPPER(yuv2rgb,, x32, PIX_FMT_RGB32, 0); +YUV2RGBWRAPPER(yuv2rgb,, x32_1, PIX_FMT_RGB32_1, 0) +YUV2RGBWRAPPER(yuv2rgb,, x32, PIX_FMT_RGB32, 0) #endif -YUV2RGBWRAPPER(yuv2, rgb, rgb24, PIX_FMT_RGB24, 0); -YUV2RGBWRAPPER(yuv2, rgb, bgr24, PIX_FMT_BGR24, 0); -YUV2RGBWRAPPER(yuv2rgb,, 16, PIX_FMT_RGB565, 0); -YUV2RGBWRAPPER(yuv2rgb,, 15, PIX_FMT_RGB555, 0); -YUV2RGBWRAPPER(yuv2rgb,, 12, PIX_FMT_RGB444, 0); -YUV2RGBWRAPPER(yuv2rgb,, 8, PIX_FMT_RGB8, 0); -YUV2RGBWRAPPER(yuv2rgb,, 4, PIX_FMT_RGB4, 0); -YUV2RGBWRAPPER(yuv2rgb,, 4b, PIX_FMT_RGB4_BYTE, 0); +YUV2RGBWRAPPER(yuv2, rgb, rgb24, PIX_FMT_RGB24, 0) +YUV2RGBWRAPPER(yuv2, rgb, bgr24, PIX_FMT_BGR24, 0) +YUV2RGBWRAPPER(yuv2rgb,, 16, PIX_FMT_RGB565, 0) +YUV2RGBWRAPPER(yuv2rgb,, 15, PIX_FMT_RGB555, 0) +YUV2RGBWRAPPER(yuv2rgb,, 12, PIX_FMT_RGB444, 0) +YUV2RGBWRAPPER(yuv2rgb,, 8, PIX_FMT_RGB8, 0) +YUV2RGBWRAPPER(yuv2rgb,, 4, PIX_FMT_RGB4, 0) +YUV2RGBWRAPPER(yuv2rgb,, 4b, PIX_FMT_RGB4_BYTE, 0) static av_always_inline void yuv2rgb_full_X_c_template(SwsContext *c, const int16_t *lumFilter, @@ -1420,24 +1420,24 @@ yuv2rgb_full_X_c_template(SwsContext *c, const int16_t *lumFilter, } #if CONFIG_SMALL -YUV2RGBWRAPPERX(yuv2, rgb_full, bgra32_full, PIX_FMT_BGRA, CONFIG_SWSCALE_ALPHA && c->alpPixBuf); -YUV2RGBWRAPPERX(yuv2, rgb_full, abgr32_full, PIX_FMT_ABGR, CONFIG_SWSCALE_ALPHA && c->alpPixBuf); -YUV2RGBWRAPPERX(yuv2, rgb_full, rgba32_full, PIX_FMT_RGBA, CONFIG_SWSCALE_ALPHA && c->alpPixBuf); -YUV2RGBWRAPPERX(yuv2, rgb_full, argb32_full, PIX_FMT_ARGB, CONFIG_SWSCALE_ALPHA && c->alpPixBuf); +YUV2RGBWRAPPERX(yuv2, rgb_full, bgra32_full, PIX_FMT_BGRA, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) +YUV2RGBWRAPPERX(yuv2, rgb_full, abgr32_full, PIX_FMT_ABGR, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) +YUV2RGBWRAPPERX(yuv2, rgb_full, rgba32_full, PIX_FMT_RGBA, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) +YUV2RGBWRAPPERX(yuv2, rgb_full, argb32_full, PIX_FMT_ARGB, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) #else #if CONFIG_SWSCALE_ALPHA -YUV2RGBWRAPPERX(yuv2, rgb_full, bgra32_full, PIX_FMT_BGRA, 1); -YUV2RGBWRAPPERX(yuv2, rgb_full, abgr32_full, PIX_FMT_ABGR, 1); -YUV2RGBWRAPPERX(yuv2, rgb_full, rgba32_full, PIX_FMT_RGBA, 1); -YUV2RGBWRAPPERX(yuv2, rgb_full, argb32_full, PIX_FMT_ARGB, 1); +YUV2RGBWRAPPERX(yuv2, rgb_full, bgra32_full, PIX_FMT_BGRA, 1) +YUV2RGBWRAPPERX(yuv2, rgb_full, abgr32_full, PIX_FMT_ABGR, 1) +YUV2RGBWRAPPERX(yuv2, rgb_full, rgba32_full, PIX_FMT_RGBA, 1) +YUV2RGBWRAPPERX(yuv2, rgb_full, argb32_full, PIX_FMT_ARGB, 1) #endif -YUV2RGBWRAPPERX(yuv2, rgb_full, bgrx32_full, PIX_FMT_BGRA, 0); -YUV2RGBWRAPPERX(yuv2, rgb_full, xbgr32_full, PIX_FMT_ABGR, 0); -YUV2RGBWRAPPERX(yuv2, rgb_full, rgbx32_full, PIX_FMT_RGBA, 0); -YUV2RGBWRAPPERX(yuv2, rgb_full, xrgb32_full, PIX_FMT_ARGB, 0); +YUV2RGBWRAPPERX(yuv2, rgb_full, bgrx32_full, PIX_FMT_BGRA, 0) +YUV2RGBWRAPPERX(yuv2, rgb_full, xbgr32_full, PIX_FMT_ABGR, 0) +YUV2RGBWRAPPERX(yuv2, rgb_full, rgbx32_full, PIX_FMT_RGBA, 0) +YUV2RGBWRAPPERX(yuv2, rgb_full, xrgb32_full, PIX_FMT_ARGB, 0) #endif -YUV2RGBWRAPPERX(yuv2, rgb_full, bgr24_full, PIX_FMT_BGR24, 0); -YUV2RGBWRAPPERX(yuv2, rgb_full, rgb24_full, PIX_FMT_RGB24, 0); +YUV2RGBWRAPPERX(yuv2, rgb_full, bgr24_full, PIX_FMT_BGR24, 0) +YUV2RGBWRAPPERX(yuv2, rgb_full, rgb24_full, PIX_FMT_RGB24, 0) static av_always_inline void fillPlane(uint8_t* plane, int stride, int width, int height, @@ -1537,10 +1537,10 @@ static void pattern ## 48 ## BE_LE ## ToUV_half_c(uint8_t *_dstU, uint8_t *_dstV rgb48ToUV_half_c_template(dstU, dstV, src1, src2, width, origin); \ } -rgb48funcs(rgb, LE, PIX_FMT_RGB48LE); -rgb48funcs(rgb, BE, PIX_FMT_RGB48BE); -rgb48funcs(bgr, LE, PIX_FMT_BGR48LE); -rgb48funcs(bgr, BE, PIX_FMT_BGR48BE); +rgb48funcs(rgb, LE, PIX_FMT_RGB48LE) +rgb48funcs(rgb, BE, PIX_FMT_RGB48BE) +rgb48funcs(bgr, LE, PIX_FMT_BGR48LE) +rgb48funcs(bgr, BE, PIX_FMT_BGR48BE) #define input_pixel(i) ((origin == PIX_FMT_RGBA || origin == PIX_FMT_BGRA || \ origin == PIX_FMT_ARGB || origin == PIX_FMT_ABGR) ? AV_RN32A(&src[(i)*4]) : \ @@ -1655,18 +1655,18 @@ static void name ## ToUV_half_c(uint8_t *dstU, uint8_t *dstV, \ maskr, maskg, maskb, rsh, gsh, bsh, S); \ } -rgb16_32_wrapper(PIX_FMT_BGR32, bgr32, 16, 0, 0, 0, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_BGR32_1, bgr321, 16, 0, 0, 8, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_RGB32, rgb32, 0, 0, 16, 0, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_RGB32_1, rgb321, 0, 0, 16, 8, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_BGR565LE, bgr16le, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_BGR555LE, bgr15le, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7); -rgb16_32_wrapper(PIX_FMT_RGB565LE, rgb16le, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_RGB555LE, rgb15le, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7); -rgb16_32_wrapper(PIX_FMT_BGR565BE, bgr16be, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_BGR555BE, bgr15be, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7); -rgb16_32_wrapper(PIX_FMT_RGB565BE, rgb16be, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8); -rgb16_32_wrapper(PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7); +rgb16_32_wrapper(PIX_FMT_BGR32, bgr32, 16, 0, 0, 0, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_BGR32_1, bgr321, 16, 0, 0, 8, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_RGB32, rgb32, 0, 0, 16, 0, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_RGB32_1, rgb321, 0, 0, 16, 8, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_BGR565LE, bgr16le, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_BGR555LE, bgr15le, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7) +rgb16_32_wrapper(PIX_FMT_RGB565LE, rgb16le, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_RGB555LE, rgb15le, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7) +rgb16_32_wrapper(PIX_FMT_BGR565BE, bgr16be, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_BGR555BE, bgr15be, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT+7) +rgb16_32_wrapper(PIX_FMT_RGB565BE, rgb16be, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT+8) +rgb16_32_wrapper(PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT+7) static void gbr24pToUV_half_c(uint16_t *dstU, uint16_t *dstV, const uint8_t *gsrc, const uint8_t *bsrc, const uint8_t *rsrc, diff --git a/libswscale/x86/swscale_mmx.c b/libswscale/x86/swscale_mmx.c index 55dc08af55..e46da770ae 100644 --- a/libswscale/x86/swscale_mmx.c +++ b/libswscale/x86/swscale_mmx.c @@ -242,7 +242,7 @@ extern void ff_hscale ## from_bpc ## to ## to_bpc ## _ ## filter_n ## _ ## opt( SwsContext *c, int16_t *data, \ int dstW, const uint8_t *src, \ const int16_t *filter, \ - const int16_t *filterPos, int filterSize); + const int16_t *filterPos, int filterSize) #define SCALE_FUNCS(filter_n, opt) \ SCALE_FUNC(filter_n, 8, 15, opt); \ |