diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-24 00:54:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-24 01:03:07 +0200 |
commit | a7758884db7eb3041b73d673c1ac3897609556b9 (patch) | |
tree | fbf882650e3d0607bd189ae571e402b55179f078 /libswscale | |
parent | f7e797aa5c987c39b55666a2d41877ef2aec40bc (diff) | |
parent | 0c378ea1f76e226eff460c84634e7227e3705372 (diff) | |
download | ffmpeg-a7758884db7eb3041b73d673c1ac3897609556b9.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
rtp: factorize dynamic payload type fallback
flvdec: Ignore the index if it's from a creator known to be different
cmdutils: move grow_array out of #if CONFIG_AVFILTER
avconv: actually set InputFile.rate_emu
ratecontrol: update last_qscale_for sooner
Fix unnecessary shift with 9/10bit vertical scaling
prores: mark prores as intra-only in libavformat/utils.c:is_intra_only()
prores: return more meaningful error values
prores: improve error message wording
prores: cosmetics: prettyprinting, drop useless parentheses
prores: lowercase AVCodec name entry
Conflicts:
cmdutils.c
libavcodec/proresdec_lgpl.c
tests/ref/lavfi/pixfmts_scale
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 2f70d8ca35..e06be55780 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -363,7 +363,7 @@ yuv2yuvX10_c_template(const int16_t *lumFilter, const int16_t **lumSrc, int i; uint16_t *yDest = dest[0], *uDest = dest[1], *vDest = dest[2], *aDest = CONFIG_SWSCALE_ALPHA ? dest[3] : NULL; - int shift = 11 + 16 - output_bits - 1; + int shift = 11 + 16 - output_bits; #define output_pixel(pos, val) \ if (big_endian) { \ @@ -372,24 +372,24 @@ yuv2yuvX10_c_template(const int16_t *lumFilter, const int16_t **lumSrc, AV_WL16(pos, av_clip_uintp2(val >> shift, output_bits)); \ } for (i = 0; i < dstW; i++) { - int val = 1 << (26-output_bits - 1); + int val = 1 << (26-output_bits); int j; for (j = 0; j < lumFilterSize; j++) - val += (lumSrc[j][i] * lumFilter[j]) >> 1; + val += lumSrc[j][i] * lumFilter[j]; output_pixel(&yDest[i], val); } if (uDest) { for (i = 0; i < chrDstW; i++) { - int u = 1 << (26-output_bits - 1); - int v = 1 << (26-output_bits - 1); + int u = 1 << (26-output_bits); + int v = 1 << (26-output_bits); int j; for (j = 0; j < chrFilterSize; j++) { - u += (chrUSrc[j][i] * chrFilter[j]) >> 1; - v += (chrVSrc[j][i] * chrFilter[j]) >> 1; + u += chrUSrc[j][i] * chrFilter[j]; + v += chrVSrc[j][i] * chrFilter[j]; } output_pixel(&uDest[i], u); @@ -399,11 +399,11 @@ yuv2yuvX10_c_template(const int16_t *lumFilter, const int16_t **lumSrc, if (CONFIG_SWSCALE_ALPHA && aDest) { for (i = 0; i < dstW; i++) { - int val = 1 << (26-output_bits - 1); + int val = 1 << (26-output_bits); int j; for (j = 0; j < lumFilterSize; j++) - val += (alpSrc[j][i] * lumFilter[j]) >> 1; + val += alpSrc[j][i] * lumFilter[j]; output_pixel(&aDest[i], val); } |