summaryrefslogtreecommitdiffstats
path: root/libhb/sync.c
Commit message (Collapse)AuthorAgeFilesLines
* - support blu-ray, avchd & dvb x264van2008-05-311-12/+18
| | | | | | | - support video files handled by ffmpeg (avi, mkv, mp4, etc.) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1480 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Re-allow constant frame rates. The MacGui should probably be updated to ↵jbrjake2008-05-171-1/+1
| | | | | | always use title fps for VFR instead of "Same as Source" which might be 23.976, but it's taken care of in work.c now so it's purely a cosmetic thing. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1464 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Don't allow chapter durations to go negative (since durations are ↵van2008-04-251-14/+10
| | | | | | | | | unsigned the result will be interpreted as a huge positive number). - Revert the change to sync that pushed out the final frame of video -- on many DVDs this frame seems to be junk that's not intended to be displayed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1438 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Saearch & Replace domain names to move from .m0k.org to handbrake.fr. Only ↵jbrjake2008-04-151-1/+1
| | | | | | covers trunk files, libhb, and test. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1418 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix the automatic subtitle scan that I broke with r1412.van2008-04-141-0/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1413 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fixes for different number of frames between pass 1 & 2, missing frames at ↵van2008-04-131-61/+22
| | | | | | | | | | | | end, and an deadlock with pcm audio. - since the SCR clock recovery is done in reader.c we can't currently skip audio frames during pass 1 or we miss clock changes signaled by those frames & end up dropping more video frames in pass 1 than pass 2. - since many modules buffer frames we can't tell if we're done just by looking for empty fifos. Send an empty buffer to mark end-of-stream all the way along the processing pipeline & use it to flush internally buffered data. - in a processing pipeline you're done when the end of the pipe says your done. add a thread status variable so we can tell when individual threads are finished then make do_job wait until the encoder thread is done so that we're sure all the frames have been processed and sent to the muxer. - since the muxer alternates between reading video & audio packets we have to have enough buffer in the audio pipeline to handle a video-frame's worth of audio packets (33ms). Since pcm packets are <1ms we need >60 slots in the audio fifos or we'll deadlock. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1412 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix brain fade in comments (it's been a long day).van2008-04-101-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1401 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix avi containers which I unwittingly broke with r1341.van2008-04-101-26/+95
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1400 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Fix sync problems associated with sample rate conversion - the truncation ↵van2008-04-061-38/+62
| | | | | | | | | error of the sample rate ratio would build up over time until the audio substantially lagged the video. - Don't feed audio through the sample rate converter if we don't have to - it's faster not to & it can introduce a delay that perturbs a/v sync. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1381 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Minor chapter cleanups.van2008-04-041-0/+13
| | | | | | | | | | - put chapter number in buf rather than a 'new chapter' flag. - use that chapter number to index chapter text in muxers so a dropped chapter doesn't make all subsequent chapter labeling wrong. - get rid of most of the chapter logging & just output one line giving the chapter text, number, frame & time. - fix a bug in sync that could cause chapter marks to be lost. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1377 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - hardware players don't tolerate video or audio frames that overlap in ↵van2008-04-031-8/+13
| | | | | | | | | time & some dvd mastering techniques take advantage of this. Get rid of fudge factors so we drop all such frames otherwise they screw up our a/v sync. - fix video timing 'off by one': since we look one frame ahead time has to actually advance on the next video frame. time that stays the same guarantees a one frame overlap which really messes up mp4 durations. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1372 b64f7644-9d1e-0410-96f1-a4d463321fa5
* New internal audio handling.saintdev2008-04-011-37/+36
| | | | | | | | Each audio track contains it's own settings for codec, bitrate, samplerate, etc. This allows for very complex combinations of audio tracks if desired. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1365 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Should have removed this as part of the r1341 checkin - we now add silence ↵van2008-03-161-22/+0
| | | | | | based only on gaps in the timestamp sequence. The heuristic of looking at what fifos are full or empty can misbehave based on random variation in the thread scheduling. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1342 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Add mpeg2 "Standard Target Decoder" clock recovery to the low level mpeg ↵van2008-03-151-405/+236
| | | | | | | | | | stream reader so we don't have to guess about the clock in sync. - Since sync now has a fairly reliable clock, make it just trim excess audio or video and fill holes so that we maintain cross media sync. - Redo the TS-to-PS transmuxing code to work on smaller units so that we can reliably convert the TS clock (PCR) to a PS clock (SCR). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1341 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Set an minimum subtitle display time of three seconds *or* until the next ↵eddyg2008-02-261-0/+20
| | | | | | subtitle is displayed. This makes subtitles easier to read for the slow readers or for the DVD authors why display the subtitles for too short a period (e.g. only display the subtitles during the talking in a fast speaking tongue). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1317 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Formatting: Remove a lot of trailing whitespace.saintdev2008-02-211-33/+33
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1307 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Allow mac gui to select AC-3 + AAC at the same time, still needs CLI work ↵eddyg2008-02-161-5/+10
| | | | | | for the same. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1267 b64f7644-9d1e-0410-96f1-a4d463321fa5
* When vfr is selected use the frame timing from render.c rather than ↵van2008-01-221-38/+68
| | | | | | generating duplicate frames to turn the content back into 30fps. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1223 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Program Stream Enhancements - Van: Libhbdynaflash2007-12-311-2/+2
| | | | | | | | | | | - Thanks Van ! - Identifies program streams by type instead of file extension - Improves proper duration reporting of program streams - fixes audio reconvergence code in libhb/sync.c trying to free a null buffer causing a crash - Assorted other enhancements to encoding program streams. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1155 b64f7644-9d1e-0410-96f1-a4d463321fa5
* "Great! Where are we going?"jbrjake2007-12-281-2/+2
| | | | | | | Prevents sync.c from prematurely ending the encode when its estimated maximum frame count is too low, by doubling that maximum. Thanks for fixing this long-standing bug, van! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1151 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Changed logging messages about PTS discontinuities to be less verbose, and ↵eddyg2007-10-231-23/+111
| | | | | | changed audio discontinuity handling to work correctly should it be leading the video. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1035 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Somehow this went missing as I prepared these subtitle changes for commit in ↵eddyg2007-10-111-0/+2
| | | | | | 1011. Without this change encoding will hang when there is a subtitle in the fifo at a PTS discontinuity. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1021 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't drop subtitles when crossing PTS discontinuities by using buffer ↵eddyg2007-10-081-40/+185
| | | | | | sequence numbers to determine where in the stream the buffer came from. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1011 b64f7644-9d1e-0410-96f1-a4d463321fa5
* This patch from eddyg should help alleviate HandBrake's audio drop issues. ↵jbrjake2007-07-251-13/+47
| | | | | | It also adds a number of beautiful comments to sync.c that really help clarify the code. Thanks, eddy! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@738 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Switch buf->key to buf->frametype which is a bitmask telling us what type of ↵saintdev2007-06-171-1/+1
| | | | | | | | | frame we are dealing with. This doesn't change any functionality, but I need to be able to distinguish between x264 IDR and I frames for the upcoming matroska muxer. This also has the side effect of making the code a little easier to read and maintain. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@623 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix Previous Bad commit for Cyanders Chapter Markersdynaflash2007-04-251-1/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@548 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Much better B-frame muxing frame-reordering. This will preserve the sps/pps ↵jbrjake2007-04-161-0/+14
| | | | | | | | info, properly offset the first frame, and flush any remaining frames at the end of the encode. Patch by: Nyx git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@513 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added libhb and CLI support for Dolby Pro Logic II 5.0 matrix encoding. ↵maurj2007-04-111-6/+6
| | | | | | | | *NOT YET ADDED TO THE GUI*. Handbrake now uses a more general "audio mixdown" concept. For each audio track to be converted you specify a mixdown. These are defined in common.h. This checkin only allows you to specify one mixdown for all tracks in the CLI, although everything is in place internally to specify a different mixdown per track. In the CLI, the "-6 --surround" option has been repurposed as a "-6 --mixdown" option, with a string parameter of mono/stereo/dpl1/dpl2/6ch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@494 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix about 156,199 bytes of leaked memory.saintdev2007-03-311-0/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@469 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Applied and committed saintdev's patch to fix multi-track audio. Only in ↵maurj2007-03-211-19/+15
| | | | | | | | the CLI for now - the GUI will need updating to reinstate the second audio dropdown. If the -6 option is specified in the CLI (and faac is specified), then *any* 5.1 tracks specified will be exported as 6-channel AAC. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@438 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merge the 5.1 branch into the trunk.prigaux2007-03-061-0/+679
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@422 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merge the 0.8.0_mpeg4ip branch into the trunkprigaux2007-02-111-675/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@285 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Structural changes, in order to eventually be able to compile HBtiter2006-03-161-133/+140
| | | | | | | without certain encoders git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@34 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Softer resampling when audio dates are messed up (fix for LPCM issues).titer2006-02-231-18/+11
| | | | | | | Disabled verbose in the OS X UI git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@30 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Quick fix for Madagascar: increased tolerance level for PTS discontinuitiestiter2006-02-231-6/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@29 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix for missing subtitlestiter2006-02-221-3/+12
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@28 b64f7644-9d1e-0410-96f1-a4d463321fa5
* HandBrake 0.7.0handbrake2006-01-141-0/+664
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@16 b64f7644-9d1e-0410-96f1-a4d463321fa5