mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 02:12:28 +00:00
avcodec/av1dec: set chroma_sample_location
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
b7a06885f1
commit
b80c66bb6b
@ -417,6 +417,15 @@ static int set_context_with_sequence(AVCodecContext *avctx,
|
||||
avctx->colorspace = seq->color_config.color_primaries;
|
||||
avctx->color_trc = seq->color_config.transfer_characteristics;
|
||||
|
||||
switch (seq->color_config.chroma_sample_position) {
|
||||
case AV1_CSP_VERTICAL:
|
||||
avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
|
||||
break;
|
||||
case AV1_CSP_COLOCATED:
|
||||
avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;
|
||||
break;
|
||||
}
|
||||
|
||||
if (seq->timing_info.num_units_in_display_tick &&
|
||||
seq->timing_info.time_scale) {
|
||||
av_reduce(&avctx->framerate.den, &avctx->framerate.num,
|
||||
|
Loading…
Reference in New Issue
Block a user