avfilter/vf_zscale: fix mapping of zimg_chroma_location_e to AVChromaLocation

The AVChromaLocation values are one higher than zimg's, not one
lower as the undefined value is set to zero (as opposed to zimg's
-1).
This commit is contained in:
Jan Ekström 2021-10-28 01:10:14 +03:00
parent cd1d09e81b
commit 27c0dd5560
1 changed files with 1 additions and 1 deletions

View File

@ -569,7 +569,7 @@ static void update_output_color_information(ZScaleContext *s, AVFrame *frame)
frame->color_trc = (int)s->dst_format.transfer_characteristics;
if (s->chromal != -1)
frame->chroma_location = (int)s->dst_format.chroma_location - 1;
frame->chroma_location = (int)s->dst_format.chroma_location + 1;
}
static int filter_frame(AVFilterLink *link, AVFrame *in)