[FFmpeg-cvslog] aacdec: fix priming/skip for AAC HE/HE2

Michael Niedermayer git at videolan.org
Thu Aug 30 00:29:15 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Aug 30 00:13:22 2012 +0200| [946ed78f5f8683229afe778a774c12b3a25aba57] | committer: Michael Niedermayer

aacdec: fix priming/skip for AAC HE/HE2

There is a remaining error of 2 - 8 samples in some but not all cases,
the source of the error is unknown ATM.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=946ed78f5f8683229afe778a774c12b3a25aba57
---

 libavcodec/aacdec.c |    6 ++++++
 tests/fate/aac.mak  |    8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index ee6b112..b0a072d 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2539,6 +2539,12 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
         ac->oc[1].status = OC_LOCKED;
     }
 
+    if (multiplier) {
+        int side_size;
+        uint32_t *side = av_packet_get_side_data(avpkt, AV_PKT_DATA_SKIP_SAMPLES, &side_size);
+        if (side && side_size>=4)
+            AV_WL32(side, 2*AV_RL32(side));
+    }
     return 0;
 fail:
     pop_output_configuration(ac);
diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 0a075ca..2b615ab 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -46,17 +46,17 @@ fate-aac-am05_44: CMP_SHIFT = 12288
 FATE_AAC += fate-aac-al_sbr_hq_cm_48_2
 fate-aac-al_sbr_hq_cm_48_2: CMD = pcm -i $(SAMPLES)/aac/al_sbr_cm_48_2.mp4
 fate-aac-al_sbr_hq_cm_48_2: REF = $(SAMPLES)/aac/al_sbr_hq_cm_48_2.s16
-fate-aac-al_sbr_hq_cm_48_2: CMP_SHIFT = 4096
+fate-aac-al_sbr_hq_cm_48_2: CMP_SHIFT = 8192
 
 FATE_AAC += fate-aac-al_sbr_hq_cm_48_5.1
 fate-aac-al_sbr_hq_cm_48_5.1: CMD = pcm -i $(SAMPLES)/aac/al_sbr_cm_48_5.1.mp4
 fate-aac-al_sbr_hq_cm_48_5.1: REF = $(SAMPLES)/aac/al_sbr_hq_cm_48_5.1_reorder.s16
-fate-aac-al_sbr_hq_cm_48_5.1: CMP_SHIFT = 12288
+fate-aac-al_sbr_hq_cm_48_5.1: CMP_SHIFT = 24576
 
 FATE_AAC += fate-aac-al_sbr_ps_06_ur
 fate-aac-al_sbr_ps_06_ur: CMD = pcm -i $(SAMPLES)/aac/al_sbr_ps_06_new.mp4
 fate-aac-al_sbr_ps_06_ur: REF = $(SAMPLES)/aac/al_sbr_ps_06_ur.s16
-fate-aac-al_sbr_ps_06_ur: CMP_SHIFT = 4096
+fate-aac-al_sbr_ps_06_ur: CMP_SHIFT = 8192
 
 FATE_AAC += fate-aac-latm_000000001180bc60
 fate-aac-latm_000000001180bc60: CMD = pcm -i $(SAMPLES)/aac/latm_000000001180bc60.mpg
@@ -73,7 +73,7 @@ fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51_ref.s16
 
 fate-aac-ct%: CMD = pcm -i $(SAMPLES)/aac/CT_DecoderCheck/$(@:fate-aac-ct-%=%)
 fate-aac-ct%: REF = $(SAMPLES)/aac/CT_DecoderCheck/aacPlusv2.wav
-fate-aac-ct%: CMP_SHIFT = 4096
+fate-aac-ct%: CMP_SHIFT = 8192
 fate-aac-ct-sbr_i-ps_i.aac: CMP_SHIFT = 0
 
 FATE_AAC_CT = sbr_bc-ps_i.3gp  \



More information about the ffmpeg-cvslog mailing list