Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avcodec/av1dec: export pixel format even if no hardware decoder is present
Date: Thu, 7 Sep 2023 11:30:02 -0300
Message-ID: <810ca3b7-4da6-1791-95e8-214b428ae9a6@gmail.com> (raw)
In-Reply-To: <AS8P250MB0744834A883FA11702A8ADA08FEEA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>

On 9/7/2023 5:06 AM, Andreas Rheinhardt wrote:
> James Almer:
>> And remove the AVOID_PROBING flag, given it's the last av1 decoder to be tested
>> either way.
>> This fixes a regression introduced in 1652f2492f88434010053289d946dab6a57e4d58,
>> where even if forcing the native av1 decoder, if another decoder was present,
>> like libdav1d or libaom-av1, they'd be used for probing and some fate tests
>> would have different results.
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>>   libavcodec/av1dec.c             | 8 ++++----
>>   tests/fate/lavf-container.mak   | 8 ++++----
>>   tests/ref/fate/av1-annexb-demux | 2 +-
>>   tests/ref/lavf-fate/av1.mkv     | 4 ++--
>>   tests/ref/lavf-fate/av1.mp4     | 4 ++--
>>   5 files changed, 13 insertions(+), 13 deletions(-)
>>
>> diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
>> index ec8401f4e0..a1e08185a7 100644
>> --- a/libavcodec/av1dec.c
>> +++ b/libavcodec/av1dec.c
>> @@ -612,6 +612,9 @@ static int get_pixel_format(AVCodecContext *avctx)
>>       if (ret < 0)
>>           return ret;
>>   
>> +    s->pix_fmt = pix_fmt;
>> +    avctx->pix_fmt = ret;
>> +
>>       /**
>>        * check if the HW accel is inited correctly. If not, return un-implemented.
>>        * Since now the av1 decoder doesn't support native decode, if it will be
>> @@ -623,9 +626,6 @@ static int get_pixel_format(AVCodecContext *avctx)
>>           return AVERROR(ENOSYS);
> 
> Is the log message here actually accurate? The get_format callback
> choosing the software pixel format does not mean that the hardware this
> is run on or the lavc binary in use do not support hardware accelerated
> AV1 decoding.

It's not, but that's also unrelated to this patch.

> (How is an API user actually supposed to know that decoding will fail if
> the software pixel format is selected?)

Other than the first returned ENOSYS, nothing. I could make it always 
return ENOSYS, same as before this patch, but anything we do will 
probably be hacky unless we add an actual software implementation.
_______________________________________________
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:[~2023-09-07 14:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07  2:06 James Almer
2023-09-07  8:06 ` Andreas Rheinhardt
2023-09-07 14:30   ` James Almer [this message]
2023-09-07 17:55 ` [FFmpeg-devel] [PATCH v2] " James Almer
2023-09-07 23:41   ` Michael Niedermayer
2023-09-08  0:49     ` [FFmpeg-devel] [PATCH v3] " James Almer
2023-09-08 12:27       ` James Almer

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=810ca3b7-4da6-1791-95e8-214b428ae9a6@gmail.com \
    --to=jamrial@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