Skip to content

Commit

Permalink
yuv2rgb: Use separate planes
Browse files Browse the repository at this point in the history
Assume a packer manages the rest on a final stage.
  • Loading branch information
lu-zero committed Jun 9, 2017
1 parent 942a850 commit fc9ffe6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions libavscale/kernels/yuv2rgb.c
Expand Up @@ -46,15 +46,14 @@ static void yuv2rgb(void *ctx,
yuvctx->coeffs[e][1] * g +
yuvctx->coeffs[e][2] * b);

// offset for rgb/bgr are already applied
dst[0][3 * i] = av_clip_uint8(yuv[0]);
dst[1][3 * i] = av_clip_uint8(yuv[1]);
dst[2][3 * i] = av_clip_uint8(yuv[2]);
#if 0
dst[0][i] = av_clip_uint8(yuv[0]);
dst[1][i] = av_clip_uint8(yuv[1]);
dst[2][i] = av_clip_uint8(yuv[2]);
#if 0 // separate planes vs single plane?
av_log(ctx, AV_LOG_WARNING,
"0x%02X 0x%02X 0x%02X -> 0x%02X 0x%02X 0x%02X\n",
src[0][i], src[1][i >> 1], src[2][i >> 1],
dst[0][3 * i], dst[0][3 * i + 1], dst[0][3 * i + 2]);
dst[0][i], dst[0][i + 1], dst[0][i + 2]);
#endif
}
src[0] += sstrides[0];
Expand Down

0 comments on commit fc9ffe6

Please sign in to comment.