From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH] avcodec/mpeg4data: Move ff_mpeg4_resync_prefix to its only user Date: Tue, 8 Nov 2022 01:00:51 +0100 Message-ID: <AS8P250MB07441F8A94F8CB1298FDE4C78F3F9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) This array is only ever useful to a decoder. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/mpeg4data.h | 4 ---- libavcodec/mpeg4videodata.h | 1 - libavcodec/mpeg4videodec.c | 6 +++++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/libavcodec/mpeg4data.h b/libavcodec/mpeg4data.h index c5a2b14721..d3ba947f43 100644 --- a/libavcodec/mpeg4data.h +++ b/libavcodec/mpeg4data.h @@ -362,10 +362,6 @@ const uint8_t ff_mpeg4_c_dc_scale_table[32]={ 0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,20,21,22,23,24,25 }; -const uint16_t ff_mpeg4_resync_prefix[8]={ - 0x7F00, 0x7E00, 0x7C00, 0x7800, 0x7000, 0x6000, 0x4000, 0x0000 -}; - const uint8_t ff_mpeg4_dc_threshold[8]={ 99, 13, 15, 17, 19, 21, 23, 0 }; diff --git a/libavcodec/mpeg4videodata.h b/libavcodec/mpeg4videodata.h index b20096067a..8aac8a2255 100644 --- a/libavcodec/mpeg4videodata.h +++ b/libavcodec/mpeg4videodata.h @@ -50,7 +50,6 @@ extern const int16_t ff_mpeg4_default_non_intra_matrix[64]; extern const uint8_t ff_mpeg4_y_dc_scale_table[32]; extern const uint8_t ff_mpeg4_c_dc_scale_table[32]; -extern const uint16_t ff_mpeg4_resync_prefix[8]; extern const uint8_t ff_mpeg4_dc_threshold[8]; diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index f91d2753f9..0a100d2064 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -391,7 +391,11 @@ static inline int mpeg4_is_resync(Mpeg4DecContext *ctx) if (v == 0x7F) return s->mb_num; } else { - if (v == ff_mpeg4_resync_prefix[bits_count & 7]) { + static const uint16_t mpeg4_resync_prefix[8] = { + 0x7F00, 0x7E00, 0x7C00, 0x7800, 0x7000, 0x6000, 0x4000, 0x0000 + }; + + if (v == mpeg4_resync_prefix[bits_count & 7]) { int len, mb_num; int mb_num_bits = av_log2(s->mb_num - 1) + 1; GetBitContext gb = s->gb; -- 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".
reply other threads:[~2022-11-08 0:00 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=AS8P250MB07441F8A94F8CB1298FDE4C78F3F9@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