summaryrefslogtreecommitdiffstats
path: root/libhb/encavcodecaudio.c
Commit message (Collapse)AuthorAgeFilesLines
* lame: Use libav wrapper to encode mp3lameJohn Stebbins2015-10-261-0/+4
| | | | | | | | | | Fixes https://forum.handbrake.fr/viewtopic.php?f=12&t=33345 Some players expect each packet to start on an mp3 frame header. Our mp3lame encoder did not ensure this and resulted in failure to play audio on these players. libav already has the necessary code to parse headers and accumulate a full frame of data, so use it.
* libhb: add hb_buffer_listJohn Stebbins2015-09-241-21/+16
| | | | | This brings together several independent implementations of a simple buffer list manager.
* libhb: enable vbr encoding with fdk-aac and libav-aacjstebbins2015-05-041-0/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7157 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Use a buffer flat to indicate EOFjstebbins2015-05-011-3/+3
| | | | | | | | | | | | ... instead of a 0 length buffer. This fixes this issue: https://forum.handbrake.fr/viewtopic.php?f=12&t=31959 Theora can create 0 length output. These 0 length frames indicate duplicate frames. So we can't use 0 length buffers to indicate the end of the stream. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7143 b64f7644-9d1e-0410-96f1-a4d463321fa5
* New audio output options.Rodeo2015-02-151-0/+6
| | | | | | | | | Dolby Digital Plus (E-AC-3), Dolby TrueHD and FLAC can now be passed through without re-encoding. They aren't covered by Auto Passthru yet, however. In addition, encoding to E-AC-3 is now possible. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6908 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update year to 2015.bradleys2015-02-011-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6852 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update some copyright dates to 2014.Rodeo2014-02-181-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6042 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Plug some leaks and clean up the buffer pool code a little.jstebbins2013-10-231-0/+1
| | | | | | | | | | | Filters were leaking buffers when a job is cancelled. decavcodec could leak when job cancelled. decavcodec leaked audio extradata in BSInfo encavcodec and encavcodecaudio leaked AVCodecContext sync leaked subtitle_sanitizer_t data git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5853 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add experimental avformat muxer for mkv and mp4jstebbins2013-06-301-13/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5620 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use the official libavcodec minimum output buffer size via a define ↵Rodeo2013-03-171-2/+3
| | | | | | (currently, 16 KiB). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5335 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix fdk-aac mono encodingjstebbins2013-03-161-2/+4
| | | | | | | A minimum output buffer size of 8KB is needed by libav git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5329 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated all the copyright headers to 2013.sr552013-03-091-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5318 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encavcodecaInit: minimize code duplication.Rodeo2013-03-031-59/+72
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5292 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix AAC encoding with Libav.Rodeo2013-03-031-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5290 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add optional fdk-aac encoderjstebbins2013-03-031-5/+52
| | | | | | | configure --enable-fdk-aac to enable this encoder git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5287 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Audio dithering.Rodeo2013-02-051-0/+10
| | | | | | | | | | | | Works with encoders that accept 16-bit signed integers as input (currently, only ffflac). When supported, the default method is standard triangular. CLI users can request a specific dither algorithm via the --adither option. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5241 b64f7644-9d1e-0410-96f1-a4d463321fa5
* FLAC: add 24-bit encoding.Rodeo2013-01-021-7/+15
| | | | | | | | | | Works via a dedicated encoder: "FLAC (24-bit)", "ffflac24". Users who prefer 16-bit can use the previous FLAC encoder: "FLAC (ffmpeg)", "ffflac". git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5134 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bump libav to v9_beta3.Rodeo2012-12-311-6/+7
| | | | | | | | Miscellaneous bugfixes and improvements. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5124 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve support for planar audio.Rodeo2012-11-211-58/+94
| | | | | | | | | | | | | | - encavcodecaudio: use libavresample directly (instead of via the hb_audio_resample wrapper), and add support for planar output - hb_audio_resample: add support for planar input - hb_audio_remap: add support for planar input - deca52: output planar float samples (no re-interleaving) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5073 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encavcodecaudio: cosmetics.Rodeo2012-10-271-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5042 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_ff_set_sample_fmt() improvements.Rodeo2012-10-171-2/+9
| | | | | | | | | | - allow setting a sample_fmt other than AV_SAMPLE_FMT_FLT - fall back on planar/packed variant of the requested format if available git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5019 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: remove unnecessary usage of hb_audio_remap.Rodeo2012-09-231-15/+1
| | | | | | | | All decoders now output channels in Libav order. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4977 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Move mixdown-> channel_layout/matrix_encoding translation to ↵Rodeo2012-08-271-2/+1
| | | | | | | | | | hb_audio_resample_init(). Unlike hb_audio_remap, hb_audio_resample will never be used in situations where we don't have a mixdown. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4923 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_resample: move setters out of hb_audio_resample_update(), to ↵Rodeo2012-08-271-3/+2
| | | | | | dedicated functions. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4922 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use hb_audio_resample for downmixing AC3 sources. DRC is still applied by ↵Rodeo2012-08-021-1/+2
| | | | | | | | | | | | | | | | | liba52. Add support for center & surround mix levels to hb_audio_resample. This allows us to support upmixing all audio sources. For sources that have at least 2 front and one back or side channel(s), allow upmixing to 5.1: 3.0/3.1 (2 front and 1 back channels) 4.0/4.1 (3 front and 1 back channels) 4.0/4.1 (2 front and 2 side channels) 5.0 (3 front and 2 side channels) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4885 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Allow control of audio mix normalizationjstebbins2012-08-011-1/+1
| | | | | | | | | | | | Since switching to libavresample for audio mixing, our output volume levels have been reduced because libavresample does mix level normalization by default. This change applies a patch to libav to allow us to disable this behavior and adds a new field to hb_audio_config_t to allow the hb frontends to control this feature. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4884 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Change a few more hb_log() calls to hb_error(), and some cosmetics.Rodeo2012-07-151-29/+31
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4840 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_resample: libvaresample wrapper.Rodeo2012-07-151-107/+76
| | | | | | | | Avoids having code that's mostly identical in multiple files. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4838 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_remap improvements.Rodeo2012-07-121-29/+30
| | | | | | | | | | This moves some logic outside of the decoders/encoders and into a single place. Encoders that do their own remapping (faac, vorbis) can still generate a remap table with hb_audio_remap_build_table(), without having to use hb_audio_remap(). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4827 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump libav to libav-v0.8-2197-g1a068bfjstebbins2012-07-111-81/+132
| | | | | | | | | | | | Resolves several deprecated api's Eliminates several libav patches Eliminates our builtin downmix in favour of avresample Eliminate HB_INPUT_CH_LAYOUT_* and replace with AV_CH_LAYOUT_* Resolves 6.x and 7.0 input channel layout issues HB had Adds downmix support to declpcm. We never had it! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4825 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: drop HB_INPUT_CH_LAYOUT_*Rodeo2012-06-181-10/+7
| | | | | | | | AV_CH_LAYOUT_* works for us, and as its usage becomes more widespread in libhb, translating between the two formats gets increasingly tedious. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4754 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated file copyright / GPL headerssr552012-06-151-3/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4737 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make HB_AMIXDOWN_* defines a simple enumeration. The existing system wasn't ↵Rodeo2012-06-061-1/+1
| | | | | | necessary and didn't work in all decoders for Dolby downmixing. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4714 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Rework filter pipelinejstebbins2012-03-271-3/+4
| | | | | | | | | | | | | | | | | | | | This patch enhances the filter objects. The 2 key improvements are: 1. A filter can change the image dimensions as frames pass through it. 2. A filter can output more than one frame. In addition, I have: Moved cropping & scalling into a filter object Added 90 degree rotation to the rotate filter Moved subtitle burn-in rendering to a filter object. Moved VFR/CFR handling into a framerate shaping filter object. Removed render.c since all it's responsibilities got moved to filters. Improves VOBSUB and SSA subtitle handling. Allows subtitle animations. SSA karaoke support. My apologies in advance if anything breaks ;) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4546 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix flac md5 sumjstebbins2012-01-041-8/+10
| | | | | | | | | Two mistakes. First, we were sending NULL to the encoder twice, which causes libav to finalize the md5 a second time and corrupt it. Second, I forgot that the context extradata needs to be re-copied to our audio config before the muxer updates the flac header information. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4398 b64f7644-9d1e-0410-96f1-a4d463321fa5
* set ac3 dolby flag when downmix is dolbyjstebbins2011-10-151-0/+8
| | | | | | | | If doing dolby or dplii downmix and encoding to ac3, set the dolby flag in output ac3 stream so players (and handbrake) will know that the stream is dolby matrix encoded. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4292 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump Libav from v0.7.1 to v0.7-1241-g5f3fb59jstebbins2011-10-151-9/+12
| | | | | | | | | | | | Fixes VC-1 decode issue Adds partial support for interlaced VC-1 decode Adds ProRes decoder Fixes ac3 encoder dolby flag Fixes DCA frame size setting (delete patch A04) Fixes VC-1 repeat field processing (delete patch A05) Numerous other bug fixes and enhancements git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4291 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add flac + quality + compression level supportjstebbins2011-10-121-7/+59
| | | | | | | | | Adds flac audio to cli, lingui, and macgui Adds quality and compression level options to cli Adds quality option to lingui Quality option works for vorbis and lame git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4281 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix setting Libav codec private optionsjstebbins2011-08-121-6/+11
| | | | | | | | and logging of Libav advanced options. Thanks to Rodeo for spotting git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4170 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add more audio passthru optionsjstebbins2011-08-011-1/+1
| | | | | | | | | | | | | | | | | adds aac and mp3 passthru for mp4 and mkv containers adds dts and dtshd for mp4 container (mkv already had it) Note: The only player known (to me) to support dts(hd) in mp4 is ff/avplay In LinGui there is a new option to limit which passthru codecs will be used by the "Auto Passthru" audio codec options. The CLI already has this ability with "--audio_copy-mask" which is use in conjunction with the "copy" audio codec option. Also corrects some A/V sync issues when video frames are dropped due to a gap detected in the audio. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4149 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: encavcodecaudio improvementsjstebbins2011-07-241-19/+11
| | | | | | | | | | | | | Compute the output layout once in encavcodecaInit and store it in a member of the hb_encavcodeca work object. Fix the channel mapping of ffaac in our code rather than applying a patch to Libav. The Libav AAC encoder is bound to see a certain amount of commit activity since it needs to be improved. A patch affecting the AAC encoder is bound to break regularly git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4131 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: generalize channel remapping between decoders and encodersjstebbins2011-06-121-12/+2
| | | | | | | | Decoders set the channel map of their output in hb_audio_config_t. Encoders use this information to remap while encoding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4052 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: clean up AVCodecContext initializationsjstebbins2011-06-101-3/+2
| | | | | | | | also fixes warning message generated by libav when initializing "silence" sample about channel layout setting. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4038 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Enable multi-threaded decode in ffmpegjstebbins2011-06-081-1/+1
| | | | | | | | Enable both slice and frame based mutli-threaded decode in ffmpeg. Uses cpu_count/2 + 1 threads. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4034 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add ffaac encode supportjstebbins2011-06-081-1/+2
| | | | | | | | Adds "AAC (ffmpeg)" option to lingui and macui, "ffaac" option to cli. Does not yet remove faac. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4031 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix up usage of deprecated libav symbols and clean up patch fuzzjstebbins2011-06-071-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4030 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add support for libav aac encoder (libhb only)jstebbins2011-06-071-0/+293
This generalizes the ac3 encoder to make it easy to add support for any audio encoder that libav supports. Since ffaac is not quite ready, the cli and gui does not expose ffaac yet. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4029 b64f7644-9d1e-0410-96f1-a4d463321fa5