Message ID | 20220719112748.374-1-jamrial@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avcodec/aacdec: remove skip samples multiplier | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
James Almer: > The amount of padding samples reported by containers take into account the > extended samplerate in HE-AAC. > > Fixes ticket #9671. > > Signed-off-by: James Almer <jamrial@gmail.com> > --- > libavcodec/aacdec_template.c | 3 --- > tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a | 2 +- > tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a | 2 +- > tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a | 2 +- > tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a | 2 +- > tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a | 2 +- > tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a | 2 +- > tests/ref/fate/audiomatch-nero-16000-mono-he-m4a | 2 +- > tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a | 2 +- > tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a | 2 +- > tests/ref/fate/audiomatch-nero-44100-mono-he-m4a | 2 +- > tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a | 2 +- > tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a | 2 +- > 13 files changed, 12 insertions(+), 15 deletions(-) > > diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c > index 10fba3d3b2..119976aa19 100644 > --- a/libavcodec/aacdec_template.c > +++ b/libavcodec/aacdec_template.c > @@ -3418,9 +3418,6 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, > ac->oc[1].status = OC_LOCKED; > } > > - if (multiplier) > - avctx->internal->skip_samples_multiplier = 2; This is the only user of the skip_samples_multiplier field. If you remove this, you should remove the field and its remaining redundant occurrences. > - > if (!ac->frame->data[0] && samples) { > av_log(avctx, AV_LOG_ERROR, "no frame data found\n"); > err = AVERROR_INVALIDDATA; > diff --git a/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a b/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a > index f6f8df5e00..b8fd03942c 100644 > --- a/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a > +++ b/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a > @@ -1 +1 @@ > -presig: 481 postsig:223 c: 0.9835 lenerr:704 > +presig: 1537 postsig:223 c: 0.9835 lenerr:1760 > diff --git a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a > index 9ba0ef2338..b0381bfa0f 100644 > --- a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a > +++ b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a > @@ -1 +1 @@ > -presig: 962 postsig:446 c: 0.9895 lenerr:1408 > +presig: 3074 postsig:446 c: 0.9895 lenerr:3520 > diff --git a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a > index d4fc21bda5..0b16a523f7 100644 > --- a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a > +++ b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a > @@ -1 +1 @@ > -presig: 962 postsig:446 c: 0.9839 lenerr:1408 > +presig: 3074 postsig:446 c: 0.9839 lenerr:3520 > diff --git a/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a b/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a > index 0ad4911ff8..34921ed8b5 100644 > --- a/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a > +++ b/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a > @@ -1 +1 @@ > -presig: 962 postsig:822 c: 0.9911 lenerr:1784 > +presig: 3074 postsig:822 c: 0.9911 lenerr:3896 > diff --git a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a > index ff5540b572..3bab086939 100644 > --- a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a > +++ b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a > @@ -1 +1 @@ > -presig: 1924 postsig:1644 c: 0.9890 lenerr:3568 > +presig: 6148 postsig:1644 c: 0.9890 lenerr:7792 > diff --git a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a > index f8214cfbdc..27341f54e2 100644 > --- a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a > +++ b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a > @@ -1 +1 @@ > -presig: 1924 postsig:1644 c: 0.9909 lenerr:3568 > +presig: 6148 postsig:1644 c: 0.9909 lenerr:7792 > diff --git a/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a b/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a > index 4ee764e967..fb62ae0c36 100644 > --- a/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a > +++ b/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a > @@ -1 +1 @@ > -presig: -4 postsig:196 c: 0.9736 lenerr:192 > +presig: 2332 postsig:196 c: 0.9736 lenerr:2528 > diff --git a/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a b/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a > index cdc31c12ef..4a30beca9d 100644 > --- a/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a > +++ b/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a > @@ -1 +1 @@ > -presig: -8 postsig:392 c: 0.9777 lenerr:384 > +presig: 4664 postsig:392 c: 0.9777 lenerr:5056 > diff --git a/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a b/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a > index 74d549780d..22aed2aa03 100644 > --- a/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a > +++ b/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a > @@ -1 +1 @@ > -presig: 2 postsig:2590 c: 0.9934 lenerr:2592 > +presig: 5618 postsig:2590 c: 0.9934 lenerr:8208 > diff --git a/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a b/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a > index b5dcd9daeb..66ebd92730 100644 > --- a/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a > +++ b/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a > @@ -1 +1 @@ > -presig: 0 postsig:1336 c: 0.9973 lenerr:1336 > +presig: 2336 postsig:1336 c: 0.9973 lenerr:3672 > diff --git a/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a b/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a > index 42a87c08e3..a7d1d9f249 100644 > --- a/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a > +++ b/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a > @@ -1 +1 @@ > -presig: -2 postsig:2674 c: 0.9986 lenerr:2672 > +presig: 4670 postsig:2674 c: 0.9986 lenerr:7344 > diff --git a/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a b/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a > index 3fa2cdba2b..4da8519ee7 100644 > --- a/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a > +++ b/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a > @@ -1 +1 @@ > -presig: 2 postsig:782 c: 0.9980 lenerr:784 > +presig: 5618 postsig:782 c: 0.9980 lenerr:6400
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index 10fba3d3b2..119976aa19 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -3418,9 +3418,6 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, ac->oc[1].status = OC_LOCKED; } - if (multiplier) - avctx->internal->skip_samples_multiplier = 2; - if (!ac->frame->data[0] && samples) { av_log(avctx, AV_LOG_ERROR, "no frame data found\n"); err = AVERROR_INVALIDDATA; diff --git a/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a b/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a index f6f8df5e00..b8fd03942c 100644 --- a/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a +++ b/tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a @@ -1 +1 @@ -presig: 481 postsig:223 c: 0.9835 lenerr:704 +presig: 1537 postsig:223 c: 0.9835 lenerr:1760 diff --git a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a index 9ba0ef2338..b0381bfa0f 100644 --- a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a +++ b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a @@ -1 +1 @@ -presig: 962 postsig:446 c: 0.9895 lenerr:1408 +presig: 3074 postsig:446 c: 0.9895 lenerr:3520 diff --git a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a index d4fc21bda5..0b16a523f7 100644 --- a/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a +++ b/tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a @@ -1 +1 @@ -presig: 962 postsig:446 c: 0.9839 lenerr:1408 +presig: 3074 postsig:446 c: 0.9839 lenerr:3520 diff --git a/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a b/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a index 0ad4911ff8..34921ed8b5 100644 --- a/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a +++ b/tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a @@ -1 +1 @@ -presig: 962 postsig:822 c: 0.9911 lenerr:1784 +presig: 3074 postsig:822 c: 0.9911 lenerr:3896 diff --git a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a index ff5540b572..3bab086939 100644 --- a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a +++ b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a @@ -1 +1 @@ -presig: 1924 postsig:1644 c: 0.9890 lenerr:3568 +presig: 6148 postsig:1644 c: 0.9890 lenerr:7792 diff --git a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a index f8214cfbdc..27341f54e2 100644 --- a/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a +++ b/tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a @@ -1 +1 @@ -presig: 1924 postsig:1644 c: 0.9909 lenerr:3568 +presig: 6148 postsig:1644 c: 0.9909 lenerr:7792 diff --git a/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a b/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a index 4ee764e967..fb62ae0c36 100644 --- a/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a +++ b/tests/ref/fate/audiomatch-nero-16000-mono-he-m4a @@ -1 +1 @@ -presig: -4 postsig:196 c: 0.9736 lenerr:192 +presig: 2332 postsig:196 c: 0.9736 lenerr:2528 diff --git a/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a b/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a index cdc31c12ef..4a30beca9d 100644 --- a/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a +++ b/tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a @@ -1 +1 @@ -presig: -8 postsig:392 c: 0.9777 lenerr:384 +presig: 4664 postsig:392 c: 0.9777 lenerr:5056 diff --git a/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a b/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a index 74d549780d..22aed2aa03 100644 --- a/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a +++ b/tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a @@ -1 +1 @@ -presig: 2 postsig:2590 c: 0.9934 lenerr:2592 +presig: 5618 postsig:2590 c: 0.9934 lenerr:8208 diff --git a/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a b/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a index b5dcd9daeb..66ebd92730 100644 --- a/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a +++ b/tests/ref/fate/audiomatch-nero-44100-mono-he-m4a @@ -1 +1 @@ -presig: 0 postsig:1336 c: 0.9973 lenerr:1336 +presig: 2336 postsig:1336 c: 0.9973 lenerr:3672 diff --git a/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a b/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a index 42a87c08e3..a7d1d9f249 100644 --- a/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a +++ b/tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a @@ -1 +1 @@ -presig: -2 postsig:2674 c: 0.9986 lenerr:2672 +presig: 4670 postsig:2674 c: 0.9986 lenerr:7344 diff --git a/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a b/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a index 3fa2cdba2b..4da8519ee7 100644 --- a/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a +++ b/tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a @@ -1 +1 @@ -presig: 2 postsig:782 c: 0.9980 lenerr:784 +presig: 5618 postsig:782 c: 0.9980 lenerr:6400
The amount of padding samples reported by containers take into account the extended samplerate in HE-AAC. Fixes ticket #9671. Signed-off-by: James Almer <jamrial@gmail.com> --- libavcodec/aacdec_template.c | 3 --- tests/ref/fate/audiomatch-afconvert-16000-mono-he-m4a | 2 +- tests/ref/fate/audiomatch-afconvert-16000-stereo-he-m4a | 2 +- tests/ref/fate/audiomatch-afconvert-16000-stereo-he2-m4a | 2 +- tests/ref/fate/audiomatch-afconvert-44100-mono-he-m4a | 2 +- tests/ref/fate/audiomatch-afconvert-44100-stereo-he-m4a | 2 +- tests/ref/fate/audiomatch-afconvert-44100-stereo-he2-m4a | 2 +- tests/ref/fate/audiomatch-nero-16000-mono-he-m4a | 2 +- tests/ref/fate/audiomatch-nero-16000-stereo-he-m4a | 2 +- tests/ref/fate/audiomatch-nero-16000-stereo-he2-m4a | 2 +- tests/ref/fate/audiomatch-nero-44100-mono-he-m4a | 2 +- tests/ref/fate/audiomatch-nero-44100-stereo-he-m4a | 2 +- tests/ref/fate/audiomatch-nero-44100-stereo-he2-m4a | 2 +- 13 files changed, 12 insertions(+), 15 deletions(-)