[FFmpeg-devel] [PATCH] ADPCM: Bump THP channel limit to 14

Michael Niedermayer michaelni at gmx.at
Sat Sep 12 22:26:04 CEST 2015


On Sat, Sep 12, 2015 at 06:36:33PM +0000, Paul B Mahol wrote:
> On 9/11/15, Paul B Mahol <onemda at gmail.com> wrote:
> > On 9/11/15, Rodger Combs <rodger.combs at gmail.com> wrote:
> >> ---
> >>  libavcodec/adpcm.c | 6 +++---
> >>  1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
> >> index 52d0d44..ba38041 100644
> >> --- a/libavcodec/adpcm.c
> >> +++ b/libavcodec/adpcm.c
> >> @@ -84,7 +84,7 @@ static const int swf_index_tables[4][16] = {
> >>  /* end of tables */
> >>
> >>  typedef struct ADPCMDecodeContext {
> >> -    ADPCMChannelStatus status[10];
> >> +    ADPCMChannelStatus status[14];
> >>      int vqa_version;                /**< VQA version. Used for
> >> ADPCM_IMA_WS
> >> */
> >>      int has_status;
> >>  } ADPCMDecodeContext;
> >> @@ -109,7 +109,7 @@ static av_cold int adpcm_decode_init(AVCodecContext *
> >> avctx)
> >>          break;
> >>      case AV_CODEC_ID_ADPCM_THP:
> >>      case AV_CODEC_ID_ADPCM_THP_LE:
> >> -        max_channels = 10;
> >> +        max_channels = 14;
> >>          break;
> >>      }
> >>      if (avctx->channels < min_channels || avctx->channels > max_channels)
> >> {
> >> @@ -1431,7 +1431,7 @@ static int adpcm_decode_frame(AVCodecContext
> >> *avctx,
> >> void *data,
> >>      case AV_CODEC_ID_ADPCM_THP:
> >>      case AV_CODEC_ID_ADPCM_THP_LE:
> >>      {
> >> -        int table[10][16];
> >> +        int table[14][16];
> >
> > Perhaps this should be moved to private context and nb of channels
> > raised to 64....
> 
> Anyway patch should be good as is.

applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150912/6a492f36/attachment.sig>


More information about the ffmpeg-devel mailing list