Diego Biurrun
2832ea26f3
Remove commented-out debug #define cruft
12 years ago
Diego Biurrun
6fee1b90ce
avcodec: Add av_cold attributes to init functions missing them
12 years ago
Anton Khirnov
f073b1500e
lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft
12 years ago
Diego Biurrun
218aefce44
dsputil: Move LOCAL_ALIGNED macros to libavutil
12 years ago
Diego Biurrun
511cf612ac
miscellaneous typo fixes
12 years ago
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Justin Ruggles
d5a7229ba4
Add a float DSP framework to libavutil
...
Move vector_fmul() from DSPContext to AVFloatDSPContext.
13 years ago
Justin Ruggles
5cc51a5847
avutil: Add av_get_default_channel_layout()
...
Also, use the new function in the AC-3 encoder.
13 years ago
Justin Ruggles
aa872af5e3
ac3enc: update to AVCodec.encode2()
...
Update FATE references due to encoder delay.
13 years ago
Justin Ruggles
4e99501f62
(e)ac3enc: select a default bit rate based on the channel layout
13 years ago
Justin Ruggles
6aeea1dfb2
ac3enc: choose the closest bit rate to the one requested instead of failing
13 years ago
Martin Storsjö
9cf0841ef3
dsputil: Add ff_ prefix to the dsputil*_init* functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Diego Biurrun
a8798c7eb9
Drop unnecessary av_uninit attributes from some variable declarations.
...
Recent versions of gcc (4.4+) no longer give false positive warnings.
13 years ago
Mans Rullgard
cc276c85d1
Make channel layout masks unsigned
...
It makes more sense for a bit mask to use an unsigned type.
The change should be source and binary compatible on all
supported systems, hence micro version bump.
Fixes a few invalid shifts.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Justin Ruggles
c2d9a65bc0
ac3enc: doxygen update.
...
Add some parameters to existing function documentation.
Remove some unneeded documentation.
Convert some static function documentation to non-doxygen style.
13 years ago
Justin Ruggles
ae264bb29b
ac3enc: Add channel coupling support for the fixed-point AC-3 encoder.
...
Update FATE references accordingly.
13 years ago
Justin Ruggles
c766eb1ce1
ac3enc: add macros for option names to make them more understandable.
13 years ago
Justin Ruggles
9542ca9fb7
ac3enc: fix 'channel_coupling' option to actually allow 'auto'.
...
Use 'auto' as the default value.
13 years ago
Justin Ruggles
c3d63262fe
ac3enc: allow new coupling coordinates to be sent independently for each
...
channel.
13 years ago
Justin Ruggles
d55ad59a8a
ac3enc: separate exponent bit counting from exponent grouping.
...
Move bit counting to the bit allocation function. Move exponent grouping to
after bit allocation. This will allow for adjustment of bandwidth parameters
during bit allocation without having to do exponent grouping multiple times.
13 years ago
Justin Ruggles
093ee8e199
cosmetics: reindent
13 years ago
Justin Ruggles
1bca72e1bd
eac3enc: support writing of basic mixing and info metadata
13 years ago
Justin Ruggles
be7bd626c4
eac3enc: use different numbers of blocks per frame to allow higher bitrates
14 years ago
Justin Ruggles
08a747afb9
eac3enc: use frame exponent strategy when applicable.
...
This checks if the set of selected exponent strategies for all blocks in a
channel are in the frame exponent strategy table, and if so, writes the
table index instead of each strategy. This saves up to 7 bits per channel per
frame, so the overall effect on quality is small.
14 years ago
Justin Ruggles
b5849f7709
ac3enc: merge AC3MDCTContext with AC3EncodeContext.
...
Since both the fixed-point and floating-point encoders use the FFTContext,
this no longer needs to be in a separate context. Also, when a short-transform
context is added, the same MDCT window will be used.
14 years ago
Justin Ruggles
82cea7cb6c
ac3enc: prefer passing AC3EncodeContext rather than AVCodecContext
14 years ago
Justin Ruggles
f501157e53
ac3enc: fix memleak
14 years ago
Justin Ruggles
bd2deab706
cosmetics: remove outdated comment that is no longer true
14 years ago
Justin Ruggles
8683c6a638
ac3enc: move ff_ac3_encode_frame() to ac3enc_template.c
...
This avoids using function pointers for quite a few small functions, most of
which just call DSP functions.
14 years ago
Justin Ruggles
7dcdf974d0
ac3enc: Remove bit allocation fallbacks.
...
They introduce too much complexity for very little benefit. The result is that
encoding will be more likely to fail at extremely low bitrates where quality
would be awful anyway.
14 years ago
Justin Ruggles
684f4abfac
ac3enc: remove unneeded local variable in asym_quant()
14 years ago
Justin Ruggles
f21fb76b1b
ac3enc: remove a branch in asym_quant() by doing 2 shifts
14 years ago
Justin Ruggles
0e4dbe2996
ac3enc: avoid masking output in asym_quant() by using signed values for
...
quantized mantissas.
14 years ago
Justin Ruggles
99477adc31
ac3enc: fix allocation of floating point samples.
...
sizeof(SampleType) is different for fixed and float encoders.
14 years ago
Justin Ruggles
38c304addd
ac3enc: remove empty ac3_float function that is never called
14 years ago
Justin Ruggles
e0cc66df61
ac3enc: split templated float vs. fixed functions into a separate file.
...
Function pointers are used for templated functions instead of needlessly
duplicating many functions.
14 years ago
Justin Ruggles
e754dfc0bb
ac3enc: dynamically allocate AC3EncodeContext fields windowed_samples and mdct
...
This will allow the same struct to be used for both the fixed and float ac3
encoders.
14 years ago
Justin Ruggles
36151b3e31
ac3enc: use function pointer to choose between AC-3 and E-AC-3 header output
...
functions.
14 years ago
Diego Biurrun
d3778972d8
ac3enc: Fix linking of AC-3 encoder without the E-AC-3 encoder.
...
The AC-3 encoder unconditionally references some symbols from the E-AC-3
encoder; make those references conditional to fix linking.
14 years ago
Justin Ruggles
c8e9ea43d0
Move E-AC-3 encoder functions to a separate eac3enc.c file.
14 years ago
Justin Ruggles
787a13535a
ac3enc: remove convenience macro, #define DEBUG
14 years ago
Justin Ruggles
a8bd53402a
ac3enc: remove unused #define
14 years ago
Justin Ruggles
35d5cb1ab4
ac3enc: extract all exponents for the frame at once
14 years ago
Mans Rullgard
90da52f01f
ac3enc: fix LOCAL_ALIGNED usage in count_mantissa_bits()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
6ca23db9cc
ac3enc: modify mantissa bit counting to keep bap counts for all values of bap
...
instead of just 0 to 4.
This does all the actual bit counting as a final step.
14 years ago
Justin Ruggles
1323828a0f
ac3enc: split mantissa bit counting into a separate function.
...
No speed difference. This is to allow for more flexible bit counting.
14 years ago
Justin Ruggles
7743865ffc
ac3enc: store per-block/channel bap pointers by reference block in a 2D array
...
rather than in the AC3Block struct.
This will make it easier to access the bap values without having to chase
the reference block pointers each time.
14 years ago
Mans Rullgard
7f7726c7a2
ac3enc: use LOCAL_ALIGNED macro
...
Aligned local variables must use the LOCAL_ALIGNED macro to ensure
correct alignment on all systems. The unusual size argument to
memset is required since the implementation of LOCAL_ALIGNED may
use a pointer to an array.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
1a950da6a2
cosmetics: indentation and alignment after previous commit
14 years ago