summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* Cosmetic after last commit.Rodeo2012-03-311-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4569 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: cleanup.Rodeo2012-03-311-33/+33
| | | | | | | | | | | | | | libx264 can detect the CPU count, so no need to set the number of threads. We now use the x264 default, even when sliced threads are enabled. Move some initializations until after parsing job->advanced_opts. Width, height and annexb aren't meant to be set by the user. Only get a new temporary filename if we're actually doing 2-pass encoding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4568 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Activity Log: fix some typos and make indentation a bit more consistent.Rodeo2012-03-312-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4565 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix cfr encodingjstebbins2012-03-315-121/+148
| | | | | | | | | | | | when frames are duplicated, the frame was not copied properly and resulted in divide by 0 later when the frame is processed. This fix is a bit larger than the minimum size necessary to fix the problem. I took the oportunity to clean up some buffer initialization and copy operations. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4563 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add hb_dict_unset and hb_dict_to_encopts.Rodeo2012-03-312-1/+49
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4562 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix problem with TS streams that have no PAT or PMTjstebbins2012-03-301-14/+22
| | | | | | | Fall back to using libav in this case. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4560 b64f7644-9d1e-0410-96f1-a4d463321fa5
* cqm=/some/path has the same effect as cqmfile=/some/path AND ↵Rodeo2012-03-291-0/+1
| | | | | | | | | | param.psz_cqm_file overrides param.i_cqm_preset so you can effectively use cqm in place of cqmfile (but not the opposite). Thus, add it to the x264_encopt_synonyms array. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4559 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level: avoid division by zero due to some x264_param_t fields ↵Rodeo2012-03-291-4/+16
| | | | | | being uninitialized. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4558 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb/hd_dict.c, add newline at end of file.Rodeo2012-03-292-2/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4556 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_dict: cosmetics.Rodeo2012-03-291-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4555 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: add functionality to retrieve the "preferred" option name for ↵Rodeo2012-03-296-4/+46
| | | | | | options that have multiple names. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4554 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_dict: minor improvements.Rodeo2012-03-291-7/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4553 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: use source colorimetry information when available.Rodeo2012-03-286-26/+211
| | | | | | | | | When source colorimetry can't be determined, guess. Added code to guess PAL SD content and updated code to guess HD content. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4552 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: use x264_param_apply_fastfirstpass.Rodeo2012-03-283-0/+15
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4551 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add basic dictionary implementation.Rodeo2012-03-284-91/+247
| | | | | | | | Note: under OS X, this commit may require a full rebuild to work properly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4550 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: fix commit 4546 so it works on os x which is the filter pipeline ↵dynaflash2012-03-281-8/+5
| | | | | | | | rework from j45. - libhb fix by Rodeo git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4547 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Rework filter pipelinejstebbins2012-03-2751-2830/+3429
| | | | | | | | | | | | | | | | | | | | 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 hb_apply_h264_level. x264_sps_init doesn't yet take VBV into account ↵Rodeo2012-03-251-5/+18
| | | | | | when setting the H.264 profile. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4541 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Misc. improvements to the previous commit.Rodeo2012-03-242-26/+69
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4535 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add hb_apply_h264_level(). Sets and ensures compliance with the specified ↵Rodeo2012-03-244-8/+174
| | | | | | | | | | 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
* Fix loop counter decrement in CFR frame duplication code. CFR would never ↵Rodeo2012-03-211-1/+1
| | | | | | duplicate a frame more than once, causing major A/V desync when the output framerate was over twice that of the input. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4523 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add framerate values for 30, 50, 60000/1001 and 60 fps.Rodeo2012-03-191-1/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4518 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix problem with early termination when stream has no PCRsjstebbins2012-03-181-0/+9
| | | | | | | | | A prior change I made fixed an issue with misdetection of discontinuities, but it created this early termination problem. I didn't see it because all my PCR-less samples were less than 5 minutes. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4514 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix detection of streams in tivo capturesjstebbins2012-03-181-1/+4
| | | | | | | | | Tivo creates an initial program stream map that is incomplete, missing the video stream definition. So don't quit scanning for new streams after seeing the first program stream map. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4513 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix p-to-p start time detectionjstebbins2012-03-041-2/+0
| | | | | | | Brainfart caused start time detection in TS files to break. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4488 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add HB_INVALID_AUDIO_QUALITY define. -1 is valid for Vorbis VBR and thus ↵Rodeo2012-02-214-9/+12
| | | | | | | | | | 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
* Print more Auto Passthru information to the Activity Log: passthru mask ↵Rodeo2012-02-172-2/+76
| | | | | | (allowed codecs), fallback encoder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4454 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Set default audio compression in hb_autopassthru_apply_settings to get rid ↵Rodeo2012-02-171-0/+1
| | | | | | of an annoying warning in the log. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4453 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use libdca to decode DTS-ES audio. While the Libav DTS decoder gives us an ↵Rodeo2012-02-011-11/+7
| | | | | | extra channel, we can't do anything with it for the time being. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4430 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use more correct check to detect 6.0/6.1 input.Rodeo2012-02-012-2/+2
| | | | | | | | The old check didn't cause any issues in practice, but wasn't 100% correct. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4429 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update hb_ff_dts_request_5point1 to work with DTS-ES 6.0 Distcrete sources ↵Rodeo2012-01-314-22/+24
| | | | | | | | | | | | | | | | | | | | | (decode the DTS 5.0 core). Rename it to hb_ff_dts_disable_xch. Tested with: M2TS -> regular DTS 5.1 -> DTS-ES 6.1 Discrete MKV -> regular DTS 5.1 -> DTS-ES 6.0 Discrete -> DTS-ES 6.1 Discrete git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4428 b64f7644-9d1e-0410-96f1-a4d463321fa5
* ca_aac: set minimum VBR quality to 1 instead of 0.Rodeo2012-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | That way, (high-low)/granularity divides cleanly by 1. Old qualities (low to high in increments of granularity): { 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126 } (the default, 91, is not in that list) New qualities (low to high in increments of granularity): { 1, 10, 19, 28, 37, 46, 55, 64, 73, 82, 91 (default), 100, 109, 118, 127 } Actual output is unchanged (ca_aac has quality ranges; a 1-point bump will not change the range for each quality). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4422 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Vorbis: adjust default VBR quality after revision 4385.Rodeo2012-01-251-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4421 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix crash in add_ffmpeg_attachment: the value for "filename" metadata may be ↵Rodeo2012-01-241-1/+1
| | | | | | | | | | NULL, so we can't call strlen without checking. Should fix https://forum.handbrake.fr/viewtopic.php?f=11&t=23018 and https://forum.handbrake.fr/viewtopic.php?f=12&t=23101 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4420 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve mpeg-ps detectionjstebbins2012-01-141-0/+20
| | | | | | | | Make mis-detects less likely by checking all the marker bits in the pack header. This makes it much less likely that we will be spoofed by data that looks like a pack header. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4406 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
* Add path to log when decoding previews in batch scanjstebbins2011-12-291-1/+8
| | | | | | The title number isn't very helpful in batch scan mode. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4391 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use -2 to 10 range for Vorbis audio quality (same as what oggenc uses), ↵Rodeo2011-12-232-4/+5
| | | | | | instead of the native libvorbis API values. This is what users will expect. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4385 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix overlapping vobsubsjstebbins2011-12-221-10/+8
| | | | | | | | | vobsubs that don't have a stop time were persisting too long and being displayed under the next vobsub in the video. We don't need to guess the stop time of the vobsub. sync already handles unknown stop times for subtitles. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4383 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add utilities for debugging fifo and buffer poolsjstebbins2011-12-211-0/+166
| | | | | | | They are all ifdef'd out and not used anywhere. Enable and use as needed when fifo issues crop up. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4381 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix corruption of buffer pools by render subsjstebbins2011-12-211-0/+4
| | | | | | | A subtitle buffer's "next" pointer was being modified after the buffer was closed which corrupts the buffer pool. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4380 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
* Align stack of all threads created by libhbjstebbins2011-11-182-1/+12
| | | | | | | This is a preemptive measure to prevent any future crashes in SSE code that requires 16 byte stack alignment. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4358 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix out of memory condition on mingw32jstebbins2011-11-151-7/+4
| | | | | | | | | realloc doesn't really release memory under most circumstances, so it's not suitable for reducing the size of an hb_buffer_t. So instead, allocate a new smaller buffer, copy the data, and return the old larger buffer to the buffer pool for reuse. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4353 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make sure decvobsub.c generates valid timestampsjstebbins2011-11-152-4/+29
| | | | | | | | | sync.c expects that timestamps will all be resolved by the time buffers reach it. Reader will invalidate timestamps while waiting to resynchronize the SCR. So decoders (inparticular decvobsub) need to extrapolate timestamps when they are not supplied. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4352 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix interleaving of subtitles in muxerjstebbins2011-11-143-8/+32
| | | | | | | | | | | | | Specifically, this affects closed captions which are pushed into the pipeline very late. CC's are dribbled in 2 bytes per video frame. The entire CC that we put into a subtitle frame isn't available till we see the signal for the end of the CC. This can be several seconds after it began. So I have established a minimum buffer size that the muxer accumulates before it outputs any data. This allows CCs to get into the pipeline before the muxer outputs the interleave interval that they belong in. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4351 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix spurious audio compression & quality log warningjstebbins2011-11-141-0/+2
| | | | | | | quality and compression_level were not getting initialized to -1 for passthru. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4350 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Disable multi-threaded decoding of ProResjstebbins2011-11-131-2/+5
| | | | | | | It causes artifacts in some videos git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4346 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix closed captioning crashjstebbins2011-11-101-0/+3
| | | | | | | | Prevent the same CC buffer from being attached to multiple tags. The same buffer would get pushed to a fifo multiple times and ultimately freed multiple times. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4345 b64f7644-9d1e-0410-96f1-a4d463321fa5
* revert an ffmpeg reader changejstebbins2011-11-091-31/+23
| | | | | | | I did this a while back to improve seek performance for some samples that are demuxed by ffmpeg. But it causes crashes with some file types. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4343 b64f7644-9d1e-0410-96f1-a4d463321fa5