summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* LinGui: add x264 preset/tune/profile/level supportjstebbins2012-12-275-0/+58
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5110 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: prevent segfault when opening mp4 file fails.jstebbins2012-12-261-113/+116
| | | | | | | MP4End() attempted to use invalid MP4File context. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5107 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_x264_param_unparse: cosmetics.Rodeo2012-12-201-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5103 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_x264_param_unparse: unset a few options that have no effect in the ↵Rodeo2012-12-201-1/+21
| | | | | | advanced options string. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5102 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level: cosmetics, change the meaning of the last parameter ↵Rodeo2012-12-202-10/+10
| | | | | | (be_quiet -> verbose). Seems more common. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5101 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix mac ui scaling problem after performing live preview encodejstebbins2012-12-171-1/+36
| | | | | | | | we can't touch the picture settings when resetting the job. the mac ui currently depends on these remaining to what it set last. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5099 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix some crashes in the macuijstebbins2012-12-122-0/+3
| | | | | | | | | I missed setting some pointers to NULL after free and missed place where the ui was setting job->file directly instead of using hb_job_set_file(). Also, a NULL chapter name caused a crash. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5097 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: refactor job initialization and cleanupjstebbins2012-12-092-97/+77
| | | | | | | | Separates out some duplicate code in hb_job_reset, hb_job_close, and hb_job_init. Also removes some vestigial function definitions in hb.h git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5096 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix hb_dict_next() when dict is emptyjstebbins2012-12-091-2/+2
| | | | | | | It would return an invalid entry instead of NULL. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5095 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: raise qpmin to 4. 3 has been found to fail on real sources.Rodeo2012-12-091-3/+5
| | | | | | | | Fixes https://forum.handbrake.fr/viewtopic.php?f=5&t=25735 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5094 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix a timing problem when rendering vobsubsjstebbins2012-12-082-11/+41
| | | | | | | | So, if we are rendering the subtitles, do not delay them in sync. The renderer is responsible for handling stop == -1. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5092 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix eedi2 crash in decombjstebbins2012-11-301-1/+0
| | | | | | | | | When converting to using tasksets, I missed a free(thread_args_v) that needed to be removed. So we freed a bad pointer when the eedi2 thread closed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5087 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_x264_param_unparse(): fix typo.Rodeo2012-11-271-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5086 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix memory consumption problemjstebbins2012-11-261-2/+2
| | | | | | | | | Issues with timestamps made cfr think it needed to duplicate a few thousand frames. this leads to an over-cunsumption of memory since all duplicates are placed in a list at once. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5082 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix generation of silence buffer for filling audio gapsjstebbins2012-11-211-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5076 b64f7644-9d1e-0410-96f1-a4d463321fa5
* muxmkv: don't write the last chapter marker if it is shorter than 3/2 second.Rodeo2012-11-211-43/+45
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5075 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_remap: protect against invalid channel layouts.Rodeo2012-11-214-7/+18
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5074 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve support for planar audio.Rodeo2012-11-219-172/+311
| | | | | | | | | | | | | | - encavcodecaudio: use libavresample directly (instead of via the hb_audio_resample wrapper), and add support for planar output - hb_audio_resample: add support for planar input - hb_audio_remap: add support for planar input - deca52: output planar float samples (no re-interleaving) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5073 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix BD encodingjstebbins2012-11-202-11/+16
| | | | | | | | | | | | | | I inadvertently disabled PCR processing in BD in https://trac.handbrake.fr/changeset/5058 This caused bugs to show up in our processing of TS streams that have no PCR. So re-enable PCR processing in BD to fix the regression. And fix the problems with processing TS streams that have no PCR. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5071 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level: miscellaneous cosmetics.Rodeo2012-11-122-33/+66
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5061 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_x264_param_unparse: miscellaneous cosmetics.Rodeo2012-11-122-307/+329
| | | | 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-123-3/+630
| | | | | | 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-1221-583/+1253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a utility function to check whether an H.264 level can be used given the ↵Rodeo2012-11-052-0/+30
| | | | | | current encoding parameters. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5044 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: revert part of revision 4944.Rodeo2012-11-052-25/+21
| | | | | | | | There's no reason why fps would be specified in the x264_param_t vs. width/height via separate parameters. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5043 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encavcodecaudio: cosmetics.Rodeo2012-10-271-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5042 b64f7644-9d1e-0410-96f1-a4d463321fa5
* declpcm: remove an unnecessary instruction.Rodeo2012-10-271-8/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5041 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix initialization of hb_job_t.pfr_vrate(_base).Rodeo2012-10-273-0/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5037 b64f7644-9d1e-0410-96f1-a4d463321fa5
* deca52: avoid repeated alloc/free by re-using a fixed-size buffer.Rodeo2012-10-261-7/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5029 b64f7644-9d1e-0410-96f1-a4d463321fa5
* deca52: remove an unnecessary instruction.Rodeo2012-10-261-8/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5028 b64f7644-9d1e-0410-96f1-a4d463321fa5
* deca52: cleanup.Rodeo2012-10-261-25/+33
| | | | | | | | Some functions were called once per block, where once per frame was enough. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5027 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_remap improvements:Rodeo2012-10-206-114/+197
| | | | | | | | | | - support for additional sample formats - support for variable channel layouts git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5023 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bump libbluray to version 0.2.3.Rodeo2012-10-201-2/+2
| | | | | | | | Miscellaneous fixes and improvements. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5022 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_ff_set_sample_fmt() improvements.Rodeo2012-10-175-24/+48
| | | | | | | | | | - allow setting a sample_fmt other than AV_SAMPLE_FMT_FLT - fall back on planar/packed variant of the requested format if available git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5019 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix crash found on some dvd'sjstebbins2012-10-132-36/+74
| | | | | | | New strutural protection caused us to access null pointer cell_playback table. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5014 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix calculation of sync->gain_factor.Rodeo2012-09-291-1/+1
| | | | | | | | Revision 4976 simplified it, but it was still slightly incorrect. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4993 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: remove unnecessary usage of hb_audio_remap.Rodeo2012-09-233-17/+1
| | | | | | | | All decoders now output channels in Libav order. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4977 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: simplify calculation of sync->gain_factor.Rodeo2012-09-231-3/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4976 b64f7644-9d1e-0410-96f1-a4d463321fa5
* decpgssub: avoid dropping subtitles when we get broken timestamps.Rodeo2012-09-201-9/+24
| | | | | | | | Instead, use a default PTS difference of 3 seconds. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4970 b64f7644-9d1e-0410-96f1-a4d463321fa5
* deca52: ignore mix levels when dowmixing to Lt/Rt.Rodeo2012-09-161-3/+14
| | | | | | | | This matches liba52's built-in downmix code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4966 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_resample: remove unnecessary check.Rodeo2012-09-161-2/+1
| | | | | | | | | | Not sure why I thought this was needed. Apologies if I break anything. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4965 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix a collection of small memory leaksjstebbins2012-09-139-12/+39
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4963 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Revert temporary code that silences valgrind warningsjstebbins2012-09-121-2/+0
| | | | | | | | memsets silence silly valgrind warnings, but we don't want them in "production" git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4962 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix potential invalid memory access in decomb (again)jstebbins2012-09-122-6/+17
| | | | | | | | I missed a spot where an even wider left/right margin is needed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4961 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix potential invalid memory access in decombjstebbins2012-09-121-50/+44
| | | | | | | | | YADIF_CHECK in MODE_CUBIC touches pixels -3 and +3 from the current position. We had a conditional to bypass this check if we were 2 away from left or right edges which was insuffecient for this mode. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4960 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: learn to spell "dilate"jstebbins2012-09-111-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4957 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix logs for decomb threadsjstebbins2012-09-111-3/+3
| | | | | | | | Several threads used the exact same log message when starting which is confusing. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4956 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level: return 1 in case of warnings and make return values > 0 ↵Rodeo2012-09-111-11/+28
| | | | | | | | | | non-fatal. This could be used by a GUI to remove incompatible levels from a drop-down, for example. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4955 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level: add a parameter to silence warnings.Rodeo2012-09-112-28/+36
| | | | | | | | This can be used to avoid log pollution when e.g. using an x264 unparse function. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4954 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Revert a part of revision 4950 which was not in the ReviewBoard patch.Rodeo2012-09-111-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4953 b64f7644-9d1e-0410-96f1-a4d463321fa5