[Ffmpeg-devel] AAC decoder

Oded Shimon ods15
Tue Mar 21 20:34:28 CET 2006


Well, for anyone interested. Not even AAC LC is ready, but in general files 
encoded with faac are playable and enjoyable...


Some ego boosting:

me:   BENCHMARKs: VC:   0.000s VO:   0.000s A:   1.627s Sys:   0.147s =    1.774s
faad: BENCHMARKs: VC:   0.000s VO:   0.000s A:   1.933s Sys:   0.209s =    2.142s
me:   BENCHMARKs: VC:   0.000s VO:   0.000s A:   1.054s Sys:   0.098s =    1.152s
faad: BENCHMARKs: VC:   0.000s VO:   0.000s A:   1.294s Sys:   0.103s =    1.398s


However, I expect it to get slower as I implement more features. AAC was 
really designed in the most anti-optimization way possible.

Obviously patch is not at all for inclusion, it's only for those 
interested, however I do welcome comments on how I can clean it up (and 
possibly further optimize). Mostly this mail is just a cheap trick for my 
to keep a backup of the last working version of my decoder. :)

- ods15
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aac.c
Type: text/x-csrc
Size: 19862 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060321/ef4de30a/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aac.h
Type: text/x-chdr
Size: 81106 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060321/ef4de30a/attachment.h>
-------------- next part --------------
Index: libavcodec/Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/Makefile,v
retrieving revision 1.244
diff -u -r1.244 Makefile
--- libavcodec/Makefile	8 Mar 2006 04:13:55 -0000	1.244
+++ libavcodec/Makefile	19 Mar 2006 17:33:22 -0000
@@ -20,6 +20,9 @@
 
 HEADERS = avcodec.h dsputil.h
 
+ifeq ($(CONFIG_NATIVE_AAC_DECODER),yes)
+    OBJS+= aac.o
+endif
 ifeq ($(CONFIG_AASC_DECODER),yes)
     OBJS+= aasc.o
 endif
Index: libavcodec/allcodecs.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/allcodecs.c,v
retrieving revision 1.131
diff -u -r1.131 allcodecs.c
--- libavcodec/allcodecs.c	17 Feb 2006 03:17:42 -0000	1.131
+++ libavcodec/allcodecs.c	19 Mar 2006 17:33:23 -0000
@@ -299,6 +299,9 @@
     register_avcodec(&mpeg4aac_decoder);
 #endif //CONFIG_MPEG4AAC_DECODER
 #endif
+#ifdef CONFIG_NATIVE_AAC_DECODER
+    register_avcodec(&native_aac_decoder);
+#endif //CONFIG_NATIVE_AAC_DECODER
 #ifdef CONFIG_MPEG1VIDEO_DECODER
     register_avcodec(&mpeg1video_decoder);
 #endif //CONFIG_MPEG1VIDEO_DECODER
Index: libavcodec/avcodec.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/avcodec.h,v
retrieving revision 1.457
diff -u -r1.457 avcodec.h
--- libavcodec/avcodec.h	10 Mar 2006 13:55:48 -0000	1.457
+++ libavcodec/avcodec.h	19 Mar 2006 17:33:24 -0000
@@ -198,6 +198,7 @@
     CODEC_ID_COOK,
     CODEC_ID_TRUESPEECH,
     CODEC_ID_TTA,
+    CODEC_ID_NATIVE_AAC,
 
     CODEC_ID_OGGTHEORA= 0x16000,
 
@@ -2182,6 +2183,7 @@
 extern AVCodec amr_wb_decoder;
 extern AVCodec aac_decoder;
 extern AVCodec mpeg4aac_decoder;
+extern AVCodec native_aac_decoder;
 extern AVCodec asv1_decoder;
 extern AVCodec asv2_decoder;
 extern AVCodec vcr1_decoder;
Index: etc/codecs.conf
===================================================================
RCS file: /cvsroot/mplayer/main/etc/codecs.conf,v
retrieving revision 1.462
diff -u -r1.462 codecs.conf
--- etc/codecs.conf	19 Feb 2006 10:15:18 -0000	1.462
+++ etc/codecs.conf	19 Mar 2006 17:57:08 -0000
@@ -2327,6 +2327,16 @@
   driver ffmpeg
   dll "dvaudio"
 
+audiocodec aac
+  info "Native AAC (MPEG-2/MPEG-4 Audio) FFmpeg decoder"
+  status untested
+  fourcc mp4a,MP4A
+  fourcc "AAC " ; Used in NSV
+  format 0xff
+  format 0x706D
+  driver ffmpeg
+  dll "native_aac"
+
 audiocodec faad
   info "FAAD AAC (MPEG-2/MPEG-4 Audio) decoder"
   status working



More information about the ffmpeg-devel mailing list