On Fri, 26 Oct 2012, Diego Biurrun wrote:
On Fri, Oct 26, 2012 at 11:13:49PM +0300, Martin Storsjö wrote:
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -129,6 +129,8 @@ OBJS-$(CONFIG_CLJR_DECODER) += cljr.o
OBJS-$(CONFIG_CLJR_ENCODER) += cljr.o
OBJS-$(CONFIG_CLLC_DECODER) += cllc.o
OBJS-$(CONFIG_COOK_DECODER) += cook.o
+OBJS-$(CONFIG_COMFORTNOISE_DECODER) += comfortnoise.o celp_filters.o
+OBJS-$(CONFIG_COMFORTNOISE_ENCODER) += comfortnoise.o
OBJS-$(CONFIG_CSCD_DECODER) += cscd.o
OBJS-$(CONFIG_CYUV_DECODER) += cyuv.o
OBJS-$(CONFIG_DCA_DECODER) += dcadec.o dca.o dcadsp.o \
index 0000000..144c566
--- /dev/null
+++ b/libavcodec/comfortnoise.c
@@ -0,0 +1,258 @@
+
+typedef struct CNGContext {
+ AVFrame avframe;
+ float *refl_coef, *target_refl_coef;
+ float *lpc_coef;
+ int order;
+ int energy, target_energy;
+ float *filter_out;
+ float *excitation;
+ AVLFG lfg;
+} CNGContext;
+
+typedef struct CNGEncContext {
+ LPCContext lpc;
+ int order;
+ int32_t *samples32;
+ float *refl_coef;
+} CNGEncContext;
+
+#if CONFIG_COMFORTNOISE_DECODER
+#endif
+
+#if CONFIG_COMFORTNOISE_ENCODER
+#endif
Each context struct is only used in one of decoder/encoder, so you could
move them below the ifdef; better yet, you could split the file in two
and compile conditionally.
Split into cngdec.c and cngenc.c locally.
// Martin
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel