jstebbins [Wed, 2 Nov 2011 16:26:11 +0000 (16:26 +0000)]
Disable DTS-HD LBR secondary audio tracks
DTS-HD LBR used in HD-DVD and bluray for secondary audio
streams. Libav can not decode yet. Having it in the audio
list causes long delays during scan while we try to get stream
parameters. So skip this audio type for now.
Fixes problem setting dsur_mode in ac3 encoder that caused encode
failures if using ac3 encoder and mixdown is dolby or dplii.
Fixes a VC-1 decode issue that caused scattered misplaced blocks.
Fixes swscale bug that caused banding.
jstebbins [Tue, 25 Oct 2011 02:18:15 +0000 (02:18 +0000)]
Add optional yasm contrib
To enable, "configure --enable-local-yasm"
Ubuntu 10.04 LTS (lucid) has yasm 0.8 which is no longer compatible with
x264. This change allows us to build yasm as a contrib and use it for
building both Libav and x264 which require yasm.
jstebbins [Sat, 22 Oct 2011 19:36:15 +0000 (19:36 +0000)]
Add new decomb modes
This is jbrjakes decomb3 patch.
New modes are gamma compensation and erode dialate filter.
Gamma adjusting pixel values makes less visible differences count less
in the metric that is calculated. Filtering removes isolated "hits"
that are more likely noise. This all makes decomb more discerning and
therefore the thresholds can be lowered.
The filter's defaults use these new modes with lower thresholds. If you
want the old behavior, use:
7:2:6:9:1:80
jstebbins [Fri, 21 Oct 2011 18:24:43 +0000 (18:24 +0000)]
ASS bump to 0.10.0
libass has a new dependency on fribidi. So also add fribidi to
contribs. I repackaged the libass distribution because the configure
script shipped with it is damaged beyond repair for darwin.
jstebbins [Fri, 21 Oct 2011 17:44:51 +0000 (17:44 +0000)]
bump libvorbis from aoTuV b5 to b6.03
Libvorbis aoTuV was unified with Xiph.Org's libvorbis1.3.2.
Many bug fixes and improvements.
Enlarge buffer for audio headers. The new vorbis generates
larger code book headers.
patch configure to fix llvm -O4 bug
jstebbins [Mon, 17 Oct 2011 21:36:53 +0000 (21:36 +0000)]
detect progressive upsampling in vfr
progressive 23.976 fps content that has upsampled to progressive 59.94
fps can result in juddery output if you don't drop the "right" frames
while downsampling back to 23.976. This adds a test that computes the
sum of squared errors between 2 candidate frames to drop and makes a
more intelligent decision based on this metric.
jstebbins [Mon, 17 Oct 2011 16:24:24 +0000 (16:24 +0000)]
fix a problem with resolution changes in h.264
First, the scaling code in decavcodec.c was broken and didn't properly
compensate for frames that had a different resolution than the rest of
the stream.
Second, libav can not handle resolution changes when doing frame based
multi-threading. So disable threading when resolution changes are
detected.
jstebbins [Sun, 16 Oct 2011 17:33:20 +0000 (17:33 +0000)]
LinGui: experimental support for batch queuing
This allows all titles in the title popup to be added to the queue in
one go. It uses the current *preset* for the settings. I.e. settings
changes in the UI are ignored. This deficiency will be rectified at a
future time.
jstebbins [Sat, 15 Oct 2011 21:46:25 +0000 (21:46 +0000)]
set ac3 dolby flag when downmix is dolby
If doing dolby or dplii downmix and encoding to ac3, set the
dolby flag in output ac3 stream so players (and handbrake) will
know that the stream is dolby matrix encoded.
jstebbins [Sat, 15 Oct 2011 00:16:02 +0000 (00:16 +0000)]
fix crash during 2 pass encoding TS or PS source
stream.c cached information that it probed during the first time it
opened any source. Then later it would re-use that cached data. I
was prematurely deleting the cached data during 2 pass encodes.
The problem is that there is no way to know when the cached data is no
longer needed. You could have a thousand items in the queue all using
the same source, or you could have only 1. So you either have to (a)
keep the cached data indefinitely, or (b) you have to be able to handle
the case where scanned cached data is flushed before you start an
encode. (a) is poor design. And if you choose (b) you might as well
eliminate the cache all together. It doesn't really save any time and
only complicates the code.
jstebbins [Wed, 12 Oct 2011 20:19:33 +0000 (20:19 +0000)]
Add flac + quality + compression level support
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
jstebbins [Tue, 11 Oct 2011 00:44:16 +0000 (00:44 +0000)]
fix log spam during batch scan of TS files
IDRs detected before generating previews were not being remembered. So
we started decoding on non-IDR boundaries which generates a lot of
decoder log spam.
jstebbins [Sun, 2 Oct 2011 21:28:45 +0000 (21:28 +0000)]
CLI: x264 preset, tuning, and profile support
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.
The PCR comparison we were doing could cause us to drop all the
timestamps for an audio stream when the audio packets are very widely
spaced. Now, it detects PCR changes explicitely and only drops the
timestamps if a discontinuity PCR prior to the packets current PCR has
already been sent to the reader.
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.
Extracts duplicated code from decomb.c and deinterlace.c and puts
it in a shared module. Fixes a bug that existed in the decomb
version of mcdeint_filter.
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.
For TS streams that don't have PCRs, we substitute the DTS timestamp
from the video track (or PTS if we don't see DTS). But these can bounce
around or be wider spaced in the stream that PCRs are meant to be. So I
have added a test to see if the timestamp looks like a discontinuity.
Then I only pass the timestamp as a PCR if there appears to be a
discontinuity. This prevents a lot of scr_offset thrashing.
I have also fixed an error in our scr_offset processing. It is rarely
triggered and it's effects are so minor with well behaved streams that
it would be completely unnoticed. But with the test stream I was using,
it caused a factor of 10 times more "audio went backwards" errors.
A new obfuscation technique it to add UDF-16 filenames that have junk in
the high byte and things like "VIDEO_TS.IFO" in the low byte.
libdvdread throws away the high byte which results in references to the
bogus copy of the file.
SSA subtitles have an empty layer field (bare ','). The
scanf format specifier "%*128[^,]" will not match on a
bare ','. There must be at least one non ',' character in
the match. So the format specifier is placed directly next
to the 'Dialogue:' string so that the next expected ' '
after the ':' will be the character it matches on when
there is no layer field.
The AVCHD-Lite specification only supports 50 or 60 fps. So to get
25 or 30 fps, they double every frame using repeat flags. Detect
this and adjust the framerate accordingly.
I like how Yeasah ensures that top and left crop will be even pixel
aligned in his cli patch. Do the same for the lingui. This ensures
that even if the input crop values are not even pixel aligned, the
result will be.
HandBrake's video pipeline uses yuv420 color which requires even
dimensions. The input video may be a diffent color space that allows
odd dimensions. So crop a row or colomn if necessary.