[FFmpeg-devel] [PATCH] v3: lavu/pixdesc: favour formats where depth and subsampling exactly match
Philip Langdale
philipl at overt.org
Sat Sep 17 04:45:06 EEST 2022
On Thu, 15 Sep 2022 23:25:54 +0200
Michael Niedermayer <michael at niedermayer.cc> wrote:
> > +
> > + if (dst_desc->log2_chroma_h < src_desc->log2_chroma_h) {
> > + loss |= FF_LOSS_EXCESS_RESOLUTION;
> > + score -= 32 << (src_desc->log2_chroma_h -
> > dst_desc->log2_chroma_h);
> > + }
>
> with 16bit 4:2:0
> to
> 14bit 4:2:0
> vs.
> 16bit 4:4:4
>
> more data is preserved in the later but the 420->444 would have a
> loss of 64 i think and 16->14 i think 8. I didnt try this just
> reading the code so i may be missing something but i think the code
> would favor the lower bitdepth That may be unexpected
Yep. Another edge case :-)
I've posted a v4 that adjusts the excess resolution penalty to avoid
this.
Maybe I've got it right this time.
Thanks,
--phil
More information about the ffmpeg-devel
mailing list