summaryrefslogtreecommitdiffstats
path: root/libhb/common.h
Commit message (Collapse)AuthorAgeFilesLines
* CLI: fix dimensions problem when both width and height are specifiedjstebbins2014-08-271-5/+4
| | | | | | | | | | | | | 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-0/+21
| | | | | | | | | | | | | | | | 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
* LinGui/CLI/libhb: add nlmeans denoise filter to linguijstebbins2014-07-211-0/+3
| | | | | | | Move nlmeans preset&tune parsing from cli to libhb git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6239 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix typo in flag definitionjstebbins2014-07-011-1/+1
| | | | | | | NO_IDR and SCAN_COMPLETE values overlapped git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6226 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: New denoiser, nlmeans.bradleys2014-06-191-0/+1
| | | | | | | | Non-local means averages multiple patches of similar pixels together, preserving similarities and attenuating variance (usually noise). This is typically more effective than lowpass and more faithfully restores the appearance of structure and detail found in the original source, especially in the high frequency range. Parameters for origin patch weight tuning and pre-filtering further improve on the original algorithm. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6216 b64f7644-9d1e-0410-96f1-a4d463321fa5
* macui/cli/libhb: cleanupjstebbins2014-06-181-3/+0
| | | | | | | | | | | | 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
* macui: fix PcitureController geometry calculationsjstebbins2014-06-101-9/+49
| | | | | | | | simplifies the code and makes it work better also updates preview window size calculations git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6209 b64f7644-9d1e-0410-96f1-a4d463321fa5
* demux: fix problem with widely spaced SCRsjstebbins2014-05-131-1/+1
| | | | | | | | | | | | | | | | | Fixes this bug report https://forum.handbrake.fr/viewtopic.php?f=12&t=30032 Split MPEG demuxer into TS demuxer and PS demuxer to allow using different PCR/SCR delta tolerance in each scenario. We were using a PCR/SCR delta tolerance that was a bit of a compromise between the max allowed by the specification for TS vs PS streams. But the spec for TS PCR is 100ms and the spec for PS SCR is 700ms, so we risked false detection of discontinuities in PS. In PS streams that pack multiple frames into one PES packet, the detection of a discontinuity causes recalculation of an scr offset which jumps around wildly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6183 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add VP8 supportjstebbins2014-04-151-0/+1
| | | | | | | Thanks to Matthew Harvey for this patch git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6165 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Convert all text subtitles to ASS subsjstebbins2014-04-131-0/+1
| | | | | | | | | Add support for font color to tx3g. Allow more than one style flag at time in tx3g. Add positioning support to CC subs git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6163 b64f7644-9d1e-0410-96f1-a4d463321fa5
* x265: enable MP4 and Matroska muxing.Rodeo2014-03-131-1/+0
| | | | | | | Also remove the raw muxer. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6105 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove libfaacsr552014-03-021-2/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6094 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: remove a52decjstebbins2014-02-201-3/+1
| | | | | | | replace it with libavcodec ac3 decoder git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6049 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove HB_API_OLD_PRESET_SETTERS cruft.Rodeo2014-02-181-49/+5
| | | | | | | All UIs and Interop should be up-to-date. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6044 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update some copyright dates to 2014.Rodeo2014-02-181-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6042 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: make encoder options less x264-centric.Rodeo2014-02-131-14/+56
| | | | | | | | profile/level control and, to a lesser extent, encoder presets and tunes are becoming more common. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6031 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: write encoding library's name in the Activity Log.Rodeo2014-02-131-0/+7
| | | | | | | We lost them for some encoders in SVN revision 5586. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6029 b64f7644-9d1e-0410-96f1-a4d463321fa5
* x265: misc. container-related fixes.Rodeo2014-02-121-2/+2
| | | | | | | CLI users: please use -f x265 instead of -f raw git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6027 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Initial x265 integration. Patch by Zhang Zhiqiang. Thanks!Rodeo2014-02-101-0/+8
| | | | | | | | | | | Build with --enable-x265 (requires CMake). Use via HandBrakeCLI with -a none -e x265 -f raw Only raw HEVC output is supported for now (no audio or subtitles). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6023 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: support AV_FRAME_DATA_MATRIXENCODING side data.Rodeo2014-01-261-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6000 b64f7644-9d1e-0410-96f1-a4d463321fa5
* decavcodec: DRC support.Rodeo2014-01-251-0/+2
| | | | | | | Adds DRC support for E-AC-3 audio (as well as any future libavcodec decoders with DRC support). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5995 b64f7644-9d1e-0410-96f1-a4d463321fa5
* remove contrib mpeg2decjstebbins2014-01-131-1/+0
| | | | | | | | We no longer need mpeg2dec. libav now has all the features we need for mpeg2 decoding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5966 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: make avformat-based muxers the default.Rodeo2013-11-081-2/+2
| | | | | | | | They've matured enough by now. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5890 b64f7644-9d1e-0410-96f1-a4d463321fa5
* OpenCL: use the new library loading architecture for all OpenCL code.Rodeo2013-11-081-54/+7
| | | | | | | | | | | An OpenCL SDK is no longer needed to build OpenCL support. Note: as a result, the --enable-opencl configure option is removed. Also, libOpenCL is no longer needed to run the application (it is still necessary to use OpenCL features, of course). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5886 b64f7644-9d1e-0410-96f1-a4d463321fa5
* New getters for video presets, tunes, profiles and levels.Rodeo2013-11-081-0/+8
| | | | | | | | | | x264 is no longer the only encoder with a built-in preset system; QSV has its own presets, and supports setting the H.264 profile and level, too. Old getters still in place for compatibility with the old API.. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5883 b64f7644-9d1e-0410-96f1-a4d463321fa5
* RB626: return code support addedmaxd2013-11-051-5/+11
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5876 b64f7644-9d1e-0410-96f1-a4d463321fa5
* OpenCL: ship our own headers, to reduce our dependency on external OpenCL SDKs.Rodeo2013-10-201-5/+2
| | | | | | | | Part 1 of a broader OpenCL refactoring. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5844 b64f7644-9d1e-0410-96f1-a4d463321fa5
* QSV: libhb-based preset system.Rodeo2013-09-241-1/+5
| | | | | | | | | | | | Modeled after x264's preset system. MMBRC and LookAhead RC are now enabled by default, whereas Trellis is disabled by default. Please note that Windows GUI support will come later, and that preset names are not definitive. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5806 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merging-in the OpenCL Scaling code from the OpenCL branch to trunk. sr552013-09-211-2/+68
| | | | | | | | | | | | | | | | | | | | | | | | Patch originally by the Multicoreware Inc team, followed by improvements and fixes by Micheal Wootton from AMD Inc, OpenCL: This patch implements Bicubic Scaling in OpenCL. Note that HandBrake currently uses Lanczos so the performance difference appears to be much more significant. We may offer an option of BiCubic in software later. Bicubic scaling may appear a bit sharper than the equivalent Lanczos encode and may increase file size a bit. Quality may be better or worse depending on the scaling and content and personal preference towards sharpness. When comparing performance with a custom HandBrake build that runs Software Bicubic to OpenCL Bicubic, performance increase is about 5~7% on average on a modern GPU. Hardware Decode via DXVA: We also have optional DXVA decoding which may come in useful for slower/lower end systems that have a capable GPU. This is only available on input sources that use the libav decode path. Most GPU hardware for decoding is designed for playback, so if you are running on a high end CPU, it will bottleneck the encode process. Requires OpenCL 1.1 or later supporting GPU. Front end changes and testing framework are not included in this patch. This will be resolved later. Patch will be revised further before the UI is implemented. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5792 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Interop: Removed unused structs and constants and added warnings in libhb ↵randomengy2013-09-191-2/+16
| | | | | | code to update the ones that are used. Broke out types for each struct into their own file. Switched all references to hb_handle_s to IntPtr and deleted that non-working struct. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5786 b64f7644-9d1e-0410-96f1-a4d463321fa5
* QSV: minor refactoring.Rodeo2013-09-151-22/+24
| | | | | | | | | | Address the easy issues first. Apologies if I broke HandBrakeInterop. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5783 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Big merge, QSV to trunk: part 1 (tracked files).Rodeo2013-08-221-2/+45
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5737 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add hb_video_quality_get_limits and hb_video_quality_get_name to libhb API.Rodeo2013-07-131-0/+3
| | | | | | | | Includes a MacGui implementation. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5647 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add experimental avformat muxer for mkv and mp4jstebbins2013-06-301-2/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5620 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb/common: improve fallback mechanism.Rodeo2013-06-031-3/+4
| | | | | | | | | | | | | | | | | | | | API changes: - added hb_global_init(), must be called before any other libhb function - removed (somewhat pointless) hb_mixdown_t.internal_name - some hb_*_get_from_name() functions now return 0 instead of -1. Instead of hardcoded fallbacks, list items now have a specific fallback, and a generic ID for when the specific fallback is unavailable. Encoder availability is checked at runtime (hb_global_init calling hb_common_global_init) and the item's value/fallback is sanity-checked and updated if necessary. See https://reviews.handbrake.fr/r/506/ for more detailed information. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5547 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't expose rate, mixdown, dither and encoder arrays to the UIs.Rodeo2013-05-301-78/+132
| | | | | | | | | | | | | | | | | | | | - instead, make these lists available through enumerators: --> hb_*_get_next(<type> *last); - this should give us more flexibility to populate the lists at runtime, using the implementation(s) of our choice, whether they use arrays or not, without requiring UI modifications - use consistent naming for getters --> hb_get_best_foo() becomes hb_foo_get_best(), and so on - hb_*_get_from_name() and hb_*_ sanitize_name() sanitize the requested value to a supported one if it's unavailable - adds an additional, passthru-specific fallback mechanism - adds a list of video containers git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5526 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make initialization of vfr filter work as I intended.jstebbins2013-05-281-2/+0
| | | | | | | Also fix signalling of framerate in output file when PFR is used. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5522 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix hb_vfr_info() and refactor hb_vfr_init() a bit.Rodeo2013-05-221-4/+2
| | | | | | | | | | | | | Since SVN revision 5058, hb_vfr_init didn't have access to title->rate, rate_base - which are needed to set the input framerate for CFR/PFR. It was therefore printing the output framerate in both cases, regardless of the input framerate: [22:13:04] + frame rate: 23.976 fps -> constant 30.000 fps [22:13:04] + filters [22:13:04] + Framerate Shaper (1:27000000:900000) [22:13:04] + frame rate: 30.000 fps -> constant 30.000 fps git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5499 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update outdated comment.Rodeo2013-04-011-4/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5371 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove unnecessary legacy HB_VCODEC define and minor cleanup.Rodeo2013-04-011-7/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5370 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_system_sleep: minor cleanup after last commit.Rodeo2013-03-181-3/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5337 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_system_sleep: allow/prevent sleep from the UI rather than libhb.Rodeo2013-03-181-0/+3
| | | | | | | | | | The code that sets/unsets the "power assertions" is still in libhb. Patch by Jérôme Lacube. Thanks! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5336 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated all the copyright headers to 2013.sr552013-03-091-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5318 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add optional fdk-aac encoderjstebbins2013-03-031-2/+4
| | | | | | | configure --enable-fdk-aac to enable this encoder git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5287 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve scan progress granularityjstebbins2013-03-011-0/+3
| | | | | | | | We were only updating progress after completely processing each title. Now progress is updated as we generate previews as well. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5276 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Audio dithering.Rodeo2013-02-051-0/+18
| | | | | | | | | | | | Works with encoders that accept 16-bit signed integers as input (currently, only ffflac). When supported, the default method is standard triangular. CLI users can request a specific dither algorithm via the --adither option. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5241 b64f7644-9d1e-0410-96f1-a4d463321fa5
* x264 preset system: miscellaneous improvements.Rodeo2013-01-301-7/+7
| | | | | | | | See https://reviews.handbrake.fr/r/421/ for details. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5225 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_rate_s, hb_mixdown_s, hb_encoder_s: use const char * instead of char *Rodeo2013-01-041-10/+10
| | | | | | | | These are used in hardcoded tables, so there will never be a need for mutable strings. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5148 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add hb_get_default_audio_encoder().Rodeo2013-01-041-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5144 b64f7644-9d1e-0410-96f1-a4d463321fa5
* common.h: cosmetics.Rodeo2013-01-041-20/+23
| | | | | | | | Also remove a couple duplicate function declarations. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5142 b64f7644-9d1e-0410-96f1-a4d463321fa5