[FFmpeg-devel] [PATCH 0/4] floating-point AC-3 encoder

Justin Ruggles justin.ruggles
Wed Dec 22 15:30:33 CET 2010


These 4 patches add floating-point support to the AC-3 encoder.

There are a few ways this could be done, but I chose what I thought
was the simplest approach.  ac3enc.c #includes ac3enc_fixed.c/h or
ac3enc_float.c/h depending on CONFIG_AC3ENC_FLOAT as selected during
configure.

I'm not sure how the regression tests will turn out due to the use of
floating-point.  I changed the references to match my system, but it
would be good to have some tests from different systems so we know
beforehand if FATE would turn yellow.


  Move fixed-point structs and functions to ac3enc_fixed.c/h.
  Add macros and typedefs that will allow for adding floating-point
    encoding.
  Add a window field to AC3MDCTContext and use it as an input to
    apply_window() instead of using the fixed-point ff_ac3_window[]
    directly.
  Add floating-point support to the AC-3 encoder.

 Changelog                 |    1 +
 configure                 |    6 +
 libavcodec/ac3enc.c       |  347 ++++-----------------------------------------
 libavcodec/ac3enc_fixed.c |  318 +++++++++++++++++++++++++++++++++++++++++
 libavcodec/ac3enc_fixed.h |   64 +++++++++
 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 +++---
 10 files changed, 586 insertions(+), 342 deletions(-)
 create mode 100644 libavcodec/ac3enc_fixed.c
 create mode 100644 libavcodec/ac3enc_fixed.h
 create mode 100644 libavcodec/ac3enc_float.c
 create mode 100644 libavcodec/ac3enc_float.h




More information about the ffmpeg-devel mailing list