From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avcodec/intrax8: Fix assert
Date: Wed, 28 Feb 2024 10:10:54 +0100
Message-ID: <AS8P250MB0744E840CC9DA4EB7A4640428F582@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB07442D20DB9D6D7E2372DA388F5A2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>
Andreas Rheinhardt:
> Commit 900ce6f8c3526f27173057bb955f54f4f4f41246 replaced
> IntraX8Context.ac_vlc by IntraX8Context.ac_vlc_table,
> but forgot to update an av_assert2()*.
> cf7ed01938a4d8b2ccd28f1fadacd79103e54eed then
> replaced this with a check for j_ac_vlc[mode],
> but this makes no sense as j_ac_vlc is of type
> const VLCElem [2][2][8][].
>
> Worse yet, mode can be up to three and then
> j_ac_vlc[mode] is undefined behaviour. This happened
> during the wmv8-x8intra FATE test.
>
> *: Since 84f16bb5e68dc47eca4dc96b3391c58471cd7328
> config.h was no longer auto-included in avassert.h
> and this disabled av_assert1() and av_assert2()
> in files where config.h has not been included before
> the inclusion of avassert.h.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavcodec/intrax8.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
> index b6aacb170a..948391599f 100644
> --- a/libavcodec/intrax8.c
> +++ b/libavcodec/intrax8.c
> @@ -103,7 +103,7 @@ static inline void x8_select_ac_table(IntraX8Context *const w, int mode)
> table_index = get_bits(w->gb, 3);
> // 2 modes use same tables
> w->j_ac_vlc_table[mode] = j_ac_vlc[w->quant < 13][mode >> 1][table_index];
> - av_assert2(j_ac_vlc[mode]);
> + av_assert2(w->j_ac_vlc_table[mode]);
> }
>
> static inline int x8_get_orient_vlc(IntraX8Context *w)
Will apply this patch tomorrow unless there are objections.
- Andreas
_______________________________________________
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:[~2024-02-28 9:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 22:34 Andreas Rheinhardt
2024-02-28 9:10 ` Andreas Rheinhardt [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=AS8P250MB0744E840CC9DA4EB7A4640428F582@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.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