diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-08 05:28:40 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-08 05:51:45 +0400 |
commit | bf807a5e874442aa3fe1b475459cdd509e34bff4 (patch) | |
tree | f8067bfb5e99b8b8e2716a7ea8519a4aaa8ac60f /libswscale | |
parent | 4cda8aa1c5bc58f8a7f53a21a19b03e7379bbcdc (diff) | |
parent | 6eda85e15b38863a627fd0602098aa3250174698 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
sbrdsp.asm: convert all instructions to float/SSE ones.
dv: cosmetics.
dv: check buffer size before reading profile.
Revert "AAC SBR: group some writes."
udp: Print an error message if bind fails
cook: extend channel uncoupling tables so the full bit range is covered.
roqvideo: cosmetics.
roqvideo: convert to bytestream2 API.
dca: don't use av_clip_uintp2().
wmall: fix build with -DDEBUG enabled.
smc: port to bytestream2 API.
AAC SBR: group some writes.
dsputil: remove shift parameter from scalarproduct_int16
SBR DSP: unroll sum_square
rv34: remove dead code in intra availability check
rv34: clean a bit availability checks.
v4l2: update documentation
tgq: convert to bytestream2 API.
parser: remove forward declaration of MpegEncContext
dca: prevent accessing static arrays with invalid indexes.
...
Conflicts:
doc/indevs.texi
libavcodec/Makefile
libavcodec/dca.c
libavcodec/dvdata.c
libavcodec/eatgq.c
libavcodec/mmvideo.c
libavcodec/roqvideodec.c
libavcodec/smc.c
libswscale/output.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/output.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/libswscale/output.c b/libswscale/output.c index de41f778d2..34ed114207 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -548,6 +548,11 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0, V = av_clip_uint8(V); } + Y1 = av_clip_uint8(Y1); + Y2 = av_clip_uint8(Y2); + U = av_clip_uint8(U); + V = av_clip_uint8(V); + output_pixels(i * 4, Y1, U, Y2, V); } } else { @@ -565,6 +570,11 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0, V = av_clip_uint8(V); } + Y1 = av_clip_uint8(Y1); + Y2 = av_clip_uint8(Y2); + U = av_clip_uint8(U); + V = av_clip_uint8(V); + output_pixels(i * 4, Y1, U, Y2, V); } } @@ -1008,9 +1018,16 @@ yuv2rgb_2_c_template(SwsContext *c, const int16_t *buf[2], *g = (c->table_gU[U + YUVRGB_TABLE_HEADROOM] + c->table_gV[V + YUVRGB_TABLE_HEADROOM]), *b = c->table_bU[U + YUVRGB_TABLE_HEADROOM]; + Y1 = av_clip_uint8(Y1); + Y2 = av_clip_uint8(Y2); + U = av_clip_uint8(U); + V = av_clip_uint8(V); + if (hasAlpha) { A1 = (abuf0[i * 2 ] * yalpha1 + abuf1[i * 2 ] * yalpha) >> 19; A2 = (abuf0[i * 2 + 1] * yalpha1 + abuf1[i * 2 + 1] * yalpha) >> 19; + A1 = av_clip_uint8(A1); + A2 = av_clip_uint8(A2); } yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0, @@ -1039,9 +1056,16 @@ yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0, *g = (c->table_gU[U + YUVRGB_TABLE_HEADROOM] + c->table_gV[V + YUVRGB_TABLE_HEADROOM]), *b = c->table_bU[U + YUVRGB_TABLE_HEADROOM]; + Y1 = av_clip_uint8(Y1); + Y2 = av_clip_uint8(Y2); + U = av_clip_uint8(U); + V = av_clip_uint8(V); + if (hasAlpha) { A1 = abuf0[i * 2 ] * 255 + 16384 >> 15; A2 = abuf0[i * 2 + 1] * 255 + 16384 >> 15; + A1 = av_clip_uint8(A1); + A2 = av_clip_uint8(A2); } yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0, @@ -1059,9 +1083,16 @@ yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0, *g = (c->table_gU[U + YUVRGB_TABLE_HEADROOM] + c->table_gV[V + YUVRGB_TABLE_HEADROOM]), *b = c->table_bU[U + YUVRGB_TABLE_HEADROOM]; + Y1 = av_clip_uint8(Y1); + Y2 = av_clip_uint8(Y2); + U = av_clip_uint8(U); + V = av_clip_uint8(V); + if (hasAlpha) { A1 = (abuf0[i * 2 ] + 64) >> 7; A2 = (abuf0[i * 2 + 1] + 64) >> 7; + A1 = av_clip_uint8(A1); + A2 = av_clip_uint8(A2); } yuv2rgb_write(dest, i, Y1, Y2, hasAlpha ? A1 : 0, hasAlpha ? A2 : 0, |