From: Philip Langdale <philipl@overt.org>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] v3: lavu/pixdesc: favour formats where depth and subsampling exactly match
Date: Fri, 16 Sep 2022 18:45:06 -0700
Message-ID: <20220916184506.4e805fcb@fido7> (raw)
In-Reply-To: <20220915212554.GS2088045@pb2>
On Thu, 15 Sep 2022 23:25:54 +0200
Michael Niedermayer <michael@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
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2022-09-17 1:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 23:20 Philip Langdale
2022-09-15 21:25 ` Michael Niedermayer
2022-09-17 1:45 ` Philip Langdale [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220916184506.4e805fcb@fido7 \
--to=philipl@overt.org \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git