summaryrefslogtreecommitdiffstats
path: root/test/test.c
Commit message (Collapse)AuthorAgeFilesLines
* Audio dithering.Rodeo2013-02-051-0/+106
| | | | | | | | | | | | 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-43/+43
| | | | | | | | See https://reviews.handbrake.fr/r/421/ for details. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5225 b64f7644-9d1e-0410-96f1-a4d463321fa5
* manicure: bugfixes.Rodeo2013-01-261-11/+11
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5204 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix AppleTV preset in ShowPresets().Rodeo2013-01-061-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5162 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui,CLI: change h.264 profile to high in AppleTV presetjstebbins2013-01-061-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5161 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix previous commit. free(NULL) is perfectly safe.Rodeo2013-01-061-19/+19
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5157 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: check against NULL before freeing.Rodeo2013-01-061-31/+32
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5156 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix warning.Rodeo2013-01-041-10/+8
| | | | | | | | test/test.c:378: warning: ‘ShowCommands’ was used with no prototype before its definition git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5149 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_rate_s, hb_mixdown_s, hb_encoder_s: use const char * instead of char *Rodeo2013-01-041-1/+1
| | | | | | | | 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: help: print per-encoder default mixdown dynamically.Rodeo2013-01-041-8/+14
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5147 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: avoid an #fidef.Rodeo2013-01-041-5/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5146 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: use hb_get_default_audio_encoder().Rodeo2013-01-041-26/+28
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5145 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix logging of the default mixdown in --help.Rodeo2013-01-041-12/+17
| | | | | | | | Also, some minor cosmetics/refactoring. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5143 b64f7644-9d1e-0410-96f1-a4d463321fa5
* update presets for lingui and CLIjstebbins2012-12-271-150/+160
| | | | | | | These new presets use x264 preset/tune/profile/level git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5111 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve management of titles and jobsjstebbins2012-11-121-42/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* CLI, manicure: cosmetics.Rodeo2012-10-271-47/+0
| | | | | | | | Makes it easier to update CLI presets without having to worry about whitespace polluting the diffs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5038 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix the AppleTV 3 preset once more.Rodeo2012-10-271-0/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5036 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix AppleTV 3 preset again.Rodeo2012-10-271-1/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5034 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: cosmetics.Rodeo2012-10-271-20/+20
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5032 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix AppleTV 3 preset.Rodeo2012-10-271-1/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5031 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Audio improvements.Rodeo2012-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* CLI help: generate the list of available audio mixdowns, rather than naving ↵Rodeo2012-09-011-3/+14
| | | | | | it hardcoded. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4924 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Allow control of audio mix normalizationjstebbins2012-08-011-0/+48
| | | | | | | | | | | | 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
* Update CLI Presetssr552012-06-291-22/+70
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4796 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix more compiler warningsjstebbins2012-05-261-2/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4702 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix mismatch between ShowHelp() and ParseOptions(). Fix help in order ↵Rodeo2012-05-121-1/+1
| | | | | | to not break existing scripts etc. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4664 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix problem with positions of burned-in subsjstebbins2012-05-051-1/+5
| | | | | | | | | | | | | | | | | 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
* libhb: if no source chapter name information is available, set default ↵Rodeo2012-05-031-15/+0
| | | | | | | | | | | | | | chapters names explicitly (rather than leaving it to the interfaces). Standardize calculation of chapter->hours, chapter->minutes and chapter->seconds across all sources. Get rid of an unused variable in libhb/dvd.c Ignore chapter names set by MakeMKV. "Chapter 1" is just as good as, if not better than "Chapter 01" or even "Chapter 00". git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4636 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: CLI: skip invalid audio input tracks, like we already do for subtitles.Rodeo2012-05-031-51/+57
| | | | | | | | Fixes https://forum.handbrake.fr/viewtopic.php?f=10&t=22746 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4635 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: bob deinterlacingjstebbins2012-05-011-4/+19
| | | | | | | | This is jbrjake's patch for bob deinterlacing applied to decomb and deinterlace filters. Thanks to yeasah's for refinements and testing of this patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4625 b64f7644-9d1e-0410-96f1-a4d463321fa5
* cli: allow use of hh:mm:ss format when specifying p-to-p start/stop timejstebbins2012-05-011-12/+29
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4624 b64f7644-9d1e-0410-96f1-a4d463321fa5
* PGS (bluray) subtitle support \o/jstebbins2012-04-261-4/+3
| | | | | | | | | | | | 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
* libhb: use source colorimetry information when available.Rodeo2012-03-281-8/+13
| | | | | | | | | 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-37/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4551 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Rework filter pipelinejstebbins2012-03-271-32/+66
| | | | | | | | | | | | | | | | | | | | 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 Auto Passthru support to manicure.Rodeo2012-03-251-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4539 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add hb_apply_h264_level(). Sets and ensures compliance with the specified ↵Rodeo2012-03-241-7/+37
| | | | | | | | | | 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
* Fix typo.Rodeo2012-02-221-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4463 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: "Rip" -> "Encode"sr552011-11-291-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4367 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix bitrate parameter parsingjstebbins2011-10-261-2/+0
| | | | | | | When fewer bitrates than tracks were specified and only one bitrate is specified, we didn't apply the bitrate to all tracks properly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4321 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add flac + quality + compression level supportjstebbins2011-10-121-51/+114
| | | | | | | | | 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
* CLI: x264 preset, tuning, and profile supportjstebbins2011-10-021-2/+92
| | | | | | | | New cli options --x264-preset, --x264-tune, and --x264-profile. x264 preset and tune are set first, followed by any custom x264 option string, and finally the profile is applied. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4265 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: add loose cropping optionjstebbins2011-09-261-1/+63
| | | | | | | | | | Adds --loose-crop option. Loose croping rounds up (or down) the crop values to the specified mod so that scaling is not required. One noteworthy efect of this is that both display aspect and pixel aspect in the output will be exactly the same as the source when anamorphic is enabled. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4255 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Auto Passthru and audio/video encoder lists.Rodeo2011-09-191-229/+122
| | | | | | | | | | | | | | This adds Auto Passthru as another encoder in libhb. Used in LinGUI and CLI. MacGUI features a partial impplmentation (with hardcoded values), which is disabled for now. Also, audio and video encoders are now stored in "lists", like we previously did for mixdowns. New mixdown "None" (HB_AMIXDOWN_NONE) added to hb_audio_mixdowns (was previously declared in MacGUI/LinGUI). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4237 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: add missing newline in help text.Rodeo2011-09-141-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4222 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix a case where DTS/DTS-HD Passthru was reaching code only meant for ↵Rodeo2011-09-051-29/+40
| | | | | | Auto Passthru. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4206 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix a typo in the help text.Rodeo2011-09-031-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4204 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: standardize passthru fallbacks.Rodeo2011-08-191-33/+81
| | | | | | | | | | | | | | | | copy:aac -> faac copy:ac3 -> ac3 copy:mp3 -> lame copy -> --audio-fallback, else aac, ac3 or lame (if found in the audio copy mask), else dropped copy:dts and copy:dtshd are always dropped. When --audio-copy-mask contains only one codec, 'copy' behaves exactly like codec-specific passthru and --audio-fallback is ignored. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4190 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix a bug where gain wouldn't be initialized when there were more input ↵Rodeo2011-08-191-1/+15
| | | | | | audio tracks than the number of gain values specified in the command line. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4189 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Blu-ray: display playlist number in log, CLI scan output, and title drop-down.Rodeo2011-08-161-0/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4182 b64f7644-9d1e-0410-96f1-a4d463321fa5