Browse Source

avcodec/aacdec_fixed: Fix preparation for resampler

2nd channel makes sense only for CPE type.

Skip 2nd channel in preparation for resampler (in spectral_to _sample())
depending on block type.

Fixes fate failure with clang ftrapv.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8
Nedeljko Babic Michael Niedermayer 10 years ago
parent
commit
902bfa5b22
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/aacdec_template.c

+ 2
- 1
libavcodec/aacdec_template.c View File

@@ -2750,7 +2750,8 @@ static void spectral_to_sample(AACContext *ac, int samples)
/* preparation for resampler */
for(j = 0; j<samples; j++){
che->ch[0].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[0].ret[j]<<7)+0x8000;
che->ch[1].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[1].ret[j]<<7)+0x8000;
if(type == TYPE_CPE)
che->ch[1].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[1].ret[j]<<7)+0x8000;
}
}
#endif /* USE_FIXED */


Loading…
Cancel
Save