diff options
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libvpxenc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 7c567a0d1d..b8e8d3a87b 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -1020,6 +1020,16 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, rawimg_alpha->stride[VPX_PLANE_V] = frame->linesize[2]; } timestamp = frame->pts; +#if VPX_IMAGE_ABI_VERSION >= 4 + switch (frame->color_range) { + case AVCOL_RANGE_MPEG: + rawimg->range = VPX_CR_STUDIO_RANGE; + break; + case AVCOL_RANGE_JPEG: + rawimg->range = VPX_CR_FULL_RANGE; + break; + } +#endif if (frame->pict_type == AV_PICTURE_TYPE_I) flags |= VPX_EFLAG_FORCE_KF; } |