On 9/15/2020 1:21 PM, Jan Ekström wrote: > On Tue, Sep 15, 2020 at 5:28 PM Jan Ekström <jee...@gmail.com> wrote: >> >> >> Further looking into this, it seems to come from filtering (?) (diff >> attached) >> >> decoded AVFrame: 128x128, pix_fmt: rgba, range: pc >> while... >> AVFrame to be encoded: 128x128, pix_fmt: bgra, range: tv >> >> Jan > > For the record, the culprit seems to be this piece of logic within > libavfilter/vf_scale.c: > http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavfilter/vf_scale.c;h=58eee967440657798f84383ec6f79e8a05c3ece0;hb=HEAD#l747 > > Only input has range defined, out_full never gets set to nonzero. > Thus, > out->color_range = out_full ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG > leads to AVCOL_RANGE_MPEG.
Would changing that to out->color_range = scale->out_range help, or break things too much? > > Jan > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".