Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Paul B Mahol <onemda@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] Towards YUVJ removal
Date: Fri, 9 Dec 2022 13:55:17 +0100
Message-ID: <CAPYw7P7z3QwPUYU+MYA1O7bL-oH-tZdaisxobWFVUeEvObT7=Q@mail.gmail.com> (raw)
In-Reply-To: <20221209134526.GB119445@haasn.xyz>

On 12/9/22, Niklas Haas <ffmpeg@haasn.xyz> wrote:
> On Fri, 09 Dec 2022 13:10:02 +0100 Andreas Rheinhardt
> <andreas.rheinhardt@outlook.com> wrote:
>> This is incorrect: Here are the pixel formats advertised by the mjpeg
>> encoder:
>>
>>     .p.pix_fmts     = (const enum AVPixelFormat[]) {
>>         AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P,
>>         AV_PIX_FMT_YUV420P,  AV_PIX_FMT_YUV422P,  AV_PIX_FMT_YUV444P,
>>         AV_PIX_FMT_NONE
>>     },
>>
>> ffmpeg only inserts the swscale filters, because said list is overridden
>> in get_compliance_normal_pix_fmts() in fftools/ffmpeg_filter.c. See
>> 059fc2d9da5364627613fb3e6424079e14dbdfd3.
>> Also notice that the encoder errors out if fed with limited range data
>> depending upon strict_std_compliance (see
>> ff_mjpeg_encode_check_pix_fmt()), which is very similar to the first
>> approach below; the override being in fftools implies that the breakage
>> of the first approach would be confined to users of fftools.
>
> Oh, you are right. So that presents an alternative to 4 - rather than an
> encoder flag, we can tie the auto-conversion in fftools to be tied to
> the strict_std_compliance check.
>
> I will try implementing this approach, it may be the best compromise in
> that it presents a clear upgrade path that doesn't break the common
> case.
>
> That said, there still is an encoder that has this problem: "amv".
> Currently, this only advertises YUVJ, but after YUVJ removal, it would
> be treated equivalently to mjpeg when `strict_std_compliance` is enabled.
>
> But given that this is a less common format, I think, such a regression
> would not be as big a concern. (And we can still special-case it in
> fftools, if we want to)

Sounds too much hackish.
_______________________________________________
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".

  reply	other threads:[~2022-12-09 12:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09 11:49 Niklas Haas
2022-12-09 11:59 ` Jean-Baptiste Kempf
2022-12-09 12:10 ` Andreas Rheinhardt
2022-12-09 12:45   ` Niklas Haas
2022-12-09 12:55     ` Paul B Mahol [this message]
2022-12-09 13:48     ` Diederick C. Niehorster
2022-12-09 12:56 ` Hendrik Leppkes
2022-12-09 16:50 ` Michael Niedermayer
2022-12-13 11:23   ` Niklas Haas
2022-12-13 11:58     ` Nicolas George
2023-02-15  9:30 ` Martin Storsjö

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='CAPYw7P7z3QwPUYU+MYA1O7bL-oH-tZdaisxobWFVUeEvObT7=Q@mail.gmail.com' \
    --to=onemda@gmail.com \
    --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