summaryrefslogtreecommitdiffstats
path: root/libhb/hb.c
Commit message (Collapse)AuthorAgeFilesLines
* libhb: remove scanCount variable from hb_handle_s, it's not needed anymore ↵Damiano Galassi2016-11-111-8/+3
| | | | since MacGui use multiple libhb instances.
* libhb: re-enable SWS_FULL_CHR_H_INT and SWS_FULL_CHR_H_INP swscale flags to ↵Damiano Galassi2016-11-111-2/+0
| | | | improve yuv->rgb conversion.
* Select the appropriate coefficients for yuv<->rgb conversions.Damiano Galassi2016-11-081-4/+28
|
* Add new anamorphic mode "Automatic", delete "Strict" (#367)John Stebbins2016-10-311-3/+44
| | | | | | | | | * Add new anamorphic mode "Automatic", delete "Strict" Anamorphic mode automatic is added to support Bradley's new presets that are designed to pick a PAR that maximizes storage resolution. Strict is converted to Loose + mod == 2 + UsesPictureSettings == 2 when importing presets
* libhb: set HB_ERROR_CANCELED status for canceled encodesJohn Stebbins2016-10-261-1/+2
| | | | This status can be queried with hb_get_state() after an encode finishes.
* libhb: make preview reader and writer both more robustSean McGovern2016-07-111-4/+42
|
* Revert "libhb: don't ignore the return result from fread()"Bradley Sepos2016-07-071-7/+1
| | | | | | Broke image previews on Linux and Windows (mingw). This reverts commit b7645e7842703d52c44feaa85cfb3c490e09c8dc.
* libhb: Replace PTW32_STATIC_LIB with PTW32_VERSION.Bradley Sepos2016-07-071-1/+1
| | | | For consistency with 36c415e. In practice the include this encapsulates is already included elsewhere, so no underlying change takes place; <pthread.h> is already included.
* libhb: don't ignore the return result from pipe()Sean McGovern2016-07-011-1/+2
|
* libhb: don't ignore the return result from fread()Sean McGovern2016-07-011-1/+7
|
* subtitle scan: tighten up scan pass dropping logicJohn Stebbins2016-06-111-1/+3
| | | | | | | Also drop the scan pass if there is only one subtitle track and "force" is not specified. When scanning for foreign audio subtitles without force, you need at least 2 tracks in order for the 10% selection logic to apply.
* subtitle scan: drop scan pass if there are no suitable subtitlesJohn Stebbins2016-06-101-2/+21
| | | | A suitable subtitle is one that matches the users preferred language.
* remove dxva hw decode (#189)John Stebbins2016-05-171-20/+0
| | | | | | | | | * remove dxva hw decode It provides practically no speed increase even on a slow CPU and results in a speed decrease on fast CPUs. And the code is exceptionally fugly. * cli: remove USE_HWD
* libhb: fix incorrect assumption that video quality is always positive.Tim Walker2016-03-311-1/+1
|
* hb: cosmetics, removing trailing whitespaceJohn Stebbins2016-03-231-15/+15
|
* Remove the CLI / LibHB Update Checker. It's been broken since we switched to ↵sr552016-03-121-68/+2
| | | | HTTPS and it's terrible code.
* qsv: fix buildJohn Stebbins2016-03-111-0/+1
| | | | I missed some of the qsv filter settings bits that needed changing.
* filters: make job filter settings an hb_dict_tJohn Stebbins2016-03-091-4/+73
| | | | | | This simplifies accessing and changing filter parameters programatically. It also changes the custom filter string format to a ':' separated list of key/value pairs.
* libhb: Add libavfilter support and pad filterJohn Stebbins2016-01-211-0/+2
| | | | | | | | | | | | | | New filter types HB_FILTER_AVFILTER and HB_FILTER_PAD. Settings for HB_FILTER_AVFILTER are the same as you would pass to avconv from the command line -vf option, except that we do not support multi-input or multi-output filters. Settings for HB_FILTER_PAD are "width:height:color:x_offset:y_offset". width x height is the size of the output frame after padding. color may be a w3c color name or RGB value (default black). x_offset, y_offset is the position of the video within the padded area (default centered). Any of the values may be omitted or "auto".
* sync: gut and rewriteJohn Stebbins2016-01-211-0/+1
| | | | | | | | | | | sync.c was difficult to read, fragile, and prone to difficult to diagnose bugs (see https://forum.handbrake.fr/viewtopic.php?f=12&t=33147) This rewrite simplifies the code, removes signals, locking and yield that probably cause the above problem and is much more flexible. It fixes a wider variety of timestamp issues than before and is much easier to extend if other timestamp analysis is desired.
* Update copyright dates to 2016.Bradley Sepos2016-01-011-1/+1
|
* x264: add multilib support (a.k.a. 10-bit)John Stebbins2015-11-121-0/+2
| | | | | This adds the structure to load an libx264 10-bit shared library. The user must install this library themselves to an appropriate place.
* libhb: make muxer, sync, and reader behave like other work objectsJohn Stebbins2015-11-091-2/+6
| | | | | | | | | | | | | simplify job initialization sequence, clean up code, and document dependencies in the sequence better. Make hb_add set job->sequence_id. It is no longer necessary for the frontend to do this. If the frontend needs the sequence_id, it is returned by hb_add(). Clean up use of interjob. do_job() now uses sequence_id to detect when a new sequence of related jobs is running and automatically clears interjob.
* libhb: don't use deprecated AVPictureJohn Stebbins2015-10-291-15/+37
| | | | | libav just deprecated AVPicture and all av_picture_*/avpicture_* functions.
* Enforce min/max dimensionsJohn Stebbins2015-10-261-24/+98
| | | | | | In both hb_set_anamorphic_size and hb_get_preview, check that image dimensions are > 32x32 and < 10240x10240. This should help to prevent crashes with unusual dimensions settings.
* libhb: prevent crashes in hb_get_preview2John Stebbins2015-10-261-1/+23
| | | | | | Try to avoid failures to initialize sws context by setting minimum dimensions. And if initialization does fail, exit gracefully instead of crashing in sws_scale.
* Fix bizarre custom anamorphic behaviorJohn Stebbins2015-10-261-37/+0
| | | | | | When "keep aspect" is unset in custom anamorphic, it was making very uintuitive changes to PAR. This simplifies the code and makes the behavior more sane.
* lame: Use libav wrapper to encode mp3lameJohn Stebbins2015-10-261-1/+0
| | | | | | | | | | Fixes https://forum.handbrake.fr/viewtopic.php?f=12&t=33345 Some players expect each packet to start on an mp3 frame header. Our mp3lame encoder did not ensure this and resulted in failure to play audio on these players. libav already has the necessary code to parse headers and accumulate a full frame of data, so use it.
* scan: fix rescan avoidance logicJohn Stebbins2015-09-291-5/+20
| | | | We need to rescan when the number of previews changes.
* build: use git version info instead of svnJohn Stebbins2015-08-251-3/+57
| | | | | | Migrate from svn to git. Since our build system automatically generates version info from the svn repo, this needs to change when we move the repo to git.
* cropscale: prevent crash when scale dimensions too smalljstebbins2015-08-241-1/+1
| | | | | | | | This will result in no video in the output file, but in such cases, this might actually be desirable. Scaling to such small dimensions is often used simply to re-encode audio. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7412 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix application of max width/heightjstebbins2015-07-221-4/+12
| | | | | | | | In non-anamorphic and custom-anamorphic, if keep-aspect is not set, don't adjust dimensions to fix aspect when applying max width or height. If the user is telling us to distort the image, do it. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7362 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: detect read errors and propagatejstebbins2015-06-291-0/+5
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7332 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: re-work OpenCL cleanup a bit.Rodeo2015-06-231-0/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7313 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Allow log level changes and update checks *after* hb_init()jstebbins2015-06-121-91/+34
| | | | | | | | | | | - In the CLI, this allows calling hb_init() before parsing args, which permits us to see any libhb log messages that are generated during option parsing. These messages were hidden before. - In the GUIs, this allows dynamic changes to log level. Previously an application restart was required. I have only updated the LinGui to take advantage of this. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7295 b64f7644-9d1e-0410-96f1-a4d463321fa5
* scan: skip scan if title has already been scannedjstebbins2015-05-261-0/+20
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7226 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb,cli: add preset management to libhb, use it in clijstebbins2015-05-061-0/+5
| | | | | | | | This results in custom preset support in the CLI and additional command line options to fully support all preset keys. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7158 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Eliminate global variable hb_gui_use_hwd_flagjstebbins2015-03-291-2/+22
| | | | | | | | | | | | This global was shared between the CLI and libhb and used as a back door to force scan and encode passes to use the same ffmpeg context for hardware decoding. Aside from the fact that this context sharing should not be necessary and needs fixing, this information belongs in the hb_handle_t that is shared between the scan and the encode. So put it there and make sure the hb_handle_t get propagated to where the flag is needed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7028 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove unused hb_get_scancount functionritsuka2015-03-291-9/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7026 b64f7644-9d1e-0410-96f1-a4d463321fa5
* json: automatically scan title when processing json jobsjstebbins2015-03-071-51/+57
| | | | | | | | | | | | | | | Simplifies the WinGui. This also changes how jobs are processed. Creating the sub-jobs for multiple passes is delayed until after scanning and immediately before running the job. Working status has also changed. Sub-job passes are identified in status with an ID that allows the frontend to definitively identify what pass is in progress. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6976 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update year to 2015.bradleys2015-02-011-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6852 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Simplify frontend useage of hb_add()jstebbins2015-01-121-2/+36
| | | | | | | | | Modify hb_add() to automatically add all necessary passes, so hb_add() only needs to be called once per job. It now automatically adds subtitle scan and 2-pass encoding passes. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6738 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: simplify job initializationjstebbins2015-01-031-1/+12
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6683 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: initialize the buffer pool only oncejstebbins2014-12-291-5/+5
| | | | | | | | We leak a little memory for the buffer pool lists if we initialize it with every new hb_handle_t. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6673 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: make hb_get_preview2 always return a valid imagejstebbins2014-12-191-3/+8
| | | | | | | When we fail to read the preview image, create a blank image git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6612 b64f7644-9d1e-0410-96f1-a4d463321fa5
* json: add json APIsjstebbins2014-12-161-213/+57
| | | | | | | | | | There are several changes to job and title structs that break current windows interop code. The interop code should be changed such that it only uses json APIs. So if there is any missing features (or bugs) in these APIs, please let me know. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6602 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix dimensions problem when both width and height are specifiedjstebbins2014-08-271-8/+8
| | | | | | | | | | | | | The GUI will precompute both width and height and specify both on the command line. But then the CLI recomputes width based on height which can result in the width being changed. So, in non-anamorphic mode, disable keep_aspect so that width and heigh are both kept. And in other anamorphic modes, use custom ana when computing dimensions so that both width and height are kept (i.e. recompute par). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6369 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add new function for retrieving previewsjstebbins2014-07-291-31/+91
| | | | | | | | | | | | | | | | This new function has a couple advantages over the old one (which we should phase out). It does not require hb_job_t as a parameter, instead it uses hb_ui_geometry_t which is a smaller and simpler struct. The entire job struct is overkill as input to this function. It returns an hb_image_t that fully describes the returned image instead of just a uint8_t array. The caller does not have to make assumptions about image size, line stide, or pixel format since hb_image_t specifies these things. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6242 b64f7644-9d1e-0410-96f1-a4d463321fa5
* cli: Simplify output geometry calculationjstebbins2014-07-161-15/+13
| | | | | | | | Fix bug where non-anamorphic mode ignores modulus Change default modulus to 2 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6234 b64f7644-9d1e-0410-96f1-a4d463321fa5
* macui/cli/libhb: cleanupjstebbins2014-06-181-113/+6
| | | | | | | | | | | | macui: Simplifies code in Controller.m and fixes a few bugs macui: Fixes "Windows 8 Phone" preset aspect ratio problem macui: round up to next mod boundary when limiting to title dimensions - crop libhb: Eliminates hb_fix_aspect and hb_set_size functions. libhb: Makes hb_validate_size a passthru to hb_set_anamorphic_size cli: eliminage use of hb_validate_size git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6215 b64f7644-9d1e-0410-96f1-a4d463321fa5