summaryrefslogtreecommitdiffstats
path: root/libhb/common.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve management of titles and jobsjstebbins2012-11-121-38/+704
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Audio improvements.Rodeo2012-09-031-317/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use hb_audio_resample for downmixing AC3 sources. DRC is still applied by ↵Rodeo2012-08-021-22/+15
| | | | | | | | | | | | | | | | | liba52. Add support for center & surround mix levels to hb_audio_resample. This allows us to support upmixing all audio sources. For sources that have at least 2 front and one back or side channel(s), allow upmixing to 5.1: 3.0/3.1 (2 front and 1 back channels) 4.0/4.1 (3 front and 1 back channels) 4.0/4.1 (2 front and 2 side channels) 5.0 (3 front and 2 side channels) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4885 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Allow control of audio mix normalizationjstebbins2012-08-011-0/+3
| | | | | | | | | | | | 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
* Use HB_INVALID_AMIXDOWN and HB_AMIXDOWN_NONE where applicable.Rodeo2012-07-291-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4879 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Introduce a negative HB_INVALID_AMIXDOWN.Rodeo2012-07-271-1/+1
| | | | | | | | | | 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
* Fix hb_mixdown_get_discrete_channel_count for HB_AMIXDOWN_NONE (passthrough).Rodeo2012-06-271-5/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4783 b64f7644-9d1e-0410-96f1-a4d463321fa5
* common.h, common.c: minor modifications.Rodeo2012-06-201-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4758 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_get_best_mixdown: fix bug introduced in revision 4755.Rodeo2012-06-201-1/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4757 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: update hb_get_best_mixdown(). I was partially borken after revision 4754.Rodeo2012-06-191-57/+34
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4755 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: drop HB_INPUT_CH_LAYOUT_*Rodeo2012-06-181-16/+14
| | | | | | | | 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-3/+6
| | | | 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-7/+21
| | | | | | 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-29/+33
| | | | | | | | | | | | | | 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
* PGS (bluray) subtitle support \o/jstebbins2012-04-261-0/+59
| | | | | | | | | | | | 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
* LinGui: allow the user to select and use a bitrate for audio autopassthrujstebbins2012-04-261-1/+4
| | | | | | | | If the fallback encoder is used, the user should be able to set the bitrate that is used. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4604 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb/hd_dict.c, add newline at end of file.Rodeo2012-03-291-1/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4556 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Rework filter pipelinejstebbins2012-03-271-19/+79
| | | | | | | | | | | | | | | | | | | | 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 framerate values for 30, 50, 60000/1001 and 60 fps.Rodeo2012-03-191-1/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4518 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add HB_INVALID_AUDIO_QUALITY define. -1 is valid for Vorbis VBR and thus ↵Rodeo2012-02-211-4/+4
| | | | | | | | | | 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-2/+74
| | | | | | (allowed codecs), fallback encoder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4454 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Set default audio compression in hb_autopassthru_apply_settings to get rid ↵Rodeo2012-02-171-0/+1
| | | | | | of an annoying warning in the log. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4453 b64f7644-9d1e-0410-96f1-a4d463321fa5
* ca_aac: set minimum VBR quality to 1 instead of 0.Rodeo2012-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | That way, (high-low)/granularity divides cleanly by 1. Old qualities (low to high in increments of granularity): { 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126 } (the default, 91, is not in that list) New qualities (low to high in increments of granularity): { 1, 10, 19, 28, 37, 46, 55, 64, 73, 82, 91 (default), 100, 109, 118, 127 } Actual output is unchanged (ca_aac has quality ranges; a 1-point bump will not change the range for each quality). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4422 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Vorbis: adjust default VBR quality after revision 4385.Rodeo2012-01-251-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4421 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use -2 to 10 range for Vorbis audio quality (same as what oggenc uses), ↵Rodeo2011-12-231-3/+3
| | | | | | instead of the native libvorbis API values. This is what users will expect. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4385 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix spurious audio compression & quality log warningjstebbins2011-11-141-0/+2
| | | | | | | quality and compression_level were not getting initialized to -1 for passthru. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4350 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Allow vorbis quality to go down to -0.2jstebbins2011-10-311-1/+1
| | | | | | | Bizzaro vorbis allows negative quality factors. They go to 11 in the wrong direction. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4332 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Wrap encoder lists in functions to expose them to Pinvoke.randomengy2011-10-221-0/+15
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4311 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump Libav from v0.7.1 to v0.7-1241-g5f3fb59jstebbins2011-10-151-0/+1
| | | | | | | | | | | | Fixes VC-1 decode issue Adds partial support for interlaced VC-1 decode Adds ProRes decoder Fixes ac3 encoder dolby flag Fixes DCA frame size setting (delete patch A04) Fixes VC-1 repeat field processing (delete patch A05) Numerous other bug fixes and enhancements git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4291 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add flac + quality + compression level supportjstebbins2011-10-121-5/+178
| | | | | | | | | 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
* log printable ascii with hexdumpsjstebbins2011-09-291-3/+14
| | | | | | Provides similar output to 'hexdump -C' *nix command. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4262 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix a crash in HandBrakeCLIjstebbins2011-09-271-0/+6
| | | | | | | | | | | | | When the audio tracks are omitted (no -a), the cli uses the first source audio track and replicates it for each audio output codec. The way it knows what to replicate is to look at audio->in.track for the last audio that was added to the job. This track number was being copied from the title's in.track. But title track numbers are not guaranteed to be sequential (e.g. scan drops tracks it can't decode). So when adding an audio to a job, set in.track to the value of in.track that is passed in the audio_config structure passed to hb_audio_add. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4260 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add utility function for doing hexdumps to logjstebbins2011-09-271-0/+33
| | | | | | | I find myself re-writing a quick and dirty hexdump function far too often when debugging. This will save some time in the future. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4259 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: since Auto Passthru isn't enabled yet, we still need to fall back to ↵Rodeo2011-09-191-1/+1
| | | | | | | | | | AC3 Passthru when loading a preset. Also, update an outdated comment. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4238 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Auto Passthru and audio/video encoder lists.Rodeo2011-09-191-11/+139
| | | | | | | | | | | | | | 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
* Blu-ray: display playlist number in log, CLI scan output, and title drop-down.Rodeo2011-08-161-0/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4182 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix or simplify several hacks involved with Libav supportjstebbins2011-07-271-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For files that are demuxed by Libav, we must share the format context with the decoder iso that it can obtain the codec context for each stream. The code that did this was very convoluted and difficult to understand. It is simplified by simply passing the context in hb_title_t. Reader was closing stream files before the decoder was finished with the context. This created the need to delay the actual close and cache the context. Changed reader so it behaves more like the rest of handbrake's work objects which lets us explicitly close after the decoders are finished. Libav does some probing of the file when av_find_stream_info is called. This probing leaves the format context in a bad state for some files and causes subsequent reads or seeks to misbehave. So open 2 contexts in ffmpeg_open. One is used only for probing, and the other only for reading. decavcodec.c had 2 separate decoders for files demuxed by hb and files demuxed by Libav. They have been combined and simplified. Previously, it was not possible to decode one source audio track multiple times in order to fan it out to multiple output tracks if the file is demuxed by Libav. We were using the codec context from the format context. Since there is only one of these for each stream, we could only do one decode for each stream. Use avcodec_copy_context to make copies of the codec context and allow multiple decodes. This allows removal of a lot of special case code for Libav streams that was necessary to duplicate the output of the decoder. Patch Libav's mkv demux to fix a seek problem. This has been pushed upstreams, so the next time we update Libav, we must remove this patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4141 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: plug a few memory leaksjstebbins2011-07-191-0/+5
| | | | | | | Noticed when debugging a memory corruption issue with valgrind git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4122 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix some warnings in the clijstebbins2011-07-011-1/+1
| | | | | | | and add printf attribute to hb_strdup_printf git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4081 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix a warning in decssasub.c by adding new hb_valog functionjstebbins2011-06-151-32/+38
| | | | | | | | And consolidate logging code in hb_valog. hb_log and hb_deep_log call hb_valog. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4060 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add DTS-HD passthru \o/jstebbins2011-06-141-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4055 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: generalize channel remapping between decoders and encodersjstebbins2011-06-121-0/+1
| | | | | | | | Decoders set the channel map of their output in hb_audio_config_t. Encoders use this information to remap while encoding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4052 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add support for libav aac encoder (libhb only)jstebbins2011-06-071-0/+16
| | | | | | | | | This generalizes the ac3 encoder to make it easy to add support for any audio encoder that libav supports. Since ffaac is not quite ready, the cli and gui does not expose ffaac yet. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4029 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: Add support for naming audio tracks.jstebbins2011-06-031-0/+4
| | | | | | | | Also fix hb_audio_add. It was not copying the audio name. And fix audio track name parsing in the CLI. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4020 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove the depreciated hb_calc_bitrate methodsr552011-05-211-115/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3987 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix some problems with rgb2yuv and yuv2rgbjstebbins2011-05-171-8/+8
| | | | | | | | | | yuv2rgb converted incorrectly. Cb and Cr were swapped in 2 of the 3 conversion expressions. rgb2yuv was setting the color channels in the incorrect order in the output. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3981 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make order of audio tracks found in PS streams more predictablejstebbins2011-04-251-0/+34
| | | | | | | | | Since PS streams don't have a directory of streams, we find them by scanning the PES headers for stream types. We were adding them in the order found which is pretty random. This sorts audios by substream id. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3958 b64f7644-9d1e-0410-96f1-a4d463321fa5
* HE-AAC support for the OSX port. Thanks go to amarcus, ritsuka and rodeo.sr552011-04-181-18/+47
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3937 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix int overflow that can happen when computing PARjstebbins2011-04-161-0/+56
| | | | | | | | | | If the source has large non-reduced PAR values, our computed value was overflowing an int. Compute it in an int64_t then reduce it. Also, keep num and den below 65535. Larger values just aren't really significant and will cause more overflow issues. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3931 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add audio gain adjustment to libhb and CLIjstebbins2011-04-051-0/+1
| | | | | | | | New CLI option is --gain <float>. Value is measured in dB. Negative values are quieter, positive values are louder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3902 b64f7644-9d1e-0410-96f1-a4d463321fa5