John Stebbins [Sun, 10 Feb 2019 20:04:21 +0000 (13:04 -0700)]
decavcodec: fix error when ffmpeg parser changes the codec_id
The ffmpeg mpeg2 parser changes AVCodecContext.codec_id on the fly based
on what it parses. Normally this results in correct switching of decoders
internally in ffmpeg. Due to some unfortunate ordering of how we initialize
things when HandBrake is using our own demuxers, avcodec_open gets called
with the original AVCodec and the AVCodecContext.codec_id that was changed
by the parser resulting in an error.
Further explanation... When using our own demuxers, there are some codecs that
we have to parse out the extradata for _prior_ to calling avcodec_open.
avcodec_open fails if extradata isn't initialized for these codecs prior to
the call. To initialize the extradata, we use parser->parser->split. I.e. the
parser must be initialized and used prior to calling avcodec_open. When
avcodec_open is called, it is using the original AVCodec that was used with
avcodec_alloc_context3 (it will fail if AVCodec is not the same between
avcodec_alloc_context3 and avccodec_open). The call to avcodec_open fails with
"Codec type or id mismatches" since AVCodecContext.codec_id no longer matches
AVCodec.id due to the parser changing the codec_id.
The solution is to reset AVCodec and reallocate the context when we
detect that the parser has changed codec_id on us.
sr55 [Mon, 11 Feb 2019 14:25:46 +0000 (14:25 +0000)]
WinGui: Utilise new hb_global_init_no_hardware when hb_global_init fails. The preferences Video tab now notes that hardware encoding options are disabled.
sr55 [Sat, 9 Feb 2019 18:12:44 +0000 (18:12 +0000)]
libhb: Add a hb_global_init_no_hardware that disables all the hardware encoder/decode init and check code. For users where drivers or other system issues prevent HandBrake from loading.
sr55 [Fri, 25 Jan 2019 21:08:39 +0000 (21:08 +0000)]
WinGui: Move the Queue Recovery option from the source panel to the Queue Menu. It's not something that's frequently used and doesn't really belong on the Source Menu. Makes the source menu less cluttered.
John Stebbins [Tue, 22 Jan 2019 16:48:09 +0000 (08:48 -0800)]
encavcodec: enable "row-mt=1" for vp9
Improves encoding speed by about 20% for SD content and 35% for HD
content in my testing on a 4 core 8 thread system. CPU utilization is
around 60% as compared with 40% prior to the change.
John Stebbins [Sat, 19 Jan 2019 18:41:59 +0000 (10:41 -0800)]
lapsharp: mirror image data into stride region
Adds a function to mirror image data into stride region. Mirroring the
data results in a less visible artefact down the right edge of the
image. Blanking resulted in a dark edge artefact.
Keeps function that blanks stride region and improves it's speed,
although it's not currently used.
John Stebbins [Wed, 16 Jan 2019 16:49:47 +0000 (08:49 -0800)]
encavcodec: Fix dts timestamps in VT h.265 encoding
The VT h.265 encoder appears to enable b-pyramid, but doesn't expose any
method to modify the setting or query for its value. So we'll just
assume it's always on whenever there are b-frames.
sr55 [Fri, 11 Jan 2019 21:26:10 +0000 (21:26 +0000)]
WinGui: Improvements to the installer. Fixed the issue where the uninstaller could appear behind the installer. Updated the Background Image on the installer to the project logo.
John Stebbins [Sat, 5 Jan 2019 15:56:39 +0000 (08:56 -0700)]
flatpak: fix access to gvfs mounted filesystems
An additional access permission is needed to access the gvfs mount
point.
For the record, the "Right" (TM) way to do this is to use
GtkFileChooserNative dialog which will automatically use the flatpak
file chooser portal to access files. But this portal currently is
missing features that would cripple HandBrake. These features are:
1. Folder selection. We require this for destination selection and for
batch processing.
2. Set current highlighted file in file chooser browser. Without this,
a user processing a series of videos that are all in the same foder has
to navigate from the default "Recent files" selection to the folder
where their files are for each file.
Also note that GtkFileChooserNative transparently falls back to a
regular file chooser when the action requested is not supported. So
sometimes the user would have access to remote filesystems, and
sometimes not with no obvious reason for the difference. Not a good
user experience.