From: Giovanni Mascellani <gmascellani@codeweavers.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Giovanni Mascellani <gmascellani@codeweavers.com>
Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/evc_ps: Interpret a degenerate SAR as 1/1.
Date: Tue, 30 Jul 2024 15:11:49 +0200
Message-ID: <20240730131149.210571-3-gmascellani@codeweavers.com> (raw)
In-Reply-To: <20240730131149.210571-1-gmascellani@codeweavers.com>
The specification doesn't say what should happen in this case.
Other implementations (e.g., Microsoft's Media Foundations) seem
to interpret this as 1/1.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
---
libavcodec/evc_ps.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/evc_ps.c b/libavcodec/evc_ps.c
index 637572d324..6c871e965e 100644
--- a/libavcodec/evc_ps.c
+++ b/libavcodec/evc_ps.c
@@ -87,6 +87,10 @@ static int vui_parameters(GetBitContext *gb, VUIParameters *vui)
if (vui->aspect_ratio_idc == EXTENDED_SAR) {
vui->sar_width = get_bits(gb, 16);
vui->sar_height = get_bits(gb, 16);
+ if (vui->sar_width == 0 || vui->sar_height == 0) {
+ vui->sar_width = 1;
+ vui->sar_height = 1;
+ }
}
}
vui->overscan_info_present_flag = get_bits(gb, 1);
--
2.45.2
_______________________________________________
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".
next prev parent reply other threads:[~2024-07-30 13:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 13:11 [FFmpeg-devel] [PATCH 0/2] " Giovanni Mascellani
2024-07-30 13:11 ` [FFmpeg-devel] [PATCH 1/2] avcodec/h2645_vui: " Giovanni Mascellani
2024-07-30 13:11 ` Giovanni Mascellani [this message]
2024-07-30 20:54 ` [FFmpeg-devel] [PATCH 0/2] " Michael Niedermayer
2024-07-30 21:15 ` James Almer
2024-07-30 21:32 ` Michael Niedermayer
2024-07-31 9:43 ` Giovanni Mascellani
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=20240730131149.210571-3-gmascellani@codeweavers.com \
--to=gmascellani@codeweavers.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