[FFmpeg-devel] [PATCH 05/15] lavc/adpcm: THP: allow channel counts up to 10

Michael Niedermayer michaelni at gmx.at
Sat Jun 20 19:45:52 CEST 2015


On Sat, Jun 20, 2015 at 05:14:53PM +0000, Paul B Mahol wrote:
> Dana 20. 6. 2015. 12:02 osoba "Rodger Combs" <rodger.combs at gmail.com>
> napisala je:
> >
> > ---
> >  libavcodec/adpcm.c | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
> > index 0228ce1..69ece18 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[6];
> > +    ADPCMChannelStatus status[10];
> >      int vqa_version;                /**< VQA version. Used for
> ADPCM_IMA_WS */
> >  } ADPCMDecodeContext;
> >
> > @@ -104,9 +104,11 @@ static av_cold int adpcm_decode_init(AVCodecContext
> * avctx)
> >      case AV_CODEC_ID_ADPCM_EA_R2:
> >      case AV_CODEC_ID_ADPCM_EA_R3:
> >      case AV_CODEC_ID_ADPCM_EA_XAS:
> > +        max_channels = 6;
> > +        break;
> >      case AV_CODEC_ID_ADPCM_THP:
> >      case AV_CODEC_ID_ADPCM_THP_LE:
> > -        max_channels = 6;
> > +        max_channels = 10;
> >          break;
> >      }
> >      if (avctx->channels < min_channels || avctx->channels >
> max_channels) {
> > @@ -1428,7 +1430,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[6][16];
> > +        int table[10][16];
> >          int ch;
> >
> >  #define THP_GET16(g) \
> > --
> > 2.4.1
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> LGTM

applied

thanks

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

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150620/6ae8fc65/attachment.asc>


More information about the ffmpeg-devel mailing list