diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-14 21:49:01 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-14 22:37:43 +0200 |
commit | 7432bcfe5a36331502c49fe03aefe39b9936247a (patch) | |
tree | 398b1874abbd4bcf7c103738ac4548e830af0a43 /libswscale/output.c | |
parent | 01bf2ad7351fdaa2e21b6bdf963d22d6ffccb920 (diff) | |
parent | 7bf9e3391fa21d90ff283fc03a12287fe73db9e8 (diff) | |
download | ffmpeg-7432bcfe5a36331502c49fe03aefe39b9936247a.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
vsrc_buffer: fix check from 7ae7c41.
libxvid: Reorder functions to avoid forward declarations; make functions static.
libxvid: drop some pointless dead code
wmal: vertical alignment cosmetics
wmal: Warn about missing bitstream splicing feature and ask for sample.
wmal: Skip seekable_frame_in_packet.
wmal: Drop unused variable num_possible_block_size.
avfiltergraph: make the AVFilterInOut alloc/free API public
graphparser: allow specifying sws flags in the graph description.
graphparser: fix the order of connecting unlabeled links.
graphparser: add avfilter_graph_parse2().
vsrc_buffer: allow using a NULL buffer to signal EOF.
swscale: handle last pixel if lines have an odd width.
qdm2: fix a dubious pointer cast
WMAL: Do not try to read rawpcm coefficients if bits is invalid
mov: Fix detecting there is no sync sample.
tiffdec: K&R cosmetics
avf: has_duration does not check the global one
dsputil: fix optimized emu_edge function on Win64.
Conflicts:
doc/APIchanges
libavcodec/libxvid_rc.c
libavcodec/libxvidff.c
libavcodec/tiff.c
libavcodec/wmalosslessdec.c
libavfilter/avfiltergraph.h
libavfilter/graphparser.c
libavfilter/version.h
libavfilter/vsrc_buffer.c
libswscale/output.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/output.c')
-rw-r--r-- | libswscale/output.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libswscale/output.c b/libswscale/output.c index 6b17c922ba..0e5b3f8802 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -469,7 +469,7 @@ yuv2422_X_c_template(SwsContext *c, const int16_t *lumFilter, { int i; - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int j; int Y1 = 1 << 18; int Y2 = 1 << 18; @@ -512,7 +512,7 @@ yuv2422_2_c_template(SwsContext *c, const int16_t *buf[2], int uvalpha1 = 4095 - uvalpha; int i; - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int Y1 = (buf0[i * 2] * yalpha1 + buf1[i * 2] * yalpha) >> 19; int Y2 = (buf0[i * 2 + 1] * yalpha1 + buf1[i * 2 + 1] * yalpha) >> 19; int U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha) >> 19; @@ -539,7 +539,7 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0, int i; if (uvalpha < 2048) { - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int Y1 = (buf0[i * 2 ]+64) >> 7; int Y2 = (buf0[i * 2 + 1]+64) >> 7; int U = (ubuf0[i] +64) >> 7; @@ -561,7 +561,7 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0, } } else { const int16_t *ubuf1 = ubuf[1], *vbuf1 = vbuf[1]; - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int Y1 = (buf0[i * 2 ] + 64) >> 7; int Y2 = (buf0[i * 2 + 1] + 64) >> 7; int U = (ubuf0[i] + ubuf1[i]+128) >> 8; @@ -608,7 +608,7 @@ yuv2rgb48_X_c_template(SwsContext *c, const int16_t *lumFilter, { int i; - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int j; int Y1 = -0x40000000; int Y2 = -0x40000000; @@ -671,7 +671,7 @@ yuv2rgb48_2_c_template(SwsContext *c, const int32_t *buf[2], int uvalpha1 = 4095 - uvalpha; int i; - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int Y1 = (buf0[i * 2] * yalpha1 + buf1[i * 2] * yalpha) >> 14; int Y2 = (buf0[i * 2 + 1] * yalpha1 + buf1[i * 2 + 1] * yalpha) >> 14; int U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha + (-128 << 23)) >> 14; @@ -709,7 +709,7 @@ yuv2rgb48_1_c_template(SwsContext *c, const int32_t *buf0, int i; if (uvalpha < 2048) { - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int Y1 = (buf0[i * 2] ) >> 2; int Y2 = (buf0[i * 2 + 1]) >> 2; int U = (ubuf0[i] + (-128 << 11)) >> 2; @@ -737,7 +737,7 @@ yuv2rgb48_1_c_template(SwsContext *c, const int32_t *buf0, } } else { const int32_t *ubuf1 = ubuf[1], *vbuf1 = vbuf[1]; - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int Y1 = (buf0[i * 2] ) >> 2; int Y2 = (buf0[i * 2 + 1]) >> 2; int U = (ubuf0[i] + ubuf1[i] + (-128 << 12)) >> 3; @@ -952,7 +952,7 @@ yuv2rgb_X_c_template(SwsContext *c, const int16_t *lumFilter, { int i; - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int j, A1, A2; int Y1 = 1 << 18; int Y2 = 1 << 18; @@ -1012,7 +1012,7 @@ yuv2rgb_2_c_template(SwsContext *c, const int16_t *buf[2], int uvalpha1 = 4095 - uvalpha; int i; - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int Y1 = (buf0[i * 2] * yalpha1 + buf1[i * 2] * yalpha) >> 19; int Y2 = (buf0[i * 2 + 1] * yalpha1 + buf1[i * 2 + 1] * yalpha) >> 19; int U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha) >> 19; @@ -1050,7 +1050,7 @@ yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0, int i; if (uvalpha < 2048) { - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int Y1 = (buf0[i * 2 ] + 64) >> 7; int Y2 = (buf0[i * 2 + 1] + 64) >> 7; int U = (ubuf0[i] + 64) >> 7; @@ -1077,7 +1077,7 @@ yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0, } } else { const int16_t *ubuf1 = ubuf[1], *vbuf1 = vbuf[1]; - for (i = 0; i < (dstW >> 1); i++) { + for (i = 0; i < ((dstW + 1) >> 1); i++) { int Y1 = (buf0[i * 2 ] + 64) >> 7; int Y2 = (buf0[i * 2 + 1] + 64) >> 7; int U = (ubuf0[i] + ubuf1[i] + 128) >> 8; |