summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Don't crash HB when the video decoder (MPEG2 or ffmpeg) doesn't understand ↵eddyg2008-08-121-1/+10
| | | | | | the format of the input and so therefore doesn't populate vid_info. Just skip that preview instead. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1626 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Removes hard tabs from detelecine.c as a first step towards documenting it.jbrjake2008-08-101-368/+368
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1624 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make sure we never return an unitialized buffer chain to work_loop.van2008-08-091-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1622 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - change aspect from a scaled int to a double so we can handle the widervan2008-08-088-83/+94
| | | | | | | | | | | | | | | | | | | range of aspect ratios we get from ffmpeg files. - add container_aspect to title struct (always zero except for DVDs when it's the aspect from the VTSI). To handle broken French DVDs, make HB complain & use the container aspect if it's different from the aspect computed from the video PAR. - fix ScanFunc's job template init so that it doesn't think the only legal aspect ratios are 16:9 & 4:3. - hb_reduce wouldn't reduce any fraction where both terms were equal and prime (e.g., 2/2, 3/3, 5/5, etc. would not become 1/1). Recoded it using Euclid's Algorithm so it always works and is faster. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1616 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't obey maxWidth and maxHeight settings when using strict anamorphic.jbrjake2008-08-061-18/+17
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1612 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Splits the display of job settings off from the actual work of beginning of ↵jbrjake2008-08-014-73/+237
| | | | | | | | a job, and reorganizes/elaborates the display's layout. Adds new title variables to provide more description of sources: video_codec_name, video_bitrate (currently only used by DVD sources), and container_name and data_rate (currently only used by ffmpeg input sources). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1599 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix two problems that would cause HB to hang in the muxer whenever the input ↵van2008-07-303-54/+37
| | | | | | | | | | content's video finished before audio: - sync has to keep processing until all its input fifos report eof otherwise it won't send an eof on all its output fifos. - do_job has to wait for muxer to finish. Waiting for anything earlier in the pipeline (we were waiting for the video encoder) can cause other parts of the pipeline to get terminated early which will result in lost data & no eofs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1597 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't lose our existing buffer chain when nal_encode returns NULL.van2008-07-291-10/+16
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1592 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix subtitle scan to work with new stream eof logic.van2008-07-262-7/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1584 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use PTS, not DTS, in encx264 output frames so we don't have to special-case ↵van2008-07-264-83/+49
| | | | | | its output in every muxer. Confine code that deals with Apple's mistakes in handling video with b-frames to muxmp4. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1582 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - in encx264, if an video frame is larger than init_delay split it into ↵van2008-07-2617-382/+520
| | | | | | | | | | | | pieces so we don't get jerky output caused by out-of-order frames. - add an explicit EOF for all streams, not just video. - don't generate extra audio silence at the end of an encode (don't need it with explicit eof). - get rid of 80ms initial delay in AAC encode & flush final four frames buffered in encoder. - put mp4 'chap' atom on first track (usually video) rather than first audio track since we can now do video without audio (atom just needs to go on an enabled media track & video is always enabled). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1581 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Libhb:sr552008-07-201-24/+172
| | | | | | - parse both appcast files to display both unstable and stable update information git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1573 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb:sr552008-07-201-149/+80
| | | | | | | - Updates update.c to use both appcast files. Uses nicer XML now. - This shouldn't break anything this time around. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1572 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Get rid of excessive video & audio drops on some content by implementing the ↵van2008-07-163-34/+118
| | | | | | | | | last 20% of the MPEG Standard Target Decoder timing model (per-stream timing state). Should fix the problem reported in http://forum.handbrake.fr/viewtopic.php?f=12&t=6601&sid=81048cf54c40b6cdb945236afb4f99da&p=37563#p37563 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1570 b64f7644-9d1e-0410-96f1-a4d463321fa5