]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegaudioenc.c
libx264: add support for nal-hrd, required for Blu-ray streams.
[ffmpeg] / libavcodec / mpegaudioenc.c
index 385a79a675f696f779ae358145bd12f0dcca164c..ab9e0fa54da3d4f4ca1a949354b8b466925ab1d9 100644 (file)
@@ -24,6 +24,8 @@
  * The simplest mpeg audio layer 2 encoder.
  */
 
+#include "libavutil/audioconvert.h"
+
 #include "avcodec.h"
 #include "internal.h"
 #include "put_bits.h"
@@ -32,6 +34,7 @@
 #define WFRAC_BITS  14   /* fractional bits for window */
 
 #include "mpegaudio.h"
+#include "mpegaudiodsp.h"
 
 /* currently, cannot change these constants (need to modify
    quantization stage) */
@@ -782,15 +785,21 @@ static const AVCodecDefault mp2_defaults[] = {
 };
 
 AVCodec ff_mp2_encoder = {
-    .name           = "mp2",
-    .type           = AVMEDIA_TYPE_AUDIO,
-    .id             = CODEC_ID_MP2,
-    .priv_data_size = sizeof(MpegAudioContext),
-    .init           = MPA_encode_init,
-    .encode2        = MPA_encode_frame,
-    .close          = MPA_encode_close,
-    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
-    .supported_samplerates= (const int[]){44100, 48000,  32000, 22050, 24000, 16000, 0},
-    .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
-    .defaults       = mp2_defaults,
+    .name                  = "mp2",
+    .type                  = AVMEDIA_TYPE_AUDIO,
+    .id                    = AV_CODEC_ID_MP2,
+    .priv_data_size        = sizeof(MpegAudioContext),
+    .init                  = MPA_encode_init,
+    .encode2               = MPA_encode_frame,
+    .close                 = MPA_encode_close,
+    .sample_fmts           = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
+                                                            AV_SAMPLE_FMT_NONE },
+    .supported_samplerates = (const int[]){
+        44100, 48000,  32000, 22050, 24000, 16000, 0
+    },
+    .channel_layouts       = (const uint64_t[]){ AV_CH_LAYOUT_MONO,
+                                                 AV_CH_LAYOUT_STEREO,
+                                                 0 },
+    .long_name             = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
+    .defaults              = mp2_defaults,
 };