summaryrefslogtreecommitdiffstats
path: root/libhb/common.h
Commit message (Collapse)AuthorAgeFilesLines
* OpenCL: Merging Trunk to OpenCL Branch.sr552013-09-061-4/+54
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5770 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Changes to OpenCL scaling to reduce memory copies and improve performance.sr552013-09-061-18/+11
| | | | | | | | | | Video frames are stored in mapped OpenCL buffers rather than (directly) malloced memory. Changed scaling to use a single kernel rather than two. Changed scaling method to bicubic. Disabled scaling during dxva video extraction. Scaling can not be done that early in the pipeline. Patch by Michael Wootton git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5769 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merging Trunk into OpenCLsr552013-06-151-3/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5580 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merging Trunk into OpenCLsr552013-06-011-80/+132
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5541 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merging Trunk to OpenCLsr552013-05-261-4/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5518 b64f7644-9d1e-0410-96f1-a4d463321fa5
* OpenCL: fix darwin build without --disable-xcode.Rodeo2013-05-171-1/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5466 b64f7644-9d1e-0410-96f1-a4d463321fa5
* improve code stylehandbrake2013-05-021-5/+5
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5436 b64f7644-9d1e-0410-96f1-a4d463321fa5
* OpenCL: Merging Trunk to OpenCL branch in preparation to merge back to core ↵sr552013-04-281-11/+8
| | | | | | after the upcoming release ships. git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5418 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merging Trunk to OpenCL branchsr552013-03-091-3/+5
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5319 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Another opencl header fix on Mac.sr552013-03-011-0/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5281 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merging Trunk into OpenCLsr552013-03-011-0/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5279 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix the deinterlace issuehandbrake2013-02-281-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5275 b64f7644-9d1e-0410-96f1-a4d463321fa5
* tidy up log output, useless codehandbrake2013-02-251-2/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5268 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merging Trunk into OpenCL Branch.sr552013-02-241-0/+18
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5264 b64f7644-9d1e-0410-96f1-a4d463321fa5
* modify GPU test, opencl support AMD and Nvidia graphichandbrake2013-02-171-2/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5255 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Replace some code with platform independenthandbrake2013-02-081-11/+1
| | | | | | | Remove some useless code git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5243 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merging trunk to cl branch.sr552013-02-021-7/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5234 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add a new compile option: --enable-hwdhandbrake2013-01-311-7/+6
| | | | | | | | | | | | change the GUI uvd checkbox's name to hardware decoder modify the issue compile on linux modify the issue on Intel platform with Intel integrate graphic add a new opencl scale algorithm, PSNR goes up (added files: scale.h, scale.c, scale_kernel.h, scale_kernel.c) merge the cropscaleaccl.c to cropscale.c merge the decavcodecaccl.c to decavcodec.c git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5227 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merging Trunk into the OpenCL branch. This includes an updated version of ↵sr552013-01-061-33/+39
| | | | | | libav. 0.9 beta 3 git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5155 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merging trunk to opencl branch.sr552012-12-291-0/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5116 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add hardware decoder support for H264(vob/m2ts), mpeg2(vob/m2ts), ↵handbrake2012-12-181-1/+82
| | | | | | | | | VC1(WMV3/m2ts) decoding modify the GUI for adding some user options about enable/disable OpenCL or GPU add some test case for tesing our modifications. git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5100 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_x264_param_unparse: miscellaneous cosmetics.Rodeo2012-11-121-6/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5060 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_x264_param_unparse: returns a complete x264 encopts string from a ↵Rodeo2012-11-121-0/+8
| | | | | | preset/tune(s)/profile/level/encopts combo. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5059 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve management of titles and jobsjstebbins2012-11-121-18/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleans up several several unavoidable memory leaks caused by old api. Clearly separates titles from jobs. Titles are set during scan and never modified now. Since titles are immutable, this lead to API some changes. For example, We were setting chapter names in the title from the front ends. Now these get set in the job. These new APIs allow us to start moving away from our use of title->job. Eventually, I would like to eliminate title->job completely, but the mac ui is too tightly tied to using this field to allow removing it at this time. So there is temporarily a convenience function used only by the mac ui that allows it to continue using title->job and also use the new APIs. New APIs: typedef struct hb_title_set_s hb_title_set_t; struct hb_title_set_s { hb_list_t * list_title; int feature; // Detected DVD feature title }; hb_title_set_t * hb_get_title_set( hb_handle_t * ); This is just something I added to clean up how "feature title" info is passed. hb_job_t * hb_job_init( hb_title_t * title ); Initializes a new job with default settings from the title. hb_job_t * hb_job_init_by_index( hb_handle_t *h, int title_index ); Same as hb_job_init(). For use by win Interop lib. void hb_job_reset( hb_job_t * job ); Convenience function for the MacUi. Clears audio, subtitle, and filter lists. The macui still uses title->job because it is so intricately tied to it. So I created this convenience function that it can call after adding a job. void hb_job_close( hb_job_t ** job ); Releases the job an all resources it contains. void hb_job_set_advanced_opts( hb_job_t *job, const char *advanced_opts ); Makes a copy of "advanced_opts" and stores in job. Freed by hb_job_close(). void hb_job_set_file( hb_job_t *job, const char *file ); Makes a copy of "file" and stores in job. Freed by hb_job_close(). void hb_chapter_set_title(hb_chapter_t *chapter, const char *title); Makes a copy of "title" and stores in chapter. Freed by hb_chapter_close(). Recommended usage (cli and lingui are updated to do this): job = hb_job_init( title ); // set job settings ... hb_add(h, job); hb_job_close( &job ); I have also added new APIs for managing metadata. These are used to add metadata to a job. void hb_metadata_set_name( hb_metadata_t *metadata, const char *name ); void hb_metadata_set_artist( hb_metadata_t *metadata, const char *artist ); void hb_metadata_set_composer( hb_metadata_t *metadata, const char *composer ); void hb_metadata_set_release_date( hb_metadata_t *metadata, const char *release_date ); void hb_metadata_set_comment( hb_metadata_t *metadata, const char *comment ); void hb_metadata_set_genre( hb_metadata_t *metadata, const char *genre ); void hb_metadata_set_album( hb_metadata_t *metadata, const char *album ); void hb_metadata_set_coverart( hb_metadata_t *metadata, const uint8_t *coverart, int size ); Example: job = hb_job_init( &job ); // set job settings ... hb_metadata_set_artist( job->metadata, "Danny Elfman" ); hb_add(h, job); hb_job_close( &job ); Some APIs have changed in order to avoid using title incorrectly and use the new hb_title_set_t. -void hb_autopassthru_apply_settings( hb_job_t * job, hb_title_t * title ); +void hb_autopassthru_apply_settings( hb_job_t * job ); -void hb_get_preview( hb_handle_t *, hb_title_t *, int, uint8_t * ); +void hb_get_preview( hb_handle_t *, hb_job_t *, int, uint8_t * ); hb_thread_t * hb_scan_init( hb_handle_t *, volatile int * die, const char * path, int title_index, - hb_list_t * list_title, int preview_count, + hb_title_set_t * title_set, int preview_count, int store_previews, uint64_t min_duration ); These APIs have been removed. Win Interop will need some changes. I think what I've provided will be suffecient, but let me know if it's not. -void hb_get_preview_by_index( hb_handle_t *, int, int, uint8_t * ); -void hb_set_anamorphic_size_by_index( hb_handle_t *, int, - int *output_width, int *output_height, - int *output_par_width, int *output_par_height ); git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5058 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix initialization of hb_job_t.pfr_vrate(_base).Rodeo2012-10-271-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5037 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Audio improvements.Rodeo2012-09-031-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New supported samplerates: 8, 11.025, 12, 16 kHz. Now 8, 11.025, 12, 16, 22.05, 24, 42, 44.1, 48 Khz are supported. Unsupported samplerates are sanitized to the closest samplerate for all encoders. Samplerates < 32 kHz are now forbidden for AC3 encoding (sanitized to 32 kHz). Most AC3 decoders don't support such samplerates. New upmixing: 3.0 (Front Left, Right & Center) can now be upmixed to 5.1 to preserve the center channel. New mixdowns: 6.1 (Front Left, Right & Center, Surround Left, Right & Center, LFE) 7.1 (Front Left, Right & Center, Surround Left & Right, Rear Left & Right, LFE) -> available to Vorbis & FLAC encoders for compatible input channel layouts 7.1 (Front Left, Right & Center, Front Left & Right of Center, Surround Left & Right, LFE) -> available to AAC encoders (ca_aac, ca_haac, faac) for compatible input channel layouts Mono (Left Only): Stereo to Mono by discarding the Right channel Mono (Right Only): Stereo to Mono by discarding the Left channel -> available to all encoders for non-Dolby Stereo input The "6-channel discrete" mixdown becomes "5.1 Channels". New bitrates: 960 - 1536 Kbps. This lets users work around poor audio quality in crappy encoders by throwing more bits at them. Bitrate limits have been re-worked and re-tested for all encoders. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4930 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Allow control of audio mix normalizationjstebbins2012-08-011-0/+1
| | | | | | | | | | | | Since switching to libavresample for audio mixing, our output volume levels have been reduced because libavresample does mix level normalization by default. This change applies a patch to libav to allow us to disable this behavior and adds a new field to hb_audio_config_t to allow the hb frontends to control this feature. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4884 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Introduce a negative HB_INVALID_AMIXDOWN.Rodeo2012-07-271-0/+2
| | | | | | | | | | Having the audio->config.out.mixdown start at 0 caused it to be treated as usigned (under OS X at least), causing the sanitizing code in work.c to fail: line 820, (audio->config.out.mixdown <= 0) would evaluate as false, and so the best mixdown was being set instead of the default one. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4878 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use libav for dts audio decoding instead of libdca jstebbins2012-07-151-1/+1
| | | | | | | | | libdca has no advantage over libav for dts audio decoding. It doesn't do drc and it's downmix capabilities are actually inferior to libav. So this completely removes libdca from libhb git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4844 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump libav to libav-v0.8-2197-g1a068bfjstebbins2012-07-111-2/+2
| | | | | | | | | | | | Resolves several deprecated api's Eliminates several libav patches Eliminates our builtin downmix in favour of avresample Eliminate HB_INPUT_CH_LAYOUT_* and replace with AV_CH_LAYOUT_* Resolves 6.x and 7.0 input channel layout issues HB had Adds downmix support to declpcm. We never had it! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4825 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix hb_mixdown_get_discrete_channel_count for HB_AMIXDOWN_NONE (passthrough).Rodeo2012-06-271-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4783 b64f7644-9d1e-0410-96f1-a4d463321fa5
* common.h, common.c: minor modifications.Rodeo2012-06-201-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4758 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: drop HB_INPUT_CH_LAYOUT_*Rodeo2012-06-181-40/+16
| | | | | | | | AV_CH_LAYOUT_* works for us, and as its usage becomes more widespread in libhb, translating between the two formats gets increasingly tedious. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4754 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated file copyright / GPL headerssr552012-06-151-4/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4737 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make HB_AMIXDOWN_* defines a simple enumeration. The existing system wasn't ↵Rodeo2012-06-061-45/+23
| | | | | | necessary and didn't work in all decoders for Dolby downmixing. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4714 b64f7644-9d1e-0410-96f1-a4d463321fa5
* decdca: attempt to fix Dolby Surround and Pro Logic II mixdown. We were ↵Rodeo2012-05-271-47/+36
| | | | | | | | | | | | | | doing it wrong in some cases. This means Dolby Pro Logic II is now only available for sources with at least L, R, C, Ls, Rs channels (as well as any additional channels), due to some libdca limitations. This will eventually go away when we use our own downmixing for all sources. Further cleanup to follow. Also cleans up usage of audio->config.in.flags (was audio->config.flags.*). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4705 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix problem with positions of burned-in subsjstebbins2012-05-051-1/+0
| | | | | | | | | | | | | | | | | When cropping and/or scaling, the position of burned-in SSA subs was broken. Also, when scaling, the position of all other burned-in subs was broken. Part of this fix is to revert a bit of filter initialization changes that were made in this commit https://trac.handbrake.fr/changeset/4605 The other part of the fix is to add cropping parameters to the initialization of the subtitle rendering filter. This filter needs the *original* title dimensions and the crop values in order to compute the positions properly. The changes that I am reverting gave it the scaled job dimensions and the crop values. This was wrong in so many ways it's embarassing :p git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4642 b64f7644-9d1e-0410-96f1-a4d463321fa5
* PGS (bluray) subtitle support \o/jstebbins2012-04-261-1/+13
| | | | | | | | | | | | Thanks to patches supplied by David Mitchell and Rob McMullen we finally have PGS support. I added a fix for libav pgs timestamp processing and detection of forced subtitles to their work, then made foreign audio search work with PGS subs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4605 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: add functionality to retrieve the "preferred" option name for ↵Rodeo2012-03-291-0/+3
| | | | | | options that have multiple names. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4554 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: use source colorimetry information when available.Rodeo2012-03-281-0/+22
| | | | | | | | | When source colorimetry can't be determined, guess. Added code to guess PAL SD content and updated code to guess HD content. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4552 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: use x264_param_apply_fastfirstpass.Rodeo2012-03-281-0/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4551 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Rework filter pipelinejstebbins2012-03-271-25/+68
| | | | | | | | | | | | | | | | | | | | This patch enhances the filter objects. The 2 key improvements are: 1. A filter can change the image dimensions as frames pass through it. 2. A filter can output more than one frame. In addition, I have: Moved cropping & scalling into a filter object Added 90 degree rotation to the rotate filter Moved subtitle burn-in rendering to a filter object. Moved VFR/CFR handling into a framerate shaping filter object. Removed render.c since all it's responsibilities got moved to filters. Improves VOBSUB and SSA subtitle handling. Allows subtitle animations. SSA karaoke support. My apologies in advance if anything breaks ;) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4546 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add hb_apply_h264_level(). Sets and ensures compliance with the specified ↵Rodeo2012-03-241-1/+3
| | | | | | | | | | H.264 level. Does not modify framerate and resolution but prints warnings when they are incompatible with the requested level. Exposed to CLI users only via the --h264-level option. GUI support may come later, once we decide how to handle x264 presets/tunes/profiles. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4534 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add HB_INVALID_AUDIO_QUALITY define. -1 is valid for Vorbis VBR and thus ↵Rodeo2012-02-211-0/+3
| | | | | | | | | | doesn't work for this purpose. Fixes Vorbis VBR with --aq < 0 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4461 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Print more Auto Passthru information to the Activity Log: passthru mask ↵Rodeo2012-02-171-0/+2
| | | | | | (allowed codecs), fallback encoder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4454 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Align stack of all threads created by libhbjstebbins2011-11-181-0/+11
| | | | | | | This is a preemptive measure to prevent any future crashes in SSE code that requires 16 byte stack alignment. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4358 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix ac3 mixdown to monojstebbins2011-11-021-1/+1
| | | | | | | we were setting the wrong mixdown flag. Funny how something like this can go for so long unnoticed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4337 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Wrap encoder lists in functions to expose them to Pinvoke.randomengy2011-10-221-0/+16
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4311 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix a problem with resolution changes in h.264jstebbins2011-10-171-0/+1
| | | | | | | | | | | | First, the scaling code in decavcodec.c was broken and didn't properly compensate for frames that had a different resolution than the rest of the stream. Second, libav can not handle resolution changes when doing frame based multi-threading. So disable threading when resolution changes are detected. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4295 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add flac + quality + compression level supportjstebbins2011-10-121-6/+15
| | | | | | | | | Adds flac audio to cli, lingui, and macgui Adds quality and compression level options to cli Adds quality option to lingui Quality option works for vorbis and lame git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4281 b64f7644-9d1e-0410-96f1-a4d463321fa5