summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* fix some floating point rounding errors in aspect ratio calculationsjstebbins2008-12-052-4/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2009 b64f7644-9d1e-0410-96f1-a4d463321fa5
* More code to deal with the flakey streams from NZ TV. They like to change ↵van2008-12-055-33/+18
| | | | | | the PCR without sending a new PCR and we get big timestamp changes but no new reference clock. So now we look at the PTS and if its change is outside a tolerance window we use the new PTS as a PCR & declare a clock discontinuity. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2008 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb:sr552008-12-041-1/+8
| | | | | | The malloc() function in cygwin doesn't return 16-byte aligned memory which causes it to randomly crash. Replaced with memalign() for the cygwin platform only. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2006 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - validate frame sync the way the standard suggests (via checking the frame ↵van2008-12-042-97/+169
| | | | | | | | | | | | crc) rather than looking at multiple frames. This should reduce the probability of mis-identifying random junk as AC-3 to less than 1 in 2^32. - check the crc on every frame so we don't let corrupted data into the decoder. - interpret the PTS as per the standard (it's the time of the first frame that starts in the packet, not the time of the first byte of the packet). Incorrect interpretation was resulting in an average 15ms timing error (worse case 31ms). - do all the PTS calculations in doubles so we don't get round-off error that will desync the audio & video with 44.1KHz audio sources (these can't appear on DVDs but do show up in avi/mkv/... files). - don't rely on the container to give us large enough frame fragments to validate the sync (some containers split audio frames into really small pieces). Instead use the 8K of unused space in the esconfig of the audio object as an accumulation buffer. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2002 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Elementary streams that scan couldn't type as audio streams have to be ↵van2008-12-041-15/+56
| | | | | | | | | | completely ignored - some of these don't follow the normal PES packet encoding so feeding them downstream to the demuxer will cause strange timing and other problems. - make log message correctly reflect our uncertainty about audio stream type so people don't complain about missing AC-3 audio when it isn't really there. - add missing av_free_packet in VC-1 keyframe search. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2001 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Found the ffmpeg initialization problem with VC-1 video. jstebbins2008-12-032-12/+115
| | | | | | | So now we can use our own demuxer for streams with VC-1. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1995 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - allow titles with video but no audio.van2008-12-021-9/+4
| | | | | | | - don't throw away previews just because we hit eof while trying to find audio info. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1993 b64f7644-9d1e-0410-96f1-a4d463321fa5
* I suspect that eddyg's r1987 didn't really want to totally break transport ↵van2008-12-021-0/+5
| | | | | | and program streams ... git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1992 b64f7644-9d1e-0410-96f1-a4d463321fa5
* git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1991 ↵sr552008-12-021-1/+1
| | | | b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add metadata support to libhb, add importing of MP4 metadata, add export of ↵eddyg2008-12-0211-128/+460
| | | | | | MP4 metadata, add importing of MP4 chapters, add seek to chapter for input files, add new libmp4v2, remove old MP4 chapter muxing - now in libmp4v2. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1987 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix one massively stupid & one moderately stupid bug I introduced into the ↵van2008-11-301-2/+21
| | | | | | DTS PTS handling. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1976 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds two new parameters to hb_scan, to control the number of preview frames ↵jbrjake2008-11-306-30/+52
| | | | | | | | generated during scan, and whether or not they're written to disk for later display. This will break any interfaces that use hb_scan until the new params are specified...sorry. Also adds a new job->seek_points setting (set this to the same as the number of previews) to be used with job->start_at_preview when doing live preview encodes, so the seek function has a frame of reference. Wires up the CLI with a --previews option (long option only) to control the new scan parameters, and defaults the CLI to not writing previews to disk. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1970 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't allow multiple decodes of the same ffmpeg audio stream. Because ffmpeg ↵van2008-11-291-4/+22
| | | | | | | | | mixes stream reader state with decoder state we only have one decoder instance for the streamso multiple decode requests will garble the audio and/or cause an abort. (Since the Universal preset specifies AC-3 passthru, using it on non-ac3 audio caused a second decode of the first audio track to be requested which triggered this bug and resulted in lots of aborts for wmv & avi conversions.) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1969 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix 5.1 channels map for vorbis.ritsuka2008-11-271-6/+19
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1965 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - add John A. Stebbins' changes to handle TrueHD and DTS-HD multiplexed ↵van2008-11-256-370/+401
| | | | | | | | | | streams. - give transport streams their own demuxer rather than constructing fake PS packets to use the DVD demuxer. - start re-doing the transport stream code so it does fewer memory to memory copies. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1953 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - get rid of an unnecessary seek that was messing up either mkv or vc1 ↵van2008-11-191-2/+16
| | | | | | | | | | decoding. - switch av_seek_frame to zero back to time-based rather than byte-based since time-based screws up mkv & mp4 while time-based works for everything but vc1. - since ffmpeg doesn't correctly indicate key frames in vc1 look for them ourselves so that vc1 previews & cropping will work. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1927 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't abort when the ffmpeg vc1 decoder hands us a bogus packet sizevan2008-11-181-0/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1925 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - search for IDR frames in blu-ray (m2ts) inputs so we get useful previewsvan2008-11-161-5/+35
| | | | | | | - don't require a key frame after we seeking to the beginning of the file (this was probably causing the leading PPS & SPS of some blu-ray h.264 content to get dropped which resulted in a few seconds of missing video). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1923 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix pmt processingjstebbins2008-11-111-14/+24
| | | | | | | | | | | | | | there were 2 problems 1. when the program list in the pat contains a network PID, the pmt parsing code doesn't properly skip this entry. this causes attempts to interpret a pat as a pmt since the pid entry in the table is left initialized to 0. 2. pmt parsing always waits till the start of the second pmt section before parsing the first. if for some reason there were only one pmt in the stream, it would never parse the pmt. I've changed it to parse the pmt as soon as all the necessary bytes are collected. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1916 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb support for live previewjstebbins2008-11-113-29/+65
| | | | | | | | set job->start_at_preview to the preview frame you want to start at set job->pts_to_stop to the number of 90khz ticks duration git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1915 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bumps libtheora to 1.0 final and fixes a small problem with r1905's chroma ↵jbrjake2008-11-091-1/+1
| | | | | | rounding re: Theora. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1909 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Hack to make VC1 work: If we get a ts or m2ts with VC1 video, don't say we ↵van2008-11-091-0/+16
| | | | | | have a valid stream. This will cause HB to try to open it with ffmpeg which often can read VC1 TS streams. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1908 b64f7644-9d1e-0410-96f1-a4d463321fa5
* If 'auto' audio output rate is selected and that results in an invalid rate ↵van2008-11-091-0/+37
| | | | | | for AAC, select the next higher valid rate. This should make wmv's & avi's with weird audio rates more likely to work with the default HB settings. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1907 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Correct chroma size for raw video frames - width & height need to be rounded ↵van2008-11-0813-29/+41
| | | | | | up if they're odd before dividing by 2. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1905 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Always use HandBrake's DTS decoder rather than ffmpeg's even for inputs ↵van2008-11-082-6/+23
| | | | | | | | | | we read via ffmpeg so that we get the user-specified mixdown. Otherwise we eventually abort in the sample rate converter or audio encoder. - Teach HB's DTS coder to handle implicit timestamps so that it doesn't screw up on mkv's & some m2ts inputs. - mkv's produced from Bluray HD content seem to have large timestamp errors - filter them out in the decoder so that sync doesn't drop big chunks of our audio. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1904 b64f7644-9d1e-0410-96f1-a4d463321fa5
* clean up picture allocation in hb_get_preview and fix minor picture corruptionjstebbins2008-11-071-9/+12
| | | | | | | that happens when the width is not divisible by 8. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1901 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Minor tweaks the job config display for the COLR atom: only show when not ↵jbrjake2008-11-011-9/+3
| | | | | | using a default value, display with the name "color matrix" instead of "color space" to avoid confusion with conversions to YUV420 planar color space, and appear with the other container settings instead of video settings. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1889 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix for mpeg content that changes size in the middle of a decode (such as ↵van2008-10-301-17/+66
| | | | | | | | | Doctor Who season 1 disc 2 title 4). Problem reported in http://forum.handbrake.fr/viewtopic.php?f=4&t=4306 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1880 b64f7644-9d1e-0410-96f1-a4d463321fa5
* ETSI TS 102 366 V1.2.1 compliant AC3 in MP4, replaces older hacked version ↵eddyg2008-10-295-2/+123
| | | | | | that was hardcoding the AC3 stream information in the dac3 atom based on the AppleTV startup movie stream. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1879 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Get rid of the black frame & long silence at the beginning of avi & wmv ↵van2008-10-261-0/+8
| | | | | | files that have a non-zero 'start' specified in their header. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1868 b64f7644-9d1e-0410-96f1-a4d463321fa5
* If an input uses a different color space than YUV420 (for example DV video ↵van2008-10-261-9/+49
| | | | | | uses YUV411) convert it to YUV420. Also, scale down inputs that have an odd width or height since h.264 requires that the width and height be even. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1867 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added support for extracting the audio and subtitle types and adding those ↵eddyg2008-10-233-5/+86
| | | | | | to the audio and subtitle names, e.g. Director's Commentary. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1863 b64f7644-9d1e-0410-96f1-a4d463321fa5
* This should fix the flickering line bugs with deinterlace and decomb. Yadif ↵jbrjake2008-10-232-25/+120
| | | | | | needs the edges mirrored, and decomb's cubic interpolation has to be disabled at the tops and bottoms of frames. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1862 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bumps libmp4v2 to r36, which fixes the problem with QuickTime reading ↵jbrjake2008-10-221-1/+1
| | | | | | non-H.264 video, and also features a snazzy new layout and build routine thanks to KonaBlend (which necessitated a minor change to the include path for muxmp4.c). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1859 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Ooops, I wanted height not width there.jbrjake2008-10-191-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1852 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds a configuration option for whether the COLR atom and h.264 VUI header ↵jbrjake2008-10-194-3/+37
| | | | | | should signal Bt.601 or Bt.7709 color, instead of just setting it based on whether the source is standard or high definition (which is preserved as default, and made more sensitive to letterboxed HD content). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1851 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix bug which prevented AC3 sync when only one AC3 packet was located in the ↵eddyg2008-10-191-2/+3
| | | | | | buffer. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1850 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds a logging message to let the user know when a title is being ignored ↵jbrjake2008-10-181-0/+1
| | | | | | due to having no audio, since it seems to mystify some people. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1845 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Minor tweak to how audio track names are displayed.jbrjake2008-10-181-2/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1844 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Makes sure loose anamorphic respects max width and height settings, and ↵jbrjake2008-10-182-62/+12
| | | | | | removes a bunch of code by repurposing MULTIPLE_MOD() (thanks j45!). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1843 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't announce when getting a bad AC3 sync, just silently look for two ↵eddyg2008-10-161-3/+1
| | | | | | matching syncs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1838 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bumps libmp4v2 to r21, which fixes that include issue by folding the old ↵jbrjake2008-10-153-3/+3
| | | | | | 5.5G iPod UUID atom into the library, as well as a typing issue with Linux systems. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1836 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Switches from mpeg4ip's copy of libmp4v2 to an independently-maintained one ↵jbrjake2008-10-151-24/+9
| | | | | | located at: code.google.com/p/mp4v2 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1833 b64f7644-9d1e-0410-96f1-a4d463321fa5
* a52_syncinfo() returns garbage values sometimes, so when scanning a stream ↵eddyg2008-10-141-1/+17
| | | | | | check for two AC3 packets in a row that agree on their values before accepting them as gospel. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1832 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Only associate audio tracks with an alternate group if there's more than one ↵jbrjake2008-10-111-6/+8
| | | | | | audio track. That way the iPhone doesn't show the audio selection button when it isn't necessary. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1828 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make DTS and HDMV DTS audio work in Transport and m2ts streams.van2008-10-111-8/+14
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1827 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: Add support for naming audio tracks to the HandBrakeCLI, thanks to ↵eddyg2008-10-104-9/+30
| | | | | | LePetomane for the patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1825 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix linux compilation. Only set the pthread mutex type on cygwin ↵eddyg2008-10-101-0/+3
| | | | | | since it is the only one that is using the wrong one as a default. Avoids having to get the enums right across OS's. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1824 b64f7644-9d1e-0410-96f1-a4d463321fa5
* After discussion with eddyg, extending verbose logging level 2 from just ↵jbrjake2008-10-099-23/+23
| | | | | | memory-related logging to general-purpose housekeeping--stuff that isn't necessary when scrolling through activity logs users submit with bug reports and support queries. This includes things like thread start/exit messages and preview frames. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1820 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds an hb_deep_log() function for multiple levels of debugging verbosity. ↵jbrjake2008-10-093-4/+49
| | | | | | Level 1 displays when hb_log does (job->verbose == 1) and is now meant for logging that helps in tech support. Level 2 adds memory-related logging like freed buffers, and level 3 is for granular stuff that displays once per sample, frame, packet, etc. The debug level continues to be set when hb_init() is called. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1819 b64f7644-9d1e-0410-96f1-a4d463321fa5