Skip to content
Snippets Groups Projects
Commit 89a03263 authored by Clément Bœsch's avatar Clément Bœsch
Browse files

Merge commit 'b183abfb'


* commit 'b183abfb':
  vpx: Support color range

Decoder chunk not merged as the framework automatically copies avctx
color range to the frame color range. And we already set the avctx field
since cbcc88c0.

Merged-by: default avatarClément Bœsch <cboesch@gopro.com>
parents 1ade4d87 b183abfb
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment