Commit 5b134a05 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'eddf9528'

* commit 'eddf9528':
  vp9: initialize color space and range properties
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 3bc86462 eddf9528
...@@ -3780,6 +3780,18 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame, ...@@ -3780,6 +3780,18 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
return res; return res;
} }
if (s->fullrange)
ctx->color_range = AVCOL_RANGE_JPEG;
else
ctx->color_range = AVCOL_RANGE_MPEG;
switch (s->colorspace) {
case 1: ctx->colorspace = AVCOL_SPC_BT470BG; break;
case 2: ctx->colorspace = AVCOL_SPC_BT709; break;
case 3: ctx->colorspace = AVCOL_SPC_SMPTE170M; break;
case 4: ctx->colorspace = AVCOL_SPC_SMPTE240M; break;
}
// main tile decode loop // main tile decode loop
memset(s->above_partition_ctx, 0, s->cols); memset(s->above_partition_ctx, 0, s->cols);
memset(s->above_skip_ctx, 0, s->cols); memset(s->above_skip_ctx, 0, s->cols);
......
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