From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 6/9] avcodec/wmavoice: Avoid code table
Date: Sun, 4 Sep 2022 23:58:48 +0200
Message-ID: <AS8P250MB074445A3E7C5E47555F9DEF98F7C9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB07446C8541237B01350DEAB78F7C9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>
These codes are already ordered from left-to-right in the tree,
so one can just use ff_init_vlc_static_from_lengths().
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/wmavoice.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 8fa9db63ee..4438089e51 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -320,18 +320,10 @@ static av_cold void wmavoice_init_static_data(void)
10, 10, 10, 12, 12, 12,
14, 14, 14, 14
};
- static const uint16_t codes[] = {
- 0x0000, 0x0001, 0x0002, // 00/01/10
- 0x000c, 0x000d, 0x000e, // 11+00/01/10
- 0x003c, 0x003d, 0x003e, // 1111+00/01/10
- 0x00fc, 0x00fd, 0x00fe, // 111111+00/01/10
- 0x03fc, 0x03fd, 0x03fe, // 11111111+00/01/10
- 0x0ffc, 0x0ffd, 0x0ffe, // 1111111111+00/01/10
- 0x3ffc, 0x3ffd, 0x3ffe, 0x3fff // 111111111111+xx
- };
- INIT_VLC_STATIC(&frame_type_vlc, VLC_NBITS, sizeof(bits),
- bits, 1, 1, codes, 2, 2, 132);
+ INIT_VLC_STATIC_FROM_LENGTHS(&frame_type_vlc, VLC_NBITS,
+ FF_ARRAY_ELEMS(bits), bits,
+ 1, NULL, 0, 0, 0, 0, 132);
}
static av_cold void wmavoice_flush(AVCodecContext *ctx)
--
2.34.1
_______________________________________________
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:[~2022-09-04 22:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-04 21:54 [FFmpeg-devel] [PATCH 1/9] avcodec/dvdata: Order code table by codes Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 2/9] avcodec/dvdec: Use ff_init_vlc_from_lengths() Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 3/9] avcodec/dv_tablegen, dvdata: Remove ff_dv_vlc_bits Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 4/9] avcodec/dvdec: Mark dv_init_static() as av_cold Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 5/9] avcodec/dvdec: Avoid stack buffers Andreas Rheinhardt
2022-09-04 21:58 ` Andreas Rheinhardt [this message]
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 7/9] avcodec/wmaprodec: Use ff_init_vlc_from_lengths() instead of init_vlc Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 8/9] avcodec/wmaprodec: Move applying offset to VLC creation Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 9/9] avcodec/wmaprodec: Use symbol table more efficiently Andreas Rheinhardt
2022-09-06 1:33 ` [FFmpeg-devel] [PATCH 1/9] avcodec/dvdata: Order code table by codes Andreas Rheinhardt
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=AS8P250MB074445A3E7C5E47555F9DEF98F7C9@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