Commit e827f656 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '33c827f6'

* commit '33c827f6':
  swscale: Properly scale YUV

Conflicts:
	libswscale/swscale_unscaled.c
	tests/ref/fate/filter-pixdesc-yuv420p10be
	tests/ref/fate/filter-pixdesc-yuv420p10le
	tests/ref/fate/filter-pixdesc-yuv420p9be
	tests/ref/fate/filter-pixdesc-yuv420p9le
	tests/ref/fate/filter-pixdesc-yuva420p10be
	tests/ref/fate/filter-pixdesc-yuva420p10le
	tests/ref/fate/filter-pixdesc-yuva420p9be
	tests/ref/fate/filter-pixdesc-yuva420p9le
	tests/ref/fate/filter-pixfmts-copy
	tests/ref/fate/filter-pixfmts-null
	tests/ref/fate/filter-pixfmts-scale
	tests/ref/fate/filter-pixfmts-vflip

See: abe0b8e9Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 95482092 33c827f6
......@@ -1402,7 +1402,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
int height = (plane == 0 || plane == 3) ? srcSliceH: FF_CEIL_RSHIFT(srcSliceH, c->chrDstVSubSample);
const uint8_t *srcPtr = src[plane];
uint8_t *dstPtr = dst[plane] + dstStride[plane] * y;
int shiftonly= plane==1 || plane==2 || (!c->srcRange && plane==0);
int shiftonly = plane == 1 || plane == 2 || (!c->srcRange && plane == 0);
if (!dst[plane])
continue;
......@@ -1435,10 +1435,10 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
} else if (src_depth == 8) {
for (i = 0; i < height; i++) {
#define COPY816(w)\
if(shiftonly){\
if (shiftonly) {\
for (j = 0; j < length; j++)\
w(&dstPtr2[j], srcPtr[j]<<(dst_depth-8));\
}else{\
} else {\
for (j = 0; j < length; j++)\
w(&dstPtr2[j], (srcPtr[j]<<(dst_depth-8)) |\
(srcPtr[j]>>(2*8-dst_depth)));\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment