diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-09 02:45:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-09 02:49:16 +0200 |
commit | 5b134a0544ebfd129b087c3a2bb68a8847232322 (patch) | |
tree | 0b0ff566403eb2579fb4276234f2ecb4f1033c5e | |
parent | 3bc86462a2ae1ec03c1a8ada49c70e34a22520e9 (diff) | |
parent | eddf95283fbba1b469b76e7518bc3941f671b193 (diff) | |
download | ffmpeg-5b134a0544ebfd129b087c3a2bb68a8847232322.tar.gz |
Merge commit 'eddf95283fbba1b469b76e7518bc3941f671b193'
* commit 'eddf95283fbba1b469b76e7518bc3941f671b193':
vp9: initialize color space and range properties
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/vp9.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 31725e6f84..76fd37248b 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -3780,6 +3780,18 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame, 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 memset(s->above_partition_ctx, 0, s->cols); memset(s->above_skip_ctx, 0, s->cols); |