summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* Hack to fix building in xcodevan2008-05-311-1/+15
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1479 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix for unplayable m4v/mp4 files due to negative numbers in ctts atom.van2008-05-311-7/+25
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1478 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Reverts r1475 until it plays nice with Xcode + makejbrjake2008-05-311-45/+111
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1477 b64f7644-9d1e-0410-96f1-a4d463321fa5
* update.c altered to use both appcast.xml and appcast_unstable.xmlsr552008-05-301-111/+45
| | | | | | now uses a single tag, <cli></cli> for version information. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1475 b64f7644-9d1e-0410-96f1-a4d463321fa5
* git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1471 ↵jbrjake2008-05-298-37/+1035
| | | | b64f7644-9d1e-0410-96f1-a4d463321fa5
* When encoding anamorphic with lavc, ensure PAR values are 8-bit. Thanks, j45!jbrjake2008-05-291-1/+15
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1470 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Store video aspect ratio in the avi header.ritsuka2008-05-231-4/+91
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1469 b64f7644-9d1e-0410-96f1-a4d463321fa5
* ...on the other hand, when we *are* using VFR we *do* want to break on ↵jbrjake2008-05-211-0/+1
| | | | | | drops, so we're not trying to filter null frames. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1468 b64f7644-9d1e-0410-96f1-a4d463321fa5
* When using detelecine but not dropping frames (non-VFR detelecine), continue ↵jbrjake2008-05-211-1/+0
| | | | | | looping through the filter chain if the detelecine filter says to drop a frame. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1467 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Re-allow constant frame rates. The MacGui should probably be updated to ↵jbrjake2008-05-172-2/+4
| | | | | | 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
* Allow the user to directly set a pixel aspect height and width, instead of ↵jbrjake2008-05-131-2/+2
| | | | | | | | | | using the autodetection in strict and loose anamorphic. This allows rescaling 1:1 PAR material to be anamorphic. To use in an interface, simply set job->pixel_ratio to 3, job->height and job->width to the desired output size, and job->pixel_aspect_height and job->pixel_aspect_width to the desired PAR. For now this is only for really advanced users who know what numbers they want for those values. Controlled through the CLI as optional arguments to -P. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1459 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Opens up another way to give x264 a constant QP or RF, by passing a direct ↵jbrjake2008-04-261-1/+24
| | | | | | value instead of a percentage that encx264.c has to convert. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1447 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Changes to support unstructured program streams (such as those produced by a ↵van2008-04-251-342/+463
| | | | | | Tivo) and the three other forms of transport streams (m2ts, dvb-s & digicipher). Start of the changes necessary to support other types of video besides mpeg2. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1439 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Don't allow chapter durations to go negative (since durations are ↵van2008-04-252-16/+31
| | | | | | | | | 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
* libhb:sr552008-04-201-22/+134
| | | | | | | | | - Update.c updated to use appcast.xml rather than LATEST - Expects to find 2 XML tags which have been added to appcast.xml e.g. <cli-stable>2008021900 "0.9.2"</cli-stable> <cli-unstable>2008041901 "0.9.3"</cli-unstable> git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1431 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Handle the case where hb_list_audio_config_item is passed an invalid index.saintdev2008-04-181-2/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1429 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Avoid a divide by 0 in encfaac.c caused by the mixdown not being specifiededdyg2008-04-171-0/+9
| | | | | | | | for AAC tracks (due toi a bug in HandBrake.app). Ensure that a mixdown is always specified if not doing passthrough. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1423 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Print a log line for the first chapter.van2008-04-151-0/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1421 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Move clock recovery code from reader to demuxmpeg so it sees all frames & ↵van2008-04-156-72/+65
| | | | | | not just the ones we happen to be encoding. This change gives a more accurate clock and allows us to once again ignore audio during pass 1 of a 2 pass encode. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1420 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Saearch & Replace domain names to move from .m0k.org to handbrake.fr. Only ↵jbrjake2008-04-1536-36/+36
| | | | | | 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-144-8/+34
| | | | 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-136-73/+55
| | | | | | | | | | | | 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
* When dropping frames from pullup for VFR, deallocate the associated subtitle ↵jbrjake2008-04-131-1/+4
| | | | | | | | buffers instead of just hb_fifo_get-ing them into nowhere. This should plug the crash-inducing memory leak Cyander noticed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1410 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Let's try out saner b-frame init delays again.jbrjake2008-04-111-4/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1404 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Provide more feedback as to the types of the streams in an MPEG Transport streameddyg2008-04-111-24/+101
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1402 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
* During conversion only log when there's an error or anomaly.van2008-04-061-5/+12
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1383 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-047-39/+77
| | | | | | | | | | - 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
* Windows line endings are bad.jbrjake2008-04-031-601/+601
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1373 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
* scan and pcm audio fixes.van2008-04-025-415/+531
| | | | | | | | | | | | | | - lpcm audio fixed to handle 24 bit & interpret header correctly. - get aspect ratio from libmpeg2 rather than doing it ourselves. - announce when aspect ratio changes during preview scan. - if aspect ratio isn't either 4:3 or 16:9 complain & map to either 4:3 or 16:9 (whichever is closest). - start stream previews from file position 0 rather than 1/11 in case there's only on mpeg sequence header in the file. - don't give up on a file just because we can't get a preview due to a missing sequence header - only give up if we can't get any previews. - get audio bitstream characteristics during preview in a uniform way (we were treating PCM & MPEG audio specially which resulted in not getting their sample rate which caused a divide by zero in sync). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1370 b64f7644-9d1e-0410-96f1-a4d463321fa5
* New internal audio handling.saintdev2008-04-0119-521/+615
| | | | | | | | 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
* Fix Makefiles for dynamically linked dvdcss.saintdev2008-03-231-14/+0
| | | | | | | | You can only build dynamically linked dvdcss with make. If you want static dvdcss use jam. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1362 b64f7644-9d1e-0410-96f1-a4d463321fa5
* = Adds an hb_detect_comb() function that indicates whether or not a frame ↵jbrjake2008-03-234-2/+135
| | | | | | | | | shows interlacing artifacts. - Utilitizes that function in scan.c to analyze the preview frames - Sets a new title->detected_interlacing variable to true if half or more previews show combing, and warns the user in the log. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1359 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libswscale accurate rounding is now re-enabled for all arches except x86_64.saintdev2008-03-212-5/+16
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1353 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Reverts r1254, so ffmpeg-in-avi again reports as DivX 5. Giving it the ↵jbrjake2008-03-201-2/+2
| | | | | | "correct" codes was a problem for lame Windows media players and didn't help the CrackBerry user who requested it. Moral of the story? Greet user requests with skepticism. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1352 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix two of my stupid bugs that prevented using the queue with transport streams:van2008-03-204-244/+326
| | | | | | | | - keep a cache of the pid/substream id mappings from each scan rather than assuming an encode will immediately follow a scan (there will be lots of scans followed by lots of encodes when the queue is used). - rewrite a few things to get rid of static variables. hb_ts_stream_decode is called by both scan & reader and they're in different threads. All the working storage & state has to either be in the stream struct or on the stack so it's private to the calling thread or it gets corrupted when doing a scan in the middle of an encode. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1351 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Theora.saintdev2008-03-2010-38/+310
| | | | | | | | This adds the theora encoder to the Xcode project as well. It does not enable anything in the Mac GUI, just allows it to build. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1350 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-154-1230/+825
| | | | | | | | | | 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
* minor bug fix: AC3 passthru audio frames with no pts were getting a bogus ↵van2008-03-151-4/+5
| | | | | | start and stop time which caused bad things to happen later on in sync.c. Move up the code that generates a pts for non-passthru frames so that it applies to both. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1340 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use unix-style line endings (LF) for libhb/Makefile instead of Windows style ↵saintdev2008-03-151-109/+109
| | | | | | (CRLF). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1339 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: Fix timecodes when using x264 with avi.saintdev2008-03-051-4/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1326 b64f7644-9d1e-0410-96f1-a4d463321fa5
* DVB teletext streams and ATSC AC3 audio streams use the same code points. If ↵van2008-03-021-5/+22
| | | | | | | | | we misclassify teletext as audio we'll die early in the encode while trying to find an AC3 sync frame. So, if we don't find a sync frame after searching a megabyte of the stream decide it's not AC3, delete the audio entry & keep going. Problem & test case from ncbp http://forum.handbrake.fr/viewtopic.php?p=29137#p29137. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1325 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't crash just because some dvd title uses an illegal pgn number.van2008-03-021-0/+6
| | | | | | | (Fixes bug reported in http://forum.handbrake.fr/viewtopic.php?p=28767&sid=23308d0c02b70fceb54db71b0d0f2660#p28767). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1324 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Oops - left in a mistake from an intermediate version. We want aspect ratio ↵van2008-03-011-1/+1
| | | | | | from all previews but crop from only frame two (otherwise we'll crop down to nothing if there's a preview with a lot of black). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1323 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't crash while scanning when we can't get previews for some title.van2008-02-294-13/+40
| | | | | | | | | - if we get no previews for some title, ignore the title - use the most common aspect ratio found from our 10 previews rather than just the aspect of preview 2 (otherwise we'll crash in hb_fix_aspect if we don't get preview 2). - check parameters in hb_fix_aspect so we don't divide by zero. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1322 b64f7644-9d1e-0410-96f1-a4d463321fa5
* It's a good idea to have a buffer for every pid you decide to decode.van2008-02-291-4/+2
| | | | | | | | Max buffers was 1/4 max streams. This makes it same as max streams. (Fixes crash reported by ncbp at http://forum.handbrake.fr/viewtopic.php?p=28899&sid=0c89bb9c9aed7eee51c294f25ac61e99#p28899) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1321 b64f7644-9d1e-0410-96f1-a4d463321fa5