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).
pull/373/head
Jan Ekström 3 years ago
parent cd1d09e81b
commit 27c0dd5560
  1. 2
      libavfilter/vf_zscale.c

@ -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)

Loading…
Cancel
Save