[FFmpeg-devel] [PATCH 4/4] Add floating-point support to the AC-3 encoder.
Michael Niedermayer
michaelni
Thu Dec 23 22:07:13 CET 2010
On Wed, Dec 22, 2010 at 09:30:37AM -0500, Justin Ruggles wrote:
>
> Make floating-point the default, but allow using the fixed-point encoder by
> using configure option --disable-ac3enc-float.
> Updated test references for acodec-ac3, lavf-rm, and seek-ac3_rm.
> ---
> Changelog | 1 +
> configure | 6 +++
> libavcodec/ac3enc.c | 10 ++++-
> libavcodec/ac3enc_fixed.c | 2 +-
> libavcodec/ac3enc_float.c | 97 +++++++++++++++++++++++++++++++++++++++++++++
> libavcodec/ac3enc_float.h | 51 +++++++++++++++++++++++
> tests/ref/acodec/ac3 | 2 +-
> tests/ref/lavf/rm | 2 +-
> tests/ref/seek/ac3_rm | 40 ++++++++++--------
> 9 files changed, 189 insertions(+), 22 deletions(-)
> create mode 100644 libavcodec/ac3enc_float.c
> create mode 100644 libavcodec/ac3enc_float.h
>
> Changelog | 1
> configure | 6 ++
> libavcodec/ac3enc.c | 10 ++++
> libavcodec/ac3enc_fixed.c | 2
> libavcodec/ac3enc_float.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++
> libavcodec/ac3enc_float.h | 51 ++++++++++++++++++++++++
> tests/ref/acodec/ac3 | 2
> tests/ref/lavf/rm | 2
> tests/ref/seek/ac3_rm | 40 ++++++++++--------
> 9 files changed, 189 insertions(+), 22 deletions(-)
> 3c58e6ec122a52bd7bd41c13bf5a7fec0571a7e4 0004-Add-floating-point-support-to-the-AC-3-encoder.patch
> diff --git Changelog Changelog
> index b56a31d..84b4081 100644
> --- Changelog
> +++ Changelog
> @@ -66,6 +66,7 @@ version <next>:
> - FLAC parser added
> - gradfun filter added
> - AMR-WB decoder
> +- floating-point support added to the AC-3 encoder
>
>
> version 0.6:
> diff --git configure configure
> index 62f43a3..e37fd35 100755
> --- configure
> +++ configure
> @@ -96,6 +96,7 @@ Configuration options:
> --enable-x11grab enable X11 grabbing [no]
> --disable-network disable network support [no]
> --disable-mpegaudio-hp faster (but less accurate) MPEG audio decoding [no]
> + --disable-ac3enc-float faster (but less accurate) AC-3 audio encoding [no]
> --enable-gray enable full grayscale support (slower color)
> --disable-swscale-alpha disable alpha channel support in swscale
> --disable-fastdiv disable table-based division
> @@ -858,6 +859,7 @@ COMPONENT_LIST="
> CONFIG_LIST="
> $COMPONENT_LIST
> aandct
> + ac3enc_float
> avcodec
> avcore
> avdevice
> @@ -1577,6 +1579,7 @@ enable avdevice
> enable avfilter
> enable avformat
> enable avutil
> +enable ac3enc_float
> enable asm
> enable debug
> enable doc
> @@ -1748,6 +1751,9 @@ for opt do
> esac
> done
>
> +# select mdct if ac3enc_float is enabled
> +enabled ac3enc_float && ac3_encoder_select="mdct"
> +
> disabled logging && logfile=/dev/null
>
> echo "# $0 $FFMPEG_CONFIGURATION" > $logfile
> diff --git libavcodec/ac3enc.c libavcodec/ac3enc.c
> index 9d29529..1e07a44 100644
> --- libavcodec/ac3enc.c
> +++ libavcodec/ac3enc.c
> @@ -44,7 +44,11 @@
> #define SCALE_FLOAT(a, bits) lrintf((a) * (float)(1 << (bits)))
>
>
> +#if CONFIG_AC3ENC_FLOAT
> +#include "ac3enc_float.h"
> +#else
> #include "ac3enc_fixed.h"
> +#endif
if its one or the other but not both then regression tests will become hard
i think the way its done with mp3 is more flexible
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101223/9393af10/attachment.pgp>
More information about the ffmpeg-devel
mailing list