summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* Allow longer SRT filename paths.jstebbins2010-11-071-1/+1
| | | | | | | Bump from 128 to 256. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3655 b64f7644-9d1e-0410-96f1-a4d463321fa5
* oops, delete debug printf...jstebbins2010-11-061-1/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3654 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix audio sync when resampling 48khz to 44.1khzjstebbins2010-11-062-9/+10
| | | | | | | | Rounding errors in timestamp calculations caused a gradual slip in both sync.c and encfaac.c. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3653 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix windows crash and probably other random nastiness.jstebbins2010-11-061-2/+2
| | | | | | | | | | Initializing extradata_size to non-zero makes ffmpeg think it needs to parse extradata. But in the non-broken-by-microsoft case we leave extradata as uninitialized junk. So ffmpeg parses uninitialized data and sometimes marches off into the weeds. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3651 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix framerate detection again (really, i mean it this time)jstebbins2010-11-051-10/+6
| | | | | | | | | | | integer overflow was causing our sanity checks of ffmpegs frame rate to fail. We would then fall back to using less accurate values. Also removes the completely incorrect adjustment that I made based on ticks_per_frame. That is only useful in a different code path. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3650 b64f7644-9d1e-0410-96f1-a4d463321fa5
* log the title duration before throwing it out when it's too shortjstebbins2010-11-052-16/+16
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3649 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix hb_get_best_mixdown to allow downmixing 7.1 to 5.1jstebbins2010-11-051-1/+3
| | | | | | | | Use hb_get_best_mixdown in places in the LinGui that were duplicating code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3648 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix start/stop time of last lame bufferjstebbins2010-11-041-18/+23
| | | | | | | | after flushing lame, the flushed buffers start/stop time were not being set. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3646 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix framerate detection of ffmpeg sourcesjstebbins2010-11-031-0/+4
| | | | | | | found another spot where ticks_per_frame was not being accounted for. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3643 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix a segfault and a deadlock if reader exits befor first buffer sentjstebbins2010-10-292-2/+5
| | | | | | | | This can happen if enough of the source is good that it scans but the beginning has an error that causes reader to exit. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3628 b64f7644-9d1e-0410-96f1-a4d463321fa5
* update baseline presets with weightp=0jstebbins2010-10-231-38/+0
| | | | | | | eliminate hack that defaults weightp=0 when bframes=0 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3623 b64f7644-9d1e-0410-96f1-a4d463321fa5
* clean up crufty legacy codejstebbins2010-10-237-67/+5
| | | | | | | remove unused code relating to avi, ogm, psp, ipod, and forcing h264 levels git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3622 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use libhb functions for mixdown and bitrate defaults in the clijstebbins2010-10-233-61/+89
| | | | | | | sanitize mixdown and audio bitrates in work.c git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3620 b64f7644-9d1e-0410-96f1-a4d463321fa5
* reorder #includes to fix redefinition problem in mingw64jstebbins2010-10-231-11/+10
| | | | | | | | if winsock2.h isn't included before windows.h, different conflicting definitions are used for several macros and typedefs git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3613 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add build option --enable-ff-mpeg2 to use ffmpeg for mpeg2 decodingjstebbins2010-10-233-0/+18
| | | | | | | instead of mpeg2dec. disabled by default. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3610 b64f7644-9d1e-0410-96f1-a4d463321fa5
* ffmpeg video decoder enhancementsjstebbins2010-10-232-2/+116
| | | | | | | | | Add film/video cadence logging. Set buffer flags indicating field order, progressive, and repeats. Fix frame duration calculation when ffmpeg ticks_per_frame > 1 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3609 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix zero duration lpcm frame handlingjstebbins2010-10-191-1/+6
| | | | | | | | a zero duration frame caused us to send a buffer with zero size which we then interpreted as the end of the stream. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3607 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump ffmpeg from 25082 to 25374jstebbins2010-10-125-12/+49
| | | | | | | fixes h264 decoding issue git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3599 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix heap corruption after avpicture_deinterlacejstebbins2010-10-121-2/+3
| | | | | | | | | I don't know when this started happening (or if it has always been a problem). If the deinterlace buffer is not a multiple of 8, avpicture_deinterlace corrupts the heap. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3598 b64f7644-9d1e-0410-96f1-a4d463321fa5
* tweak ca_aac bitrate limits some morejstebbins2010-10-091-2/+44
| | | | | | | add comment table of bitrate limits found through empirical testing. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3594 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add more audio bitrate limitsjstebbins2010-10-091-10/+47
| | | | | | | Thanks to Rodeo for doing some testing and providing numbers. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3592 b64f7644-9d1e-0410-96f1-a4d463321fa5
* prevent crash when vorbis fails to initialize for any reason.jstebbins2010-10-091-0/+6
| | | | | | | | headers used in muxmkv were not initialized and the garbage made mk_laceXiph crash. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3591 b64f7644-9d1e-0410-96f1-a4d463321fa5
* print more accurate log message when mixdown is not setjstebbins2010-10-091-8/+17
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3588 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix detectsion of bitrate_code for ac3 passthru in mp4jstebbins2010-10-091-1/+1
| | | | | | | | ac3 passthru and encode are slightly different since audio->config.in.bitrate is in bps and audio->config.out.bitrate is kbps git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3587 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix detection of sr_code and bitrate_code for ac3 streams in mp4jstebbins2010-10-091-14/+10
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3586 b64f7644-9d1e-0410-96f1-a4d463321fa5
* allow ca_aac lower limit of 192kbps for 6chjstebbins2010-10-081-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3584 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix a bug in bitrate selection. forgot to change a '++' to '--'jstebbins2010-10-081-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3583 b64f7644-9d1e-0410-96f1-a4d463321fa5
* future proof faac bitrate limits jstebbins2010-10-081-5/+2
| | | | | | | by making the high thresh dependent on # channels git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3582 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix some audio bitrate limits issues with ca aacjstebbins2010-10-081-6/+6
| | | | | | | | and choose the next lower bitrate rather than next higher when between 2 valid rates. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3581 b64f7644-9d1e-0410-96f1-a4d463321fa5
* cli: make smarter mixdown decision when doing ac3 encode fallbackjstebbins2010-10-083-80/+139
| | | | | | | | | | | | | also, clean up the mixdown sanitizing logic in work.c added new functions hb_get_default_mix(codec, layout) hb_get_best_mix(codec, layout) These take the output codec and the input layout as parameters. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3580 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add audio defaults and limits calculation to libhbjstebbins2010-10-082-0/+128
| | | | | | | | | | | | | | | hb_get_audio_bitrate_limits() Get the bitrate limits for a (codec,samplerate,mixdown) triplet hb_get_best_audio_bitrate() Given an input bitrate, sanitize it. Check low and high limits and make sure it is in the set of allowed bitrates. hb_get_default_audio_bitrate() Get the default bitrate for a given (codec,samplerate,mixdown) triplet git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3578 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add code to recognize eac3 streams in TSjstebbins2010-10-051-4/+26
| | | | | | | | Recognizes BD, HDDVD, and DVB variations of signalling eac3 streams. Let me know if you find streams that don't work. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3572 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add ac3 encodingjstebbins2010-10-0412-141/+494
| | | | | | | Uses ffmpeg's ac3 encoder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3570 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix another hang in the muxer.jstebbins2010-10-031-1/+2
| | | | | | | | If all streams are at EOF, then we must continue processing the track queues till they are all empty. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3564 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix ffmpeg locking issuejstebbins2010-10-023-1/+11
| | | | | | | | | | ffmpeg complained "insufficient thread locking around avcodec_open/close()". This was caused by encavcodec.c calling avcodec_open at the same time as stream.c called av_find_stream_info. av_find_stream_info has a side effect of calling avcodec_open, so we must lock around this call as well. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3563 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix a crash when ass_render_frame doesn't return a frame list.jstebbins2010-09-291-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3558 b64f7644-9d1e-0410-96f1-a4d463321fa5
* SSA subtitle burn injstebbins2010-09-2812-90/+594
| | | | | | | | | | Anime fans rejoice! This patch adds SSA subtitle burn-in support with libass. Therefore SSA subtitles should now be rendered in full quality, with the appropriate embedded fonts and positioning information. Thanks to davidfstr git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3557 b64f7644-9d1e-0410-96f1-a4d463321fa5
* remove the 8 audio limit. isn't needed anymore.jstebbins2010-09-151-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3531 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix cli issue with batch scan and encodejstebbins2010-09-152-10/+23
| | | | | | | | | I didn't implement 'single title scan' for batch mode cause it seemed contradictory. but the cli uses this when encoding, even in batch mode. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3530 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix a crash when a TS has no aspect ratio set in the video streamjstebbins2010-09-142-3/+10
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3529 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bump ffmpeg from 22950 to 25082jstebbins2010-09-142-2/+7
| | | | | | | | | | | | | | It's been 5 months since an ffmpeg bump. One negative is that we loose LATM support. The LATM patch is just impossible to apply anymore since ffmpeg dropped support for using the external faad lib. There are ifdef's in the code should anyone wish to revert to an earlier ffmpeg and enable LATM. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3526 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix a rare hang in the muxer.jstebbins2010-09-131-1/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3525 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add Bluray supportjstebbins2010-09-0815-605/+1578
| | | | | | | | | | | | | | | | | | Unencrypted BD directory trees only. Doesn't support iso images. Also, no PGS subtitle support yet. Chapters and angles are supported. Adds a new contrib libbluray. Adds new option to hb_scan() for duration of short titles to filter. This applies to BD and DVD multi-title scans only. Does not apply to any single title scans. Fixes memory leak during scan. hb_buffer_close() was not freeing all buffers in a chain of buffers passed to it. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3510 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix muxing problem with certain sources/settingsjstebbins2010-08-311-14/+15
| | | | | | | | | | | | | The fifo depth limit that was put in place to prevent out of memory conditions was too aggressive. It caused buffers to be flushed to the output too early with cercain settings. This change monitors memory usage (i.e. buffer sizes) rather than just fifo depth in order to decide when to flush buffers to prevent out of memory conditions. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3506 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Multi-line SSA packets handled by the SSA->UTF8 decoder.jstebbins2010-08-101-32/+64
| | | | | | | Contributed by davidfstr. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3475 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix crash due to processing invalid buf_out from workjstebbins2010-07-041-0/+3
| | | | | | | | | | if the work function doesn't null out buf_out (as decavcodecvWork) then buf_out can be garbage, or worse a prevously used buffer. I'm flabbergasted this has never bitten me before. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3426 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix some preset issuesjstebbins2010-07-032-15/+8
| | | | | | | | | | | add b-pyramid=none to appletv presets and remove b-pyramid hack from encx264.c change samplerate from 48 to 'Auto' in all presets cap samplerate to 48khz since none of the encoders support higher rates remove obsolete UsesMaxPictureSettings from all presets. replace with UsesPictureSettings=2 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3424 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve program stream detectionjstebbins2010-06-281-17/+49
| | | | | | | | | We were getting some false positives on some files. In some cases this would lead to a crash. In all cases it leads to a failure to scan or encode properly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3418 b64f7644-9d1e-0410-96f1-a4d463321fa5
* make hb_set_anamorphic_size keep storage aspect when maxHeight is appliedjstebbins2010-06-262-28/+45
| | | | | | | | before, it would not recalculate width after changing height. also, in ana mode 3, fix storage asepct if !keep_display_aspect git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3411 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Preserve subtitle track that matches foreign audio search when thejstebbins2010-06-261-7/+8
| | | | | | | | resulting output track would not be an exact duplicate. We were removing the track even when forced flags differed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3407 b64f7644-9d1e-0410-96f1-a4d463321fa5