[FFmpeg-cvslog] g726: group the g726_encoder AVCodec with the other encoding functions

Justin Ruggles git at videolan.org
Thu Nov 3 02:23:06 CET 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Thu Oct 27 20:50:41 2011 -0400| [437c11ca16dde4ccf4719584c3683230e79bc5b9] | committer: Justin Ruggles

g726: group the g726_encoder AVCodec with the other encoding functions

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=437c11ca16dde4ccf4719584c3683230e79bc5b9
---

 libavcodec/g726.c |   28 +++++++++++++---------------
 1 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index f58bc98..2a60a92 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -365,6 +365,19 @@ static int g726_encode_frame(AVCodecContext *avctx,
 
     return put_bits_count(&pb)>>3;
 }
+
+AVCodec ff_adpcm_g726_encoder = {
+    .name           = "g726",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_ADPCM_G726,
+    .priv_data_size = sizeof(G726Context),
+    .init           = g726_encode_init,
+    .encode         = g726_encode_frame,
+    .close          = g726_encode_close,
+    .capabilities = CODEC_CAP_SMALL_LAST_FRAME,
+    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
+    .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
+};
 #endif
 
 static av_cold int g726_decode_init(AVCodecContext *avctx)
@@ -426,21 +439,6 @@ static int g726_decode_frame(AVCodecContext *avctx,
     return buf_size;
 }
 
-#if CONFIG_ADPCM_G726_ENCODER
-AVCodec ff_adpcm_g726_encoder = {
-    .name           = "g726",
-    .type           = AVMEDIA_TYPE_AUDIO,
-    .id             = CODEC_ID_ADPCM_G726,
-    .priv_data_size = sizeof(G726Context),
-    .init           = g726_encode_init,
-    .encode         = g726_encode_frame,
-    .close          = g726_encode_close,
-    .capabilities = CODEC_CAP_SMALL_LAST_FRAME,
-    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
-    .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
-};
-#endif
-
 AVCodec ff_adpcm_g726_decoder = {
     .name           = "g726",
     .type           = AVMEDIA_TYPE_AUDIO,



More information about the ffmpeg-cvslog mailing list