changeset 10145:7955db355703 libavcodec

Make sample_fmts and channel_layouts compound literals const to reduce size of .data section.
author reimar
date Sun, 06 Sep 2009 09:15:07 +0000
parents 50ec8930f99e
children 38cfe222e1a4
files aac.c aacenc.c ac3enc.c adpcm.c adxenc.c flacenc.c g726.c libfaac.c libgsm.c libmp3lame.c libopencore-amr.c libvorbis.c mpegaudioenc.c pcm-mpeg.c pcm.c roqaudioenc.c vorbis_enc.c wmaenc.c
diffstat 18 files changed, 22 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/aac.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/aac.c	Sun Sep 06 09:15:07 2009 +0000
@@ -1804,7 +1804,7 @@
     aac_decode_close,
     aac_decode_frame,
     .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
-    .sample_fmts = (enum SampleFormat[]) {
+    .sample_fmts = (const enum SampleFormat[]) {
         SAMPLE_FMT_S16,SAMPLE_FMT_NONE
     },
 };
--- a/aacenc.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/aacenc.c	Sun Sep 06 09:15:07 2009 +0000
@@ -636,6 +636,6 @@
     aac_encode_frame,
     aac_encode_end,
     .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
 };
--- a/ac3enc.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/ac3enc.c	Sun Sep 06 09:15:07 2009 +0000
@@ -1400,9 +1400,9 @@
     AC3_encode_frame,
     AC3_encode_close,
     NULL,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
-    .channel_layouts = (int64_t[]){
+    .channel_layouts = (const int64_t[]){
         CH_LAYOUT_MONO,
         CH_LAYOUT_STEREO,
         CH_LAYOUT_2_1,
--- a/adpcm.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/adpcm.c	Sun Sep 06 09:15:07 2009 +0000
@@ -1631,7 +1631,7 @@
     adpcm_encode_frame,                         \
     adpcm_encode_close,                         \
     NULL,                                       \
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, \
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, \
     .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
 };
 #else
--- a/adxenc.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/adxenc.c	Sun Sep 06 09:15:07 2009 +0000
@@ -192,6 +192,6 @@
     adx_encode_frame,
     adx_encode_close,
     NULL,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
 };
--- a/flacenc.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/flacenc.c	Sun Sep 06 09:15:07 2009 +0000
@@ -1324,6 +1324,6 @@
     flac_encode_close,
     NULL,
     .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"),
 };
--- a/g726.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/g726.c	Sun Sep 06 09:15:07 2009 +0000
@@ -394,7 +394,7 @@
     g726_encode_frame,
     g726_close,
     NULL,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
 };
 #endif
--- a/libfaac.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/libfaac.c	Sun Sep 06 09:15:07 2009 +0000
@@ -153,6 +153,6 @@
     Faac_encode_init,
     Faac_encode_frame,
     Faac_encode_close,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("libfaac AAC (Advanced Audio Codec)"),
 };
--- a/libgsm.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/libgsm.c	Sun Sep 06 09:15:07 2009 +0000
@@ -120,7 +120,7 @@
     libgsm_init,
     libgsm_encode_frame,
     libgsm_close,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM"),
 };
 
@@ -132,7 +132,7 @@
     libgsm_init,
     libgsm_encode_frame,
     libgsm_close,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"),
 };
 
--- a/libmp3lame.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/libmp3lame.c	Sun Sep 06 09:15:07 2009 +0000
@@ -223,6 +223,6 @@
     MP3lame_encode_frame,
     MP3lame_encode_close,
     .capabilities= CODEC_CAP_DELAY,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name= NULL_IF_CONFIG_SMALL("libmp3lame MP3 (MPEG audio layer 3)"),
 };
--- a/libopencore-amr.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/libopencore-amr.c	Sun Sep 06 09:15:07 2009 +0000
@@ -222,7 +222,7 @@
     amr_nb_encode_frame,
     amr_nb_encode_close,
     NULL,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("OpenCORE Adaptive Multi-Rate (AMR) Narrow-Band"),
 };
 
--- a/libvorbis.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/libvorbis.c	Sun Sep 06 09:15:07 2009 +0000
@@ -224,6 +224,6 @@
     oggvorbis_encode_frame,
     oggvorbis_encode_close,
     .capabilities= CODEC_CAP_DELAY,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name= NULL_IF_CONFIG_SMALL("libvorbis Vorbis"),
 } ;
--- a/mpegaudioenc.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/mpegaudioenc.c	Sun Sep 06 09:15:07 2009 +0000
@@ -797,7 +797,7 @@
     MPA_encode_frame,
     MPA_encode_close,
     NULL,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
 };
 
--- a/pcm-mpeg.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/pcm-mpeg.c	Sun Sep 06 09:15:07 2009 +0000
@@ -310,7 +310,7 @@
     NULL,
     NULL,
     pcm_bluray_decode_frame,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16, SAMPLE_FMT_S32,
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16, SAMPLE_FMT_S32,
                                          SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for Blu-ray media"),
 };
--- a/pcm.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/pcm.c	Sun Sep 06 09:15:07 2009 +0000
@@ -523,7 +523,7 @@
     pcm_encode_frame,                           \
     pcm_encode_close,                           \
     NULL,                                       \
-    .sample_fmts = (enum SampleFormat[]){sample_fmt_,SAMPLE_FMT_NONE}, \
+    .sample_fmts = (const enum SampleFormat[]){sample_fmt_,SAMPLE_FMT_NONE}, \
     .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
 };
 #else
@@ -541,7 +541,7 @@
     NULL,                                       \
     NULL,                                       \
     pcm_decode_frame,                           \
-    .sample_fmts = (enum SampleFormat[]){sample_fmt_,SAMPLE_FMT_NONE}, \
+    .sample_fmts = (const enum SampleFormat[]){sample_fmt_,SAMPLE_FMT_NONE}, \
     .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
 };
 #else
--- a/roqaudioenc.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/roqaudioenc.c	Sun Sep 06 09:15:07 2009 +0000
@@ -174,6 +174,6 @@
     roq_dpcm_encode_frame,
     roq_dpcm_encode_close,
     NULL,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("id RoQ DPCM"),
 };
--- a/vorbis_enc.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/vorbis_enc.c	Sun Sep 06 09:15:07 2009 +0000
@@ -1045,6 +1045,6 @@
     vorbis_encode_frame,
     vorbis_encode_close,
     .capabilities= CODEC_CAP_DELAY,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("Vorbis"),
 };
--- a/wmaenc.c	Sun Sep 06 08:56:10 2009 +0000
+++ b/wmaenc.c	Sun Sep 06 09:15:07 2009 +0000
@@ -392,7 +392,7 @@
     encode_init,
     encode_superframe,
     ff_wma_end,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
 };
 
@@ -405,6 +405,6 @@
     encode_init,
     encode_superframe,
     ff_wma_end,
-    .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
+    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
     .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
 };