summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* 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
* libhb: handle overlapping timestamps betterjstebbins2012-09-111-0/+8
| | | | | | | | | This shouldn't happen except in the case of bad sources or an hb bug. But if encountered, it provoked a feedback loop of frame dropping and duplication where there should have been a single frame drop. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4952 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix error when setting timestamps for bobbed frames in decombjstebbins2012-09-111-14/+6
| | | | | | | | is_combed flag was not getting updated, so the timestamp recalculation was skipped even though 2 frames were output. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4951 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove contrib/ffmpeg/A02-png-sequences.patch.konablend2012-09-102-7/+24
| | | | | | | | | | | | | Set AVPacket flags indicating key-frame for avcodec_decode_video2() call. Specifically, libav documentation states: * @param[in] avpkt The input AVpacket containing the input buffer. * You can create such packet with av_init_packet() and by then setting * data and size, some decoders might in addition need other fields like * flags&AV_PKT_FLAG_KEY. All decoders are designed to use the least * fields possible. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4950 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: make hb_x264_encopt_synonyms two-dimensional instead of faking it.Rodeo2012-09-092-25/+25
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4946 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: use less generic names for some stuff.Rodeo2012-09-092-11/+11
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4945 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level() update & cleanup.Rodeo2012-09-092-120/+146
| | | | | | | | | | The caller may specify any width & height now, rather than having to initialize the x264_param_t's fields directly. Since it's reasonable to expect GUIs to only provide valid levels (if it doesn't, there's a bug that needs fixing), it's OK to abort when the requested level is not valid. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4944 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove mingw+libmkv dependency on libiberty.konablend2012-09-081-1/+1
| | | | | | | | Remove mingw+test dependency on libiberty. Add build system support for propagating compiler DEFINES to contrib configure. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4942 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update Libav -> HandBrake colorimetry translation after ↵Rodeo2012-09-071-8/+10
| | | | | | http://git.libav.org/?p=libav.git;a=commit;h=ca93f0fa361c302e60455c5b82f88422ab66f589 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4932 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Audio improvements.Rodeo2012-09-039-414/+636
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Move mixdown-> channel_layout/matrix_encoding translation to ↵Rodeo2012-08-276-36/+44
| | | | | | | | | | hb_audio_resample_init(). Unlike hb_audio_remap, hb_audio_resample will never be used in situations where we don't have a mixdown. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4923 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_audio_resample: move setters out of hb_audio_resample_update(), to ↵Rodeo2012-08-276-66/+117
| | | | | | dedicated functions. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4922 b64f7644-9d1e-0410-96f1-a4d463321fa5
* 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