summaryrefslogtreecommitdiffstats
path: root/libhb/work.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Revision 4546 lost a call to hb_set_anamorphic_size, which in turn called ↵Rodeo2012-04-101-7/+12
| | | | | | | | | | hb_reduce on PAR values. Restore the call to hb_reduce, as the MacGui's custom anamorphic code doesn't reduce fractions on its own. Also, call hb_reduce after each modification to the PAR in libavcodec compatibility code. This should reduce the loss of precision somewhat, by avoiding another division when the divided PAR width & height can be reduced to values <= 255. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4583 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Activity Log: fix some typos and make indentation a bit more consistent.Rodeo2012-03-311-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4565 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: use x264_param_apply_fastfirstpass.Rodeo2012-03-281-0/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4551 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Rework filter pipelinejstebbins2012-03-271-114/+253
| | | | | | | | | | | | | | | | | | | | 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
* Add hb_apply_h264_level(). Sets and ensures compliance with the specified ↵Rodeo2012-03-241-4/+9
| | | | | | | | | | H.264 level. Does not modify framerate and resolution but prints warnings when they are incompatible with the requested level. Exposed to CLI users only via the --h264-level option. GUI support may come later, once we decide how to handle x264 presets/tunes/profiles. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4534 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add HB_INVALID_AUDIO_QUALITY define. -1 is valid for Vorbis VBR and thus ↵Rodeo2012-02-211-4/+4
| | | | | | | | | | doesn't work for this purpose. Fixes Vorbis VBR with --aq < 0 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4461 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Show P-to-P start and end times in activity logjstebbins2011-11-261-2/+32
| | | | | | | When start and end times are give in units of time or frames, show the appropriate start and end indications in the activity log. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4364 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Allow vorbis quality to go down to -0.2jstebbins2011-10-311-3/+3
| | | | | | | Bizzaro vorbis allows negative quality factors. They go to 11 in the wrong direction. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4332 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add flac + quality + compression level supportjstebbins2011-10-121-55/+117
| | | | | | | | | 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
* CLI: x264 preset, tuning, and profile supportjstebbins2011-10-021-0/+15
| | | | | | | | New cli options --x264-preset, --x264-tune, and --x264-profile. x264 preset and tune are set first, followed by any custom x264 option string, and finally the profile is applied. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4265 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Auto Passthru and audio/video encoder lists.Rodeo2011-09-191-56/+51
| | | | | | | | | | | | | | This adds Auto Passthru as another encoder in libhb. Used in LinGUI and CLI. MacGUI features a partial impplmentation (with hardcoded values), which is disabled for now. Also, audio and video encoders are now stored in "lists", like we previously did for mixdowns. New mixdown "None" (HB_AMIXDOWN_NONE) added to hb_audio_mixdowns (was previously declared in MacGUI/LinGUI). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4237 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix incorrect decrementing of audio->config.out.track; it starts at ↵Rodeo2011-09-091-5/+4
| | | | | | | | | | | | | | | | | | | 1, not 0. Also, explicitly log that we are dropping the track when we find an incompatible passthru. Fixes: [01:26:41] Sample rate 24000 not supported (ca_haac). Using 32kHz for track 1 track 1 suddenly becomes track 0: [01:26:41] work: sanitizing track 0 mixdown Dolby Pro Logic II to Stereo [01:26:41] work: sanitizing track 0 audio bitrate 160 to 80 […] [01:26:41] * audio track 0 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4210 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix setting Libav codec private optionsjstebbins2011-08-121-2/+7
| | | | | | | | 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
* libhb: allow changing colorimetry in x264 optionsjstebbins2011-08-081-2/+2
| | | | | | | | Setting "colorprim", "transfer", or "colormarix" in the x264 advanced options will no longer be ignored and will propagate to the mp4 muxer where those values also get set in the container. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4164 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add more audio passthru optionsjstebbins2011-08-011-0/+2
| | | | | | | | | | | | | | | | | 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: fix or simplify several hacks involved with Libav supportjstebbins2011-07-271-42/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For files that are demuxed by Libav, we must share the format context with the decoder iso that it can obtain the codec context for each stream. The code that did this was very convoluted and difficult to understand. It is simplified by simply passing the context in hb_title_t. Reader was closing stream files before the decoder was finished with the context. This created the need to delay the actual close and cache the context. Changed reader so it behaves more like the rest of handbrake's work objects which lets us explicitly close after the decoders are finished. Libav does some probing of the file when av_find_stream_info is called. This probing leaves the format context in a bad state for some files and causes subsequent reads or seeks to misbehave. So open 2 contexts in ffmpeg_open. One is used only for probing, and the other only for reading. decavcodec.c had 2 separate decoders for files demuxed by hb and files demuxed by Libav. They have been combined and simplified. Previously, it was not possible to decode one source audio track multiple times in order to fan it out to multiple output tracks if the file is demuxed by Libav. We were using the codec context from the format context. Since there is only one of these for each stream, we could only do one decode for each stream. Use avcodec_copy_context to make copies of the codec context and allow multiple decodes. This allows removal of a lot of special case code for Libav streams that was necessary to duplicate the output of the decoder. Patch Libav's mkv demux to fix a seek problem. This has been pushed upstreams, so the next time we update Libav, we must remove this patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4141 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add DTS-HD passthru \o/jstebbins2011-06-141-14/+22
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4055 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add support for libav aac encoder (libhb only)jstebbins2011-06-071-2/+15
| | | | | | | | | 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
* libhb: fix crash when x264 fails to initializejstebbins2011-06-061-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4025 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Macgui: libhb, MacGUI: reflect the fact that DRC only applies to ↵dynaflash2011-05-191-1/+1
| | | | | | | | | non-passthru AC3 sources - As per https://reviews.handbrake.fr/r/74/ -Patch by Rodeo, Thanks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3983 b64f7644-9d1e-0410-96f1-a4d463321fa5
* HE-AAC support for the OSX port. Thanks go to amarcus, ritsuka and rodeo.sr552011-04-181-1/+20
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3937 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add audio gain adjustment to libhb and CLIjstebbins2011-04-051-0/+4
| | | | | | | | New CLI option is --gain <float>. Value is measured in dB. Negative values are quieter, positive values are louder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3902 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make logging of audio and subtitle id's more consistantjstebbins2011-04-021-3/+3
| | | | | | | | | | | | 1) whenever we log audio->id or subtitle->id using hex formatting, precede the hex with 0x (which was already done in some places but not others) 2) format audio->id as hex instead of decimal in sync.c (makes it much easier to see which track "went backwards" or had silence added to it, checking the job configuration logged by work.c) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3898 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Simplify a lot of subtitle handling code.jstebbins2011-03-271-16/+0
| | | | | | | Makes it easier to read. Gets rid of some unnecessary variables. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3886 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove legacy % to RF mapping.jstebbins2011-03-211-5/+1
| | | | | | | | | | Although the % option has been gone for a while in the cli and gui's, there were some mappings happening in libhb and for preset imports. This removes the last vestages of % quality mapping. Thanks to Rodeo for the patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3857 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add mpeg-2 encoding support to libhb, cli, and linguijstebbins2011-03-191-5/+14
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3853 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix 2 pass cfr x264 crashjstebbins2011-03-131-5/+1
| | | | | | | | | | | An error in interjob->vrate calculation lead to specifying a different timebase for the 1st and 2nd pass which x264 does not allow. This improves the interjob->vrate calculation accuracy and also guarantees the timebase is the same on both passes regardless of the calculations accuracy. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3848 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add parameter parsing and b-frame support to ffmpeg mpeg-4 encoderjstebbins2011-03-111-2/+2
| | | | | | | | | | | | | The cli will now accept ':' separated parameters using the '-x' option for ffmpeg mpeg-4. The linux gui has an entry box on the advanced tab to add options. The option keys and values are the same as what the ffmpeg command line allows. Calculation of DTS timestamps was added to encavcodec.c in order to allow out of order b-frames. The algorithm is similar to what x264 uses. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3839 b64f7644-9d1e-0410-96f1-a4d463321fa5
* make keyint match between 1st and 2nd passes of vfr and pfr encodes.jstebbins2011-03-081-14/+31
| | | | | | | | | | | | make keyint and fps settings consistent across video encoders. make interjob->vrate changes for pfr mode like we do for vfr since pfr is the same as vfr except when it hits it's peak. in mkv, set track default duration to actual measured vrate on 2 pass encodes. thanks to Rodeo for the corrections in encx264 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3831 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove depreciated cpu count from the apisr552011-02-261-9/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3813 b64f7644-9d1e-0410-96f1-a4d463321fa5
* plug some memory leaks.jstebbins2011-02-121-2/+14
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3797 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix ffmpeg multiple audio decode issuejstebbins2011-01-171-30/+56
| | | | | | | | we can now have one ffmpeg audio input track fan out to multiple output tracks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3753 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix problem with large ssa subtitle batches stalling the pipeline.jstebbins2011-01-151-1/+11
| | | | | | | | ssa subtitles can come in a large batch. since each subtitle gets it's own buffer, a large batch of them was filling the fifo and causing a stall. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3748 b64f7644-9d1e-0410-96f1-a4d463321fa5
* cli: allow setting modulus with ana-nonejstebbins2010-12-171-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3711 b64f7644-9d1e-0410-96f1-a4d463321fa5
* prevent crash with strict ana and non-mod-2 dimensions.jstebbins2010-12-171-0/+1
| | | | | | | and make par computation in loose ana a little more accurate. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3710 b64f7644-9d1e-0410-96f1-a4d463321fa5
* clean up crufty legacy codejstebbins2010-10-231-18/+0
| | | | | | | remove unused code relating to avi, ogm, psp, ipod, and forcing h264 levels git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3622 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use libhb functions for mixdown and bitrate defaults in the clijstebbins2010-10-231-6/+48
| | | | | | | sanitize mixdown and audio bitrates in work.c git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3620 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add build option --enable-ff-mpeg2 to use ffmpeg for mpeg2 decodingjstebbins2010-10-231-0/+7
| | | | | | | instead of mpeg2dec. disabled by default. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3610 b64f7644-9d1e-0410-96f1-a4d463321fa5
* print more accurate log message when mixdown is not setjstebbins2010-10-091-8/+17
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3588 b64f7644-9d1e-0410-96f1-a4d463321fa5
* cli: make smarter mixdown decision when doing ac3 encode fallbackjstebbins2010-10-081-80/+35
| | | | | | | | | | | | | also, clean up the mixdown sanitizing logic in work.c added new functions hb_get_default_mix(codec, layout) hb_get_best_mix(codec, layout) These take the output codec and the input layout as parameters. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3580 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add ac3 encodingjstebbins2010-10-041-17/+27
| | | | | | | Uses ffmpeg's ac3 encoder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3570 b64f7644-9d1e-0410-96f1-a4d463321fa5
* SSA subtitle burn injstebbins2010-09-281-5/+3
| | | | | | | | | | Anime fans rejoice! This patch adds SSA subtitle burn-in support with libass. Therefore SSA subtitles should now be rendered in full quality, with the appropriate embedded fonts and positioning information. Thanks to davidfstr git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3557 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix crash due to processing invalid buf_out from workjstebbins2010-07-041-0/+3
| | | | | | | | | | if the work function doesn't null out buf_out (as decavcodecvWork) then buf_out can be garbage, or worse a prevously used buffer. I'm flabbergasted this has never bitten me before. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3426 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix some preset issuesjstebbins2010-07-031-0/+8
| | | | | | | | | | | add b-pyramid=none to appletv presets and remove b-pyramid hack from encx264.c change samplerate from 48 to 'Auto' in all presets cap samplerate to 48khz since none of the encoders support higher rates remove obsolete UsesMaxPictureSettings from all presets. replace with UsesPictureSettings=2 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3424 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Preserve subtitle track that matches foreign audio search when thejstebbins2010-06-261-7/+8
| | | | | | | | resulting output track would not be an exact duplicate. We were removing the track even when forced flags differed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3407 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: missed another conditional that forces burned subs in mp4jstebbins2010-06-081-0/+1
| | | | | | | | also, print "Foreign Audio Search" instead of "Render/Burn in" in the log during an indepth_scan. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3373 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add SSA subtitle supportjstebbins2010-06-011-4/+10
| | | | | | | Thanks to davidfster git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3342 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add more subtitle info to the activity logjstebbins2010-06-011-8/+20
| | | | | | | | | adds forced and default flags for all types adds offset and character codeset for SRT Thanks Rodeo. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3341 b64f7644-9d1e-0410-96f1-a4d463321fa5
* allow mono mixdown with lame encoderjstebbins2010-05-131-29/+6
| | | | | | | | | | enable mono mode in lame encoder when mixdown is mono. use lame_encode_buffer_float instead of lame_encode_buffer_interleave. this eliminates the clipping issue in lame without reducing the level of the input. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3294 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Universal Text Subtitle Support Initial Implementationdynaflash2010-05-041-0/+21
| | | | | | | | | | | | | - Patch by davidfstr ... Thanks! - Adds support for reading TEXT subtitle tracks from file inputs - Tested combinations: -- MKV UTF-8 -> MKV UTF-8 (passthru) -- MKV UTF-8 -> MP4 TX3G (upconvert) -- MP4 TX3G -> MKV UTF-8 (downconvert) -- MP4 TX3G -> MP4 TX3G (downconvert to UTF-8 then upconvert) - Further explained here http://forum.handbrake.fr/viewtopic.php?f=4&t=16099 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3283 b64f7644-9d1e-0410-96f1-a4d463321fa5