This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 853843d86f550ca73807263a71b613530fb60f45 Author: Andreas Rheinhardt <[email protected]> AuthorDate: Fri Feb 6 13:39:39 2026 +0100 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Fri Feb 6 14:04:50 2026 +0100 avcodec/opus/parse: Move frame_duration tab into a file of its own This is in preparation for duplicating it into libavformat. Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavcodec/opus/Makefile | 2 ++ libavcodec/{bsf/null.c => opus/frame_duration_tab.c} | 20 +++++++++++--------- libavcodec/opus/parse.c | 15 ++------------- libavcodec/opus/tab.h | 2 ++ 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/libavcodec/opus/Makefile b/libavcodec/opus/Makefile index 5a1aef0fd9..c23e684153 100644 --- a/libavcodec/opus/Makefile +++ b/libavcodec/opus/Makefile @@ -8,6 +8,7 @@ OBJS-$(CONFIG_OPUS_DECODER) += \ opus/dec.o \ opus/dec_celt.o \ opus/celt.o \ + opus/frame_duration_tab.o \ opus/pvq.o \ opus/silk.o \ opus/tab.o \ @@ -16,6 +17,7 @@ OBJS-$(CONFIG_OPUS_DECODER) += \ OBJS-$(CONFIG_OPUS_PARSER) += \ + opus/frame_duration_tab.o \ opus/parser.o \ diff --git a/libavcodec/bsf/null.c b/libavcodec/opus/frame_duration_tab.c similarity index 73% copy from libavcodec/bsf/null.c copy to libavcodec/opus/frame_duration_tab.c index 28237076fb..3e408d9788 100644 --- a/libavcodec/bsf/null.c +++ b/libavcodec/opus/frame_duration_tab.c @@ -16,14 +16,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/** - * @file - * Null bitstream filter -- pass the input through unchanged. - */ - -#include "bsf_internal.h" +#include "tab.h" -const FFBitStreamFilter ff_null_bsf = { - .p.name = "null", - .filter = ff_bsf_get_packet_ref, +const uint16_t ff_opus_frame_duration[32] = { + 480, 960, 1920, 2880, + 480, 960, 1920, 2880, + 480, 960, 1920, 2880, + 480, 960, + 480, 960, + 120, 240, 480, 960, + 120, 240, 480, 960, + 120, 240, 480, 960, + 120, 240, 480, 960, }; diff --git a/libavcodec/opus/parse.c b/libavcodec/opus/parse.c index 1949449b77..a927996e40 100644 --- a/libavcodec/opus/parse.c +++ b/libavcodec/opus/parse.c @@ -36,21 +36,10 @@ #include "mathops.h" #include "opus.h" #include "parse.h" +#include "tab.h" #include "vorbis_data.h" #if CONFIG_OPUSPARSE -static const uint16_t opus_frame_duration[32] = { - 480, 960, 1920, 2880, - 480, 960, 1920, 2880, - 480, 960, 1920, 2880, - 480, 960, - 480, 960, - 120, 240, 480, 960, - 120, 240, 480, 960, - 120, 240, 480, 960, - 120, 240, 480, 960, -}; - /** * Read a 1- or 2-byte frame length */ @@ -258,7 +247,7 @@ int ff_opus_parse_packet(OpusPacket *pkt, const uint8_t *buf, int buf_size, pkt->data_size = pkt->packet_size - padding; /* total packet duration cannot be larger than 120ms */ - pkt->frame_duration = opus_frame_duration[pkt->config]; + pkt->frame_duration = ff_opus_frame_duration[pkt->config]; if (pkt->frame_duration * pkt->frame_count > OPUS_MAX_PACKET_DUR) goto fail; diff --git a/libavcodec/opus/tab.h b/libavcodec/opus/tab.h index ac140d5868..3903624278 100644 --- a/libavcodec/opus/tab.h +++ b/libavcodec/opus/tab.h @@ -28,6 +28,8 @@ #include "libavutil/attributes_internal.h" FF_VISIBILITY_PUSH_HIDDEN +extern const uint16_t ff_opus_frame_duration[32]; + extern const uint8_t ff_celt_band_end[]; extern const uint8_t ff_opus_default_coupled_streams[]; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
