summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* libhb: decomb and deinterlace improvementsjstebbins2012-08-277-1415/+1576
| | | | | | | | | | | | | | | | | | Use hb_buffer_t for reference buffers. This is what eliminates extra buffer copies. Simplified a lot of the code. This resulted in some minor speed improvements and easier to read code. Allow mcdeint+bob. Previously these could not be used together. Thread the erode-dilate-erode-check steps in decomb3. More speed improvement. Speed of default decomb went from 62fps to 76fps. Speed of fast decomb went from 90fps to 95fps. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4919 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use a more direct workaround for the DTS-ES XCh decoding issue.Rodeo2012-08-261-12/+0
| | | | | | | | | | The workaround committed in revision 4896 works for now, but if/when we add 6.1 encoding, we'll want to decode that discrete center surround channel. We could special-case it, but the issue would still be present under 64-bit Windows. Instead, disable the buggy assembly optimizations until they are fixed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4918 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Cosmetics.Rodeo2012-08-191-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4910 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove unused code.Rodeo2012-08-191-15/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4909 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't send empty audio packets downstream, as empty buffers are assumed to ↵Rodeo2012-08-152-2/+11
| | | | | | | | | | mark the end of stream. Such packets can result from samplerate or other types of audio conversion. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4906 b64f7644-9d1e-0410-96f1-a4d463321fa5
* declpcm: modify hdr2layout.Rodeo2012-08-151-3/+2
| | | | | | | | AV_CH_LAYOUT_STEREO w/7 or 8 channels is invalid anyway, and will get sanitized in hb_ff_layout_xlat(). Doing it in declpcm directly avoids an unnecessary call to that function, with identical results. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4905 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Check the return code of hb_audio_resample_update(). This allows us to log ↵Rodeo2012-08-153-11/+28
| | | | | | an error when it fails, so we know which decoder actually called the function. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4904 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Let's hope this is the last of my stupid deca52 hb_audio_resample support ↵Rodeo2012-08-151-0/+5
| | | | | | mistakes. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4903 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve last commit. While the AC3 decoder doesn't use hb_ff_layout_xlat(), ↵Rodeo2012-08-112-5/+5
| | | | | | the code I added to it really belongs in hb_audio_resample. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4899 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a bug where we were attempting to downmix Dolby Surround ↵Rodeo2012-08-111-2/+6
| | | | | | (AV_CH_LAYOUT_STEREO_DOWNMIX) to AV_CH_LAYOUT_STEREO via libavresample (which is not implemented). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4898 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_resample: when avresample_open() fails, log the error description.Rodeo2012-08-101-4/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4897 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Restore the old hack that disables DTS-ES extension processing. We support ↵Rodeo2012-08-101-0/+12
| | | | | | | | | | | | 6.1 now, but libavcodec's assembly optimizations are buggy under Win64, causing audio distortion when canceling the matrixed Cs channel out of Ls and Rs. This can be removed when the bugs are fixed. Note: unlike before, we still present the stream as 6.0/6.1 to users; it simplfies the code and doesn't make much difference since we always downmix to at least 5.1 anyway. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4896 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Encode log: indicate if audio->config.out.normalize_mix_level is enabled.Rodeo2012-08-021-0/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4887 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use hb_audio_resample for downmixing AC3 sources. DRC is still applied by ↵Rodeo2012-08-027-169/+200
| | | | | | | | | | | | | | | | | 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-017-12/+25
| | | | | | | | | | | | 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
* Bump Libav to v0.8-2551-gc83f44d.Rodeo2012-07-301-3/+0
| | | | | | | | | | | | | | Fixes an issue in assembly code that could result in very poor performance when encoding with x264 & AC3 Passthru. Thanks to our John Stebbins for finding the cause of the bug, and to x264 & Libav developers for fixing it. Miscellaneous other fixes and improvements, including multichannel Apple Lossless audio decoding support. Also, clean up our Libav configure options (group things together, disable all hardware accelerations with one switch instead of individually, and disable building the unused avfilter library). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4883 b64f7644-9d1e-0410-96f1-a4d463321fa5
* work: simplify & optimize.Rodeo2012-07-291-47/+38
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4882 b64f7644-9d1e-0410-96f1-a4d463321fa5
* work: indentation and miscellaneous cosmetics.Rodeo2012-07-291-181/+182
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4881 b64f7644-9d1e-0410-96f1-a4d463321fa5
* work: don't sanitize output bitrate etc. for passthrough audio.Rodeo2012-07-291-11/+15
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4880 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use HB_INVALID_AMIXDOWN and HB_AMIXDOWN_NONE where applicable.Rodeo2012-07-292-7/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4879 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Introduce a negative HB_INVALID_AMIXDOWN.Rodeo2012-07-272-1/+3
| | | | | | | | | | 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
* muxmkv: reset the output track configuration before adding each audio track, ↵Rodeo2012-07-241-3/+2
| | | | | | | | | | rather than just once before adding all audio tracks. Among other things, avoids having the HE-AAC outputSamplingFreq contaminate all following non-HE or non-AAC tracks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4874 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Only log the input bitrate if it's valid; some decoders (e.g. TrueHD) set it ↵Rodeo2012-07-231-1/+7
| | | | | | | | | | | | to a dummy value of 1, resulting in: [05:15:24] * audio track 1 [05:15:24] + decoder: English (truehd) (5.1 ch) (track 1, id 0x1) [05:15:24] + bitrate: 0 kbps, samplerate: 48000 Hz git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4870 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix logging of container aspect in dvd.c and dvdnav.cjstebbins2012-07-222-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4869 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Enable threaded decoding for ProRes video sources.Rodeo2012-07-181-4/+1
| | | | | | | | | | The bug which was worked around by disabling threading has now been fixed in Libav, and I didn't find any issue when testing additional ProRes sources. Reference: https://forum.handbrake.fr/viewtopic.php?f=12&t=22599 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4866 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix deinterlace fast green stripejstebbins2012-07-182-12/+15
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4865 b64f7644-9d1e-0410-96f1-a4d463321fa5
* More fine grained progress statistics during subtitle scanjstebbins2012-07-182-30/+82
| | | | | | | | Make reader compute subtitle scan progress based on timestamps seen and duration instead of chapter marks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4864 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_remap: remove unneeded channel map.Rodeo2012-07-151-1/+0
| | | | | | | | I forgot part of it in the previous commit. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4846 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_remap: remove unneeded channel map.Rodeo2012-07-151-16/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4845 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use libav for dts audio decoding instead of libdca jstebbins2012-07-1511-459/+19
| | | | | | | | | 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
* Change a few more hb_log() calls to hb_error(), and some cosmetics.Rodeo2012-07-152-33/+35
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4840 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix something John and I both missed.Rodeo2012-07-151-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4839 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_resample: libvaresample wrapper.Rodeo2012-07-155-331/+400
| | | | | | | | Avoids having code that's mostly identical in multiple files. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4838 b64f7644-9d1e-0410-96f1-a4d463321fa5
* decpgssub: simplify code (merge several if/else blocks).Rodeo2012-07-151-35/+27
| | | | | | | | Also, discard empty subtitles until we've seen the first non-empty sub, as they are not needed. This can happen when encoding from the middle of a source, for example. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4837 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_remap improvements.Rodeo2012-07-126-181/+268
| | | | | | | | | | This moves some logic outside of the decoders/encoders and into a single place. Encoders that do their own remapping (faac, vorbis) can still generate a remap table with hb_audio_remap_build_table(), without having to use hb_audio_remap(). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4827 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Cleanup after last commit: delete empty files, rename some patches.Rodeo2012-07-112-0/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4826 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump libav to libav-v0.8-2197-g1a068bfjstebbins2012-07-1123-2168/+757
| | | | | | | | | | | | 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
* libhb: fix hb_read_preview() when invalid index is passedjstebbins2012-07-111-0/+1
| | | | | | | Was returning last preview instead of NULL git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4823 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix problem reading previewjstebbins2012-07-101-2/+11
| | | | | | | | | The title "index" is not an index into list_title. It is a unique number assigned to each title in the list. So we must scan the list for a matching "index". git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4822 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix comb detection crash and decomb crashjstebbins2012-07-064-34/+20
| | | | | | | | | | | | | hb_detect_comb() could crash because the dimensions of the video buffer don't have to match the dimensions returned by work object info() method if the video has segments of differeing resolutions. decomb was allocating reference buffers that were too small. This bug appears to have always existed but doesn't usually get triggered because malloc usually rounds allocation sizes up. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4812 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix live preview crash when generating preview while encodingjstebbins2012-07-031-11/+12
| | | | | | | GetFifoForId() was not re-entrant (it used a static array). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4809 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix unused variable warningjstebbins2012-07-021-1/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4806 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix comparison (check if unsigned type is < 0). Not sure why I keep doing this.Rodeo2012-07-021-5/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4804 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix crop detectionjstebbins2012-06-301-17/+18
| | | | | | | It wasn't accounting for stride that is greater than width git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4803 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encca_aac.c: oesc.mDataByteSize is signed.Rodeo2012-06-291-9/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4791 b64f7644-9d1e-0410-96f1-a4d463321fa5
* muxmkv: improve reliability of HE-AAC check when doing AAC Passthru.Rodeo2012-06-291-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4789 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix hb_mixdown_get_discrete_channel_count for HB_AMIXDOWN_NONE (passthrough).Rodeo2012-06-272-8/+11
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4783 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encca_aac: tabs to spaces and miscellaneous cosmetics.Rodeo2012-06-261-44/+52
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4780 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encca_aac: chnage a variable type (should have been done in revision 3754).Rodeo2012-06-251-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4778 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encca_aac: fix an issue where a valid output buffer would be dropped, ↵Rodeo2012-06-251-153/+175
| | | | | | | | | | | | causing minor A/V desync and a missing audio output frame. This could happen when encoding to HE-AAC, or encoding to AAC with a very low bitrate. Also, minor cleanup (i.e. cosmetics). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4777 b64f7644-9d1e-0410-96f1-a4d463321fa5