summaryrefslogtreecommitdiffstats
path: root/libhb/common.c
Commit message (Collapse)AuthorAgeFilesLines
* libhb: fix potential seg fault in hb_hexdumpjstebbins2014-07-301-1/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6246 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add new function for retrieving previewsjstebbins2014-07-291-0/+16
| | | | | | | | | | | | | | | | 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: allow user cli options to override defaults for fallback audio encoderjstebbins2014-07-161-8/+57
| | | | | | | Solves: https://forum.handbrake.fr/viewtopic.php?f=10&t=28074&sid=68d8c5bfffd7081625bcd56fb7c4dad1 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6236 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: New denoiser, nlmeans.bradleys2014-06-191-0/+4
| | | | | | | | 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-76/+9
| | | | | | | | | | | | 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
* Add VP8 supportjstebbins2014-04-151-0/+13
| | | | | | | 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-38/+75
| | | | | | | | | 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
* libhb: enable burn-in of all supported text subtitle formatsjstebbins2014-03-301-2/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6141 b64f7644-9d1e-0410-96f1-a4d463321fa5
* x265: enable MP4 and Matroska muxing.Rodeo2014-03-131-6/+1
| | | | | | | Also remove the raw muxer. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6105 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove libfaacsr552014-03-021-29/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6094 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: dynamic detection of availability of libav audio encodersjstebbins2014-03-011-7/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6089 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove HB_API_OLD_PRESET_SETTERS cruft.Rodeo2014-02-181-27/+0
| | | | | | | 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
* QSV: API 1.8 support and related improvementsRodeo2014-02-181-13/+42
| | | | | | | | | Optional feature detection now done via MFXVideoENCODE_Query. This should work better with future hardware and encoder implementations. Optional API 1.8 features are not tested (not supported by the software implementation, and no drivers with API 1.8 support available yet). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6041 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: make encoder options less x264-centric.Rodeo2014-02-131-28/+55
| | | | | | | | 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
* Fix typo in previous commit.Rodeo2014-02-131-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6030 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: write encoding library's name in the Activity Log.Rodeo2014-02-131-42/+96
| | | | | | | 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-4/+4
| | | | | | | 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/+32
| | | | | | | | | | | 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-1/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6000 b64f7644-9d1e-0410-96f1-a4d463321fa5
* decavcodec: DRC support.Rodeo2014-01-251-0/+22
| | | | | | | 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/+2
| | | | | | | | 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
* New getters for video presets, tunes, profiles and levels.Rodeo2013-11-081-0/+57
| | | | | | | | | | 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
* QSV: libhb-based preset system.Rodeo2013-09-241-0/+1
| | | | | | | | | | | | 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
* libhb: make libhb internal character code utf8jstebbins2013-09-221-0/+19
| | | | | | | | | | This makes libhb expect all strings passed to it to be in utf8 format. The cli converts the converts from the current code page to utf8. libhb converts back to the current code page when necessary for libraries that expect it. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5798 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merging-in the OpenCL Scaling code from the OpenCL branch to trunk. sr552013-09-211-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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
* QSV: minor refactoring.Rodeo2013-09-151-3/+4
| | | | | | | | | | 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/+31
| | | | 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/+49
| | | | | | | | 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-45/+54
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5620 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Cosmetics after last commit.Rodeo2013-06-151-8/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5587 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: improve video and audio encoder names.Rodeo2013-06-151-29/+25
| | | | | | | | | | | | | | | | | | When we only have one encoder for a particular codec: - don't add (library_name) in the name - don't prefix with ff or otherwise use the library name in the short name AAC (ffmpeg) -> AAC (avcodec): works for both Libav and FFmpeg. consistency: ffaac -> av_aac (like ca_aac, fdk_aac and so on) VP3 (Theora) -> Theora: Theora is based on VP3, but is not exactly VP3. manicure updated to handle the new names, but built-in presets left untouched (this will require WinGUI updates). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5586 b64f7644-9d1e-0410-96f1-a4d463321fa5
* improve aac encoder build options and change some aac encoder defaultsjstebbins2013-06-151-5/+4
| | | | | | | | | | By default, faac is no longer built. Libav aac is now the default aac encoder on all platforms except osx where ca_aac is the default. fdk-aac is now built by default (except on osx). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5581 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_mixdown_*: use meaningful values instead of -1.Rodeo2013-06-041-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5553 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_video_encoders: cosmetics.Rodeo2013-06-031-8/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5550 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb/common: improve fallback mechanism.Rodeo2013-06-031-418/+759
| | | | | | | | | | | | | | | | | | | | 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-621/+1229
| | | | | | | | | | | | | | | | | | | | - 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
* Fix log pollution when Auto Passthru is not possible and uses the fallback ↵Rodeo2013-04-281-1/+1
| | | | | | | | | | audio encoder, if that encoder does not accept s16(p) input samples. "work: track 1, dithering not supported by codec" git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5421 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_get_best_mixdown: fix out-of-array reads.Rodeo2013-04-281-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5420 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
* fdkaac: new bitrate limits.Rodeo2013-03-041-3/+40
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5297 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fdk_haac: samplerates < 16 kHz are not supported.Rodeo2013-03-041-0/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5296 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add optional fdk-aac encoderjstebbins2013-03-031-0/+9
| | | | | | | configure --enable-fdk-aac to enable this encoder git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5287 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Audio dithering.Rodeo2013-02-051-0/+57
| | | | | | | | | | | | 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-5/+5
| | | | | | | | 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-1/+2
| | | | | | | | 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
* CLI: avoid an #fidef.Rodeo2013-01-041-0/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5146 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add hb_get_default_audio_encoder().Rodeo2013-01-041-7/+12
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5144 b64f7644-9d1e-0410-96f1-a4d463321fa5
* FLAC: add 24-bit encoding.Rodeo2013-01-021-1/+8
| | | | | | | | | | Works via a dedicated encoder: "FLAC (24-bit)", "ffflac24". Users who prefer 16-bit can use the previous FLAC encoder: "FLAC (ffmpeg)", "ffflac". git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5134 b64f7644-9d1e-0410-96f1-a4d463321fa5