summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Change pthread mutex's to be explicitly NORMAL instead of relying on the ↵eddyg2008-10-061-1/+6
| | | | | | default on a per OS basis. Cygwin was using RECURSIVE as a default, which does not block the caller upon a second lock. This commit fixes decomb, and slow, and slower deinterlace on Windows. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1817 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Try to drive the stream timing off the audio stream(s) since audio has a pts ↵van2008-10-051-4/+24
| | | | | | on every frame while video typically has one on <10% of the frames. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1813 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Sanity check in encfaacClose or we'll abort on an illegal channel spec or ↵van2008-10-041-6/+23
| | | | | | sample ratesince init sets job->die which causes close to be called when the work struct hasn't been fully set up. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1812 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Only do 'lost PCR' checks (r1712) when we're dealing with something that ↵van2008-10-035-3/+19
| | | | | | | | | could be an over-the-air transport stream. We can't lose the clock of a program stream and shouldn't have losses on an m2ts stream. - Widen the DTS-to-PCR acceptance window from +-5sec to +-5min since there's nothing in the standard that bounds the offset between a DTS and its clock reference. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1802 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CygWin:sr552008-09-301-0/+4
| | | | | | - Fixes make building on cygwin (I think - I was seeing some cygwin lib errors before however these seem to have just disappeared. If anyone has a failed build due to this, let me know.) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1796 b64f7644-9d1e-0410-96f1-a4d463321fa5
* ffmpeg requires framerate num/den to be reducable to 16 bit quanitites forjstebbins2008-09-301-2/+28
| | | | | | | | | mpeg-4. So round odd framerates to "close" standard framerate (which are reducable). If there is no "close" framerate, the the rate is truncated down to 16 bits. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1795 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Zero out the mask bitmap properly in decomb. Thanks for finding this and ↵jbrjake2008-09-301-1/+1
| | | | | | providing the solution, j45! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1791 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update ffmpeg from version r14737 to r15462.eddyg2008-09-291-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1788 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Wait until 4 frames are stashed in the delay_queue before outputting any ↵jbrjake2008-09-291-2/+1
| | | | | | frames from render when using VFR detelecine. With only 3, the array storing previous time stamp isn't full when the first frame's outputted, throwing off AV sync. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1787 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't display a mixdown in the job settings for passthrough audio tracks.jbrjake2008-09-291-4/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1783 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Now that the interfaces don't set job->vfr to 1 unless detelecine is ↵jbrjake2008-09-261-28/+8
| | | | | | | | enabled, libhb doesn't have to make sure the filter is on. Also adds a sanity check to make sure frames aren't dropped in the AVI container, for those masochstic enough to use the format. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1774 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Sets the default QP of deblock to 5 instead of 0. This way the filter ↵jbrjake2008-09-241-1/+1
| | | | | | actually does something when called without an option string besides copying input to output. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1758 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Spit out the average encoding speed in the verbose log at the end of a job.jbrjake2008-09-191-0/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1727 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bring libhb in line with x264's new default subme level of 6.jbrjake2008-09-191-3/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1724 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Threaded decomb filter. Folds in eddyg's threaded yadif from r1628 and also ↵jbrjake2008-09-191-37/+435
| | | | | | analyzes cpu-count segments of the frame in parallel when generating the combing mask used to decide which frames to send to yadif. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1720 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Filter timestamps to prevent missing/incorrect Transport Stream PCRs messing ↵van2008-09-171-0/+19
| | | | | | up A/V sync. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1712 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bug fix to r1691: had the offsets for PTS & DTS reversed so we were trying ↵van2008-09-161-7/+7
| | | | | | to grab a DTS when there wasn't one. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1705 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Another bug fix in the per-stream timing code: If the clock reference ↵van2008-09-161-7/+29
| | | | | | changes on the first buffer of a stream we haven't seen before we don't have the history we need to compute a clock offset & need to wait for a stream we've been tracking. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1704 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a couple problem exposed through some valgrind testing. use of freedjstebbins2008-09-152-3/+7
| | | | | | | memory in detelecine and use of uninitialized memory in decmpeg2 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1700 b64f7644-9d1e-0410-96f1-a4d463321fa5
* If we always sort timestamps we can't detect & correct misordering caused by ↵van2008-09-151-16/+26
| | | | | | an SCR discontinuity. So only sort timestamps on streams that could have been broken by Microsoft (ffmpeg avi, wmv, mkv & mp4) and leave mpeg PS, TS & M2TS steams alone. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1699 b64f7644-9d1e-0410-96f1-a4d463321fa5
* The difference of two timestamps referenced to different clocks is a random ↵van2008-09-151-5/+7
| | | | | | number & not useful input to the average frame size computation. This major brain-o would occasionally cause huge average frame times which, when later used to compute the SCR correction, would result in large gaps in the audio and/or video streams. Fixed by always computing the average frame size from the scr-corrected timestamps. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1698 b64f7644-9d1e-0410-96f1-a4d463321fa5
* HD Home Run seems to strip the PCR from some streams (which makes HB refuse ↵van2008-09-121-6/+29
| | | | | | to process them) so use the video stream DTS as a substitute until the first real PCR appears. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1691 b64f7644-9d1e-0410-96f1-a4d463321fa5
* check return value of opendir in hb_close. hb_close was segfaulting whenjstebbins2008-09-111-9/+12
| | | | | | | called a second time to close a second instance of libhb. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1688 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Various fixes for ffmpeg input files (mp4, avi, mkv, etc.):van2008-09-113-185/+331
| | | | | | | | | | - always use source time stamps (HB vfr mpeg4 files now handled correctly) - handle Microsoft's braindead "VFW packed b-frames" - compute average video frame rate from total duration & number of frames (ignore ffmpeg's frame rate which is closer to a max f.r. for vfr video). - workaround an ffmpeg audio decode abort when it used SSE instructions on unaligned buffers. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1687 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - get rid of another deadlock: if there were more than 64 audio frames ↵van2008-09-051-7/+16
| | | | | | | | | before the first video frame we'd lock up the reader. - if we get a bogus timestamp at the end of some conversion just ignore it and don't try to generate minutes or hours of silence to fill the hole. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1665 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Change buffer reuse policy to MRU to hopefully improve cache and VM performance.eddyg2008-08-292-1/+39
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1659 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix subtitle indepth scan abort & hang.van2008-08-192-4/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1645 b64f7644-9d1e-0410-96f1-a4d463321fa5
* The per-stream timing changes (r1570) make the overall timing depend on ↵van2008-08-181-7/+3
| | | | | | which media streams we process. So we can't ignore audio during pass 1 or the video timing will change between passes & make x264 abort. (Thanks to jbrjake for pointing out the problem.) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1643 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - To reliably find audio in 720p or 1080i TS streams we need to search ↵van2008-08-181-5/+18
| | | | | | | | | | through first 50MB of file looking for the stream rather than first 18MB. - When we're looking for a PES header for some PID, check both that the TS 'start' bit is set and that the first 3 data bytes are an MPEG start code (the start bit may get set by an error not caught by the CRC). - Print the substream id when we reject a PID as "not audio" so we'll be able to debug TS streams using non-standard PES encapsulations. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1642 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't crash when the user specifies audio tracks that don't exist from the ↵eddyg2008-08-181-2/+7
| | | | | | HandBrakeCLI git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1640 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - patch a reference picture leak in ffmpeg/libavcodec/mpegvideo.c that ↵van2008-08-182-10/+22
| | | | | | | | | | | | caused aborts on h264 transport stream encodes. - patch the log level of some h264 decoder error messages so we don't fill our log with messages about stuff that's a very likely & not terribly significant. - don't let hb.c set the ffmpeg av_log level to AV_LOG_DEBUG -- it fills the HB activity log with junk. - add a count of the decoder errors to decavcodec's final report. - when we don't have any chapter text (i.e., during a typical cli encode) just print the chapter number rather than empty quote marks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1639 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Code comment clean-up, mostly to clarify the difference between the prev and ↵jbrjake2008-08-141-8/+11
| | | | | | next frame buffers and yadif's prev2 and next2 field pointers. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1630 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Threaded yadif deinterlacer. Will split the YUV frames up into horizontal ↵eddyg2008-08-131-23/+225
| | | | | | segments based on the number of CPUs available. All these segments will be processed seperately in parallel in their own thread. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1628 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Sorry - just fix the indentation in 1626 that Xcode stuffed up.eddyg2008-08-121-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1627 b64f7644-9d1e-0410-96f1-a4d463321fa5