summaryrefslogtreecommitdiffstats
path: root/libhb/hb.c
Commit message (Collapse)AuthorAgeFilesLines
* Bump cpu count limit from 8 to 64jstebbins2010-11-071-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3657 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump ffmpeg from 25082 to 25374jstebbins2010-10-121-4/+39
| | | | | | | 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
* Add ac3 encodingjstebbins2010-10-041-0/+2
| | | | | | | Uses ffmpeg's ac3 encoder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3570 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix ffmpeg locking issuejstebbins2010-10-021-0/+9
| | | | | | | | | | 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
* SSA subtitle burn injstebbins2010-09-281-1/+12
| | | | | | | | | | 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
* Add Bluray supportjstebbins2010-09-081-2/+2
| | | | | | | | | | | | | | | | | | 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
* make hb_set_anamorphic_size keep storage aspect when maxHeight is appliedjstebbins2010-06-261-28/+44
| | | | | | | | 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
* Add SSA subtitle supportjstebbins2010-06-011-0/+2
| | | | | | | Thanks to davidfster git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3342 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix compiler warnings in several libhb filesjstebbins2010-05-301-6/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3335 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix memory leak in pinvoke patchjstebbins2010-05-241-6/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3320 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix stderr redirection on mingw. dup2 function doesn't work as it should so ↵jstebbins2010-05-231-0/+5
| | | | | | | | | must reach inside stderr struct and modify _file member directly git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3318 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add wrapper functions that make it easier to call libhb from C# and otherjstebbins2010-05-231-9/+223
| | | | | | | interpreted languages git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3317 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Universal Text Subtitle Support Initial Implementationdynaflash2010-05-041-0/+4
| | | | | | | | | | | | | - Patch by davidfstr ... Thanks! - Adds support for reading TEXT subtitle tracks from file inputs - Tested combinations: -- MKV UTF-8 -> MKV UTF-8 (passthru) -- MKV UTF-8 -> MP4 TX3G (upconvert) -- MP4 TX3G -> MKV UTF-8 (downconvert) -- MP4 TX3G -> MP4 TX3G (downconvert to UTF-8 then upconvert) - Further explained here http://forum.handbrake.fr/viewtopic.php?f=4&t=16099 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3283 b64f7644-9d1e-0410-96f1-a4d463321fa5
* get rid of extry CR at end of hb_log messagejstebbins2010-04-251-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3266 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add test to ensure that ffmpeg's reported audio layout agrees with channel countjstebbins2010-04-241-24/+72
| | | | | | | | | a crash report from a user leads me to believe ffmpeg is giving us a channel layout that has a different number of channels than the channel count it tells us. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3260 b64f7644-9d1e-0410-96f1-a4d463321fa5
* revert last checkinsr552010-04-171-192/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3237 b64f7644-9d1e-0410-96f1-a4d463321fa5
* remove libgcc... dll from zip package creation as it is no longer neededsr552010-04-171-8/+192
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3236 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix some mingw warnings and a mingw build issuejstebbins2010-04-101-5/+7
| | | | | | | mingw gcc-4.5 has linker issues against shared libstdc++ git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3217 b64f7644-9d1e-0410-96f1-a4d463321fa5
* downmix support for ffmpeg audio sourcesjstebbins2010-04-021-0/+45
| | | | | | | | now we can eat our own dogfood. i.e. aac 6ch discrete input now works, along with any other multi-channel audio ffmpeg can toss at us. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3182 b64f7644-9d1e-0410-96f1-a4d463321fa5
* make it possible to dynamically create and close multiple libhb instancesjstebbins2010-03-261-34/+68
| | | | | | | | | | tweaks to make libhb more usable from a C# app remove pointers from preview filenames, replaces with hb instance and title id's removes only previews upon hb_close, leaves temp dir for hb_global_close git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3170 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adjustable picture modulus: Base patch by BradleyS, Thanks BradleyS!dynaflash2010-02-111-1/+1
| | | | | | | - Enables setting modulus for all anamorphic modes (including non-anamorphic) except strict. The job variable "anamorphic.modulus" is repurposed for this and is renamed to simply "modulus" - Other changes: Increases minimum output dimensions to 32x32 pixels in libhb (prevents possible crashes, notably in macgui). Better crop value and maximum crop value calculations to prevent crashes. Some code optimization / refactoring. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3113 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix compiler warning about "definition has no type or storage class"jstebbins2010-02-101-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3108 b64f7644-9d1e-0410-96f1-a4d463321fa5
* removed test codesr552010-02-061-6/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3102 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb dll fix by RandomEngysr552010-02-061-0/+17
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3101 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add point-to-point encodingjstebbins2009-12-231-1/+2
| | | | | | | | | | | | | | allows frame and pts based start points. end points were already previously supported. New job variables pts_to_start and frame_to_start specify the start point. There can be a period during the encode where it has to search for the start point. During this period, libhb sets a new state HB_STATE_SEARCHING and sets progress and eta till start point found. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3039 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Reduce the amount of buffering used and eliminate hb_snooze in the encoding ↵jstebbins2009-12-051-2/+6
| | | | | | | | | | | | | | | | | | | | | | pipeline For HD sources on an 8 core system with hyperthreading, we were using 1.5GB of ram. Add to that the 600MB x264 uses for rc-lookahead, pushes it north of 2GB. To reduce our memory usage, the fifo depths have been reduced are are no longer a multiple of cpu count. Use of hb_snooze has been eliminated in the encoding pipeline so that performance doesn't fall as a result of the reduced fifo depths. In sync, each audio and video were given separate threads so that each can wait on it's respective input fifo without blocking the others. In muxcommon, each stream being muxed was given a separate thread so that each can wait on it's respective fifo. This allows the removal of hb_snooze in the sync and muxer work loops. In both sync and muxer, there is common data that is shared by all threads, so special init routines allocate this shared data and initialize the threads. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3007 b64f7644-9d1e-0410-96f1-a4d463321fa5
* batch file scanning and scan canceljstebbins2009-11-251-4/+38
| | | | | | | | | | When a directory is specified as the source, first we attempt to open as a dvd, then if that fails, we attempt to open each file in the directory as a stream source. Since opening a large directory of files can take a really long time, you can also now cancel a scan. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2980 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Maintain an accurate job ETA across pause/resumejstebbins2009-11-071-0/+9
| | | | | | | | Keeps track of how much time is spent paused and factors that into the ETA calculation git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2918 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: SubRip Subtitle importeddyg2009-06-231-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2602 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Moved --native-langauge processing from libhb to the CLI. Added --native-dub ↵eddyg2009-06-211-76/+6
| | | | | | option to allow the user to request dubbing instead of subtitles when the audio does not match the users native language. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2594 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use new appcast URL nameing scheme for HandBrakeCLI --update.konablend2009-06-201-1/+1
| | | | | | | | | - increase storage space hb_handle_s.version[16] to 32 to handle longer version strings; eg. "svn2500 x86_64" - reduce 2-query mechanism to 1-query and only check/notify for newer releases of same type (ie: stable or unstable) - remove hard-coded url and extract host/path components from HB_PROJECT_URL_APPCAST macro git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2586 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - mingw fixes to use fopen() with 'b' flag.konablend2009-06-061-1/+1
| | | | | | | - include pthread.h for pthread_win32 attach/detach decls. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2495 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: correct error in preview scalingjstebbins2009-06-061-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2494 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds a keep_display_aspect toggle to the job->anamorphic struct in order to ↵jbrjake2009-06-061-5/+13
| | | | | | fix a bug and implements it in the CLI. Also adds some more anamorphic settings to the job config display. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2492 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Probably a good idea to set the new par width after calculating it.jbrjake2009-06-051-1/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2491 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: Implements custom anamorphic. No more -p or -P. Choices are ↵jbrjake2009-06-051-6/+8
| | | | | | | | | | --strict-anamorphic, --loose-anamorphic, and the new --custom-anamorphic. The last of which also handles --pixel-aspect, --display-width, --itu-par, --modulus, and --keep-display-aspect options. Loose will also obey the pixel aspect and ITU PAR options. Libhb: Fixed a small bug with custom anamorphic working off the source's display aspect even when dealing with a custom display aspect, and made the job config display aware that custom anamorphic exists. Scripts: Updated manicure to write the new anamorphic option names. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2487 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds an interjob structure to preserve some encode data across jobs within ↵jbrjake2009-06-041-0/+13
| | | | | | an instance of libhb. This allows correcting the estimated bitrate/filesize of 2-pass encodes of variable framerate content, as the actual frame count is known after the first pass. Thanks for putting the idea into code, Shaya. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2482 b64f7644-9d1e-0410-96f1-a4d463321fa5
* FFMPEG.konablend2009-06-021-3/+3
| | | | | | | | | - bump ffmpeg from 0.5 (approx r17887) to r19067 (thanks van). - fixed latm patch; latmaac input no longer crashes. - removed P02-darwin-h264-dsp-crash. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2469 b64f7644-9d1e-0410-96f1-a4d463321fa5
* softsubtitles:jstebbins2009-06-021-38/+28
| | | | | | | | | | | | | | | | | | - when doing an indepth scan, do not scan CC tracks - separate subtitle configureation attributes into separate hb_subtitle_config_t. Add an instance of this to hb_job_t for setting the attributes of the subtitle found through an indepth scan - Add a default_track flag to hb_subtitle_config_t that tells the muxer that the track should be flaged as the default. muxmkv uses this. - When an indepth scan is complete, check to see if the autoselected subtitle matchces (by id) one of the manually selected subtitles. If a match is found, the autoselected subtitle with all the attributes the user assigned to it replaces the manually selected subtitle. - LinGui: Add "Default" column to subtitle tab. This is a radio that lets the user choose which subtitle should be displayed by default. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2468 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Excises xvid from libhb because it's not worthy. Having two different MPEG-4 ↵jbrjake2009-05-261-2/+0
| | | | | | | | | Part 2 encoders is superfluous and when choosing between ffmpeg and xvid, xvid is the clear loser since we need to keep ffmpeg around for other functions and xvid constantly requires attention to ensure it compiles. MacGui: Removes some stray references to the codec and unlinks it from the Xcode project. CLI: Removes references to the codec and removes it as a dependency. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2448 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Add CoreAudio AAC as one of the encoder on Mac OS X.ritsuka2009-05-231-8/+31
| | | | | | | - Remove hb_init() and hb_init_express() macro. Rename hb_init_real() to hb_init() - Add two more bitrate combination for audio codecs in common.h git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2441 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Change CC608 decoder to be its own threadeddyg2009-05-071-3/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2396 b64f7644-9d1e-0410-96f1-a4d463321fa5
* VOBSUB encoder skeleton for use with mkv VOBSUB pass-througheddyg2009-05-061-0/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2389 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: preview changesjstebbins2009-05-041-30/+9
| | | | | | | | | | - update hb_get_preview to allow upscaling and remove borders - allow upscaling in the gui - add user option to show visible cropping borders - gui generates borders when needed instead of hb_get_preview, which allows for flexible alternatives like alternate colors git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2376 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Stage 1 Soft Subtitle Support - Allow multiple subtitle tracks to be ↵eddyg2009-05-041-6/+12
| | | | | | selected, and mark them for Render or Pass Through. No functional difference from the UIs, however in theory they could render multiple tracks - would be a dogs breakfast on screen though, and is untested. Have tested all normal operations from the UIs, including scanning. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2373 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Custom Anamorphic initial implementation (experimental) and pic ↵dynaflash2009-05-011-22/+25
| | | | | | | | | | | | | | | | | | | | | settings and preview changes. - Custom Anamorphic mode allows more customization of pixel and display dimensions. -- NOTE: The layout and even functionality are considered very experimental and not ready for prime time yet. -- Change to hb_get_preview allowing a preview size > title->width and height courtesy of jbjake. -- Allows setting the modulus to 16 (default), 8, 4, 2, or 1. -- Adds display height, pixel width and pixel height fields. - Picture Inspector: -- Changes shape and size according to the size/filter tab and anamorphic and filter settings. - Picture Preview: -- Now crops the gray borders from around the image returned from hb_get_preview and recreates cropping and resizing itself. -- Add size and scale information to the preview window title bar so you can see it without activating the hud controls. -- Attempt to fix the intermittent aliasing problem with the hud control overlay by making sure the hud origin is a whole int (fix courtesy of KonaB1end). - Known Issues: -- Scale to Screen mode is currently borked. The actual image does not scale yet. -- Depending on how far you upscale the display dimensions in custom anamorphic, the preview image can get a bit wonky. Returning to one of the standard modes clears it up. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2362 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove unneeded preview files at the beginning of a scan.jstebbins2009-03-271-2/+43
| | | | | | | This prevents accumulation of potentially thousands of files during a session git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2282 b64f7644-9d1e-0410-96f1-a4d463321fa5
* reorder some calculations in hb_set_anamorphic_size so that the heightjstebbins2009-03-041-6/+12
| | | | | | | calculated after all adjustments have been made to the width. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2222 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Re-enable libswscale accurate rounding on x86_64.saintdev2009-03-021-4/+1
| | | | | | The libswscale bug causing crashes was fixed a while ago. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2191 b64f7644-9d1e-0410-96f1-a4d463321fa5