[FFmpeg-cvslog] r19787 - in trunk/libavcodec: 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 v...

reimar subversion
Sun Sep 6 11:15:07 CEST 2009


Author: reimar
Date: Sun Sep  6 11:15:07 2009
New Revision: 19787

Log:
Make sample_fmts and channel_layouts compound literals const to reduce size of
.data section.

Modified:
   trunk/libavcodec/aac.c
   trunk/libavcodec/aacenc.c
   trunk/libavcodec/ac3enc.c
   trunk/libavcodec/adpcm.c
   trunk/libavcodec/adxenc.c
   trunk/libavcodec/flacenc.c
   trunk/libavcodec/g726.c
   trunk/libavcodec/libfaac.c
   trunk/libavcodec/libgsm.c
   trunk/libavcodec/libmp3lame.c
   trunk/libavcodec/libopencore-amr.c
   trunk/libavcodec/libvorbis.c
   trunk/libavcodec/mpegaudioenc.c
   trunk/libavcodec/pcm-mpeg.c
   trunk/libavcodec/pcm.c
   trunk/libavcodec/roqaudioenc.c
   trunk/libavcodec/vorbis_enc.c
   trunk/libavcodec/wmaenc.c

Modified: trunk/libavcodec/aac.c
==============================================================================
--- trunk/libavcodec/aac.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/aac.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -1804,7 +1804,7 @@ AVCodec aac_decoder = {
     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
     },
 };

Modified: trunk/libavcodec/aacenc.c
==============================================================================
--- trunk/libavcodec/aacenc.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/aacenc.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -636,6 +636,6 @@ AVCodec aac_encoder = {
     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"),
 };

Modified: trunk/libavcodec/ac3enc.c
==============================================================================
--- trunk/libavcodec/ac3enc.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/ac3enc.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -1400,9 +1400,9 @@ AVCodec ac3_encoder = {
     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,

Modified: trunk/libavcodec/adpcm.c
==============================================================================
--- trunk/libavcodec/adpcm.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/adpcm.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -1631,7 +1631,7 @@ AVCodec name ## _encoder = {            
     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

Modified: trunk/libavcodec/adxenc.c
==============================================================================
--- trunk/libavcodec/adxenc.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/adxenc.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -192,6 +192,6 @@ AVCodec adpcm_adx_encoder = {
     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"),
 };

Modified: trunk/libavcodec/flacenc.c
==============================================================================
--- trunk/libavcodec/flacenc.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/flacenc.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -1324,6 +1324,6 @@ AVCodec flac_encoder = {
     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)"),
 };

Modified: trunk/libavcodec/g726.c
==============================================================================
--- trunk/libavcodec/g726.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/g726.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -394,7 +394,7 @@ AVCodec adpcm_g726_encoder = {
     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

Modified: trunk/libavcodec/libfaac.c
==============================================================================
--- trunk/libavcodec/libfaac.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/libfaac.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -153,6 +153,6 @@ AVCodec libfaac_encoder = {
     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)"),
 };

Modified: trunk/libavcodec/libgsm.c
==============================================================================
--- trunk/libavcodec/libgsm.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/libgsm.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -120,7 +120,7 @@ AVCodec libgsm_encoder = {
     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 @@ AVCodec libgsm_ms_encoder = {
     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"),
 };
 

Modified: trunk/libavcodec/libmp3lame.c
==============================================================================
--- trunk/libavcodec/libmp3lame.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/libmp3lame.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -223,6 +223,6 @@ AVCodec libmp3lame_encoder = {
     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)"),
 };

Modified: trunk/libavcodec/libopencore-amr.c
==============================================================================
--- trunk/libavcodec/libopencore-amr.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/libopencore-amr.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -222,7 +222,7 @@ AVCodec libopencore_amrnb_encoder = {
     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"),
 };
 

Modified: trunk/libavcodec/libvorbis.c
==============================================================================
--- trunk/libavcodec/libvorbis.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/libvorbis.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -224,6 +224,6 @@ AVCodec libvorbis_encoder = {
     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"),
 } ;

Modified: trunk/libavcodec/mpegaudioenc.c
==============================================================================
--- trunk/libavcodec/mpegaudioenc.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/mpegaudioenc.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -797,7 +797,7 @@ AVCodec mp2_encoder = {
     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)"),
 };
 

Modified: trunk/libavcodec/pcm-mpeg.c
==============================================================================
--- trunk/libavcodec/pcm-mpeg.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/pcm-mpeg.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -310,7 +310,7 @@ AVCodec pcm_bluray_decoder = {
     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"),
 };

Modified: trunk/libavcodec/pcm.c
==============================================================================
--- trunk/libavcodec/pcm.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/pcm.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -523,7 +523,7 @@ AVCodec name ## _encoder = {            
     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 @@ AVCodec name ## _decoder = {            
     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

Modified: trunk/libavcodec/roqaudioenc.c
==============================================================================
--- trunk/libavcodec/roqaudioenc.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/roqaudioenc.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -174,6 +174,6 @@ AVCodec roq_dpcm_encoder = {
     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"),
 };

Modified: trunk/libavcodec/vorbis_enc.c
==============================================================================
--- trunk/libavcodec/vorbis_enc.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/vorbis_enc.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -1045,6 +1045,6 @@ AVCodec vorbis_encoder = {
     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"),
 };

Modified: trunk/libavcodec/wmaenc.c
==============================================================================
--- trunk/libavcodec/wmaenc.c	Sun Sep  6 10:57:19 2009	(r19786)
+++ trunk/libavcodec/wmaenc.c	Sun Sep  6 11:15:07 2009	(r19787)
@@ -392,7 +392,7 @@ AVCodec wmav1_encoder =
     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 @@ AVCodec wmav2_encoder =
     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"),
 };



More information about the ffmpeg-cvslog mailing list