]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpc7.c
lavc: support extracting audio service type from side data
[ffmpeg] / libavcodec / mpc7.c
index 1aed52b8a06b7f6069d8bcafe104f50bc6448e9f..2185aec88b09f14ba8a317c33b561e42e7aeb0aa 100644 (file)
@@ -30,7 +30,6 @@
 #include "libavutil/lfg.h"
 #include "avcodec.h"
 #include "get_bits.h"
-#include "dsputil.h"
 #include "internal.h"
 #include "mpegaudiodsp.h"
 
@@ -75,9 +74,9 @@ static av_cold int mpc7_decode_init(AVCodecContext * avctx)
     }
     memset(c->oldDSCF, 0, sizeof(c->oldDSCF));
     av_lfg_init(&c->rnd, 0xDEADBEEF);
-    ff_dsputil_init(&c->dsp, avctx);
+    ff_bswapdsp_init(&c->bdsp);
     ff_mpadsp_init(&c->mpadsp);
-    c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4);
+    c->bdsp.bswap_buf((uint32_t *) buf, (const uint32_t *) avctx->extradata, 4);
     ff_mpc_init();
     init_get_bits(&gb, buf, 128);
 
@@ -236,7 +235,8 @@ static int mpc7_decode_frame(AVCodecContext * avctx, void *data,
     av_fast_padded_malloc(&c->bits, &c->buf_size, buf_size);
     if (!c->bits)
         return AVERROR(ENOMEM);
-    c->dsp.bswap_buf((uint32_t *)c->bits, (const uint32_t *)buf, buf_size >> 2);
+    c->bdsp.bswap_buf((uint32_t *) c->bits, (const uint32_t *) buf,
+                      buf_size >> 2);
     init_get_bits(&gb, c->bits, buf_size * 8);
     skip_bits_long(&gb, skip);
 
@@ -329,6 +329,7 @@ static av_cold int mpc7_decode_close(AVCodecContext *avctx)
 
 AVCodec ff_mpc7_decoder = {
     .name           = "mpc7",
+    .long_name      = NULL_IF_CONFIG_SMALL("Musepack SV7"),
     .type           = AVMEDIA_TYPE_AUDIO,
     .id             = AV_CODEC_ID_MUSEPACK7,
     .priv_data_size = sizeof(MPCContext),
@@ -337,7 +338,6 @@ AVCodec ff_mpc7_decoder = {
     .decode         = mpc7_decode_frame,
     .flush          = mpc7_decode_flush,
     .capabilities   = CODEC_CAP_DR1,
-    .long_name      = NULL_IF_CONFIG_SMALL("Musepack SV7"),
     .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
                                                       AV_SAMPLE_FMT_NONE },
 };