* [FFmpeg-devel] [PATCH] avcodec/av1dec: don't set aspect ratio when it's not yet known
@ 2023-09-06 14:14 James Almer
2023-09-06 17:07 ` Zhao Zhili
0 siblings, 1 reply; 2+ messages in thread
From: James Almer @ 2023-09-06 14:14 UTC (permalink / raw)
To: ffmpeg-devel
Makes the output of the native decoder consistent with external decoders like
libdav1d with fate-enhanced-flv-av1.
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavcodec/av1dec.c | 1 -
tests/ref/fate/enhanced-flv-av1 | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 03283ab064..ec8401f4e0 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -755,7 +755,6 @@ static int set_context_with_sequence(AVCodecContext *avctx,
if (ret < 0)
return ret;
}
- avctx->sample_aspect_ratio = (AVRational) { 1, 1 };
if (seq->timing_info_present_flag)
avctx->framerate = ff_av1_framerate(1LL + seq->timing_info.num_ticks_per_picture_minus_1,
diff --git a/tests/ref/fate/enhanced-flv-av1 b/tests/ref/fate/enhanced-flv-av1
index b2a624e41e..c50da5d430 100644
--- a/tests/ref/fate/enhanced-flv-av1
+++ b/tests/ref/fate/enhanced-flv-av1
@@ -3,7 +3,7 @@
#media_type 0: video
#codec_id 0: av1
#dimensions 0: 320x176
-#sar 0: 1/1
+#sar 0: 0/1
0, 0, 0, 41, 4718, 0xc4d912ec
0, 42, 42, 41, 5109, 0xc065dd7d, F=0x0
0, 83, 83, 41, 192, 0x160c5335, F=0x0
--
2.42.0
_______________________________________________
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".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/av1dec: don't set aspect ratio when it's not yet known
2023-09-06 14:14 [FFmpeg-devel] [PATCH] avcodec/av1dec: don't set aspect ratio when it's not yet known James Almer
@ 2023-09-06 17:07 ` Zhao Zhili
0 siblings, 0 replies; 2+ messages in thread
From: Zhao Zhili @ 2023-09-06 17:07 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Wed, 2023-09-06 at 11:14 -0300, James Almer wrote:
> Makes the output of the native decoder consistent with external
> decoders like
> libdav1d with fate-enhanced-flv-av1.
>
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
> libavcodec/av1dec.c | 1 -
> tests/ref/fate/enhanced-flv-av1 | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
> index 03283ab064..ec8401f4e0 100644
> --- a/libavcodec/av1dec.c
> +++ b/libavcodec/av1dec.c
> @@ -755,7 +755,6 @@ static int
> set_context_with_sequence(AVCodecContext *avctx,
> if (ret < 0)
> return ret;
> }
> - avctx->sample_aspect_ratio = (AVRational) { 1, 1 };
>
> if (seq->timing_info_present_flag)
> avctx->framerate = ff_av1_framerate(1LL + seq-
> >timing_info.num_ticks_per_picture_minus_1,
> diff --git a/tests/ref/fate/enhanced-flv-av1
> b/tests/ref/fate/enhanced-flv-av1
> index b2a624e41e..c50da5d430 100644
> --- a/tests/ref/fate/enhanced-flv-av1
> +++ b/tests/ref/fate/enhanced-flv-av1
> @@ -3,7 +3,7 @@
> #media_type 0: video
> #codec_id 0: av1
> #dimensions 0: 320x176
> -#sar 0: 1/1
> +#sar 0: 0/1
> 0, 0, 0, 41, 4718, 0xc4d912ec
> 0, 42, 42, 41, 5109, 0xc065dd7d, F=0x0
> 0, 83, 83, 41, 192, 0x160c5335, F=0x0
LGTM. I searched mailbox just before sending the same patch :P
_______________________________________________
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".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-06 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-06 14:14 [FFmpeg-devel] [PATCH] avcodec/av1dec: don't set aspect ratio when it's not yet known James Almer
2023-09-06 17:07 ` Zhao Zhili
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