| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
If extradata is improperly parsed, avcodec_open may fail. Keep trying
avcodec_open as long as there is more data to parse.
Fixes https://github.com/HandBrake/HandBrake/issues/542
|
|
|
|
|
| |
If avcodec_open fails, pv->context->codec is NULL, but work->info may
still be called by scan.
|
|
|
|
| |
Closes #490.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
avcodec_decode_audio4 is deprecated, use avcodec_send_packet and
avcodec_receive_frame
av_bitstream_filter is deprecated, use av_bsf
|
| |
|
|
|
|
|
|
| |
Videos get decoded to NV12 in system memory and converted to our
internal colorspace via libswscale. It should be noted that QSV-
accelerated decoding now works with all our videos encoders :-)
|
|
|
|
| |
fixes various context leaks in error conditions
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sync: correct timestamp discontinuities in sync instead of reader
This patch passes discontinuity information through the pipeline till it
reaches sync.c. The timestamps are passed through the pipeline as read
and unmodified to sync.c (instead of attempting to correct
discontinuities in reader). In sync, when we see a discontinuity,
we know where the next timestamp should be based on the timestamp
and duration of the previous buffer (before the discontinuity). So
we calculate an "SCR" offset based on the timestamp after the
discontinuity and what we calculate it should be.
The old discontinuity handling code was broken due to the following.
The MPEG STD timing model relies heavily on the decoder having an STC
that is phase lock looped to the PCRs in the stream. When decoding a
broadcast stream, the decoder can count on the time measure between PCRs
using the STC to match to a high degree of accuracy.
I.e. STC - lastSTC == PCR - lastPCR. When a discontinuity occurs, the
decoder calculates a new PCR offset = PCR - STC. I.e. the offset is the
new PCR value minus what it would have been if there had been no
discontinuity.
The above does not work without a reliable STC, which we do not have.
We have been attempting to approximate one by avereraging the duration
of received packets and extrapolating an "STC" based on the last PTS and
the average packet duration. But this is highly variable and
unreliable.
* decavcodec: fix data type of next_pts
It needs to be double so that partial ticks are not lost
* deccc608sub: clarify comment
* sync: allow queueing more audio
Audio is small, and there is often a significant amount of audio in the
stream before the first video frame.
* sync: improve handling of damaged streams
When data is missing, the audio decoder was extrapolating timestamps
from the last pts before the error caused by the missing data which
caused sync issues.
Also, missing data can cause the video decoder to output a frame out of
order with the wrong scr sequence. Drop such frames.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Eliminate the need for everyone to assume that the first chapter starts
at the first frame.
|
|
|
|
|
|
|
|
|
| |
* remove dxva hw decode
It provides practically no speed increase even on a slow CPU and results
in a speed decrease on fast CPUs. And the code is exceptionally fugly.
* cli: remove USE_HWD
|
|
|
|
| |
it was always 0
|
| |
|
|
|
|
| |
It can change mid-stream
|
|
|
|
|
|
|
|
|
|
|
| |
sync.c was difficult to read, fragile, and prone to difficult to
diagnose bugs (see
https://forum.handbrake.fr/viewtopic.php?f=12&t=33147)
This rewrite simplifies the code, removes signals, locking and yield
that probably cause the above problem and is much more flexible. It
fixes a wider variety of timestamp issues than before and is much easier
to extend if other timestamp analysis is desired.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
libavcodec/mpeg12dec.c expects input buffers to be zero padded to 32 bit
alignment. If not zero padded, it can get caught in an infinite loop.
|
|
|
|
|
| |
libav just deprecated AVPicture and all av_picture_*/avpicture_*
functions.
|
|
|
|
|
| |
This brings together several independent implementations of a simple
buffer list manager.
|
|
|
|
|
|
|
|
| |
Allows for arbitrary frame rates between 1 and 1000 fps.
Adds min/max frame rates to CLI help.
Removes hardcoded instances of the internal clock rate in favor of hb_video_framerate_get_limits().
Unfortunately, much of the codebase generally refers to clock rate as frame rate, so a little extra care is still necessary going forward.
|
|
|
|
|
|
|
| |
This should fix https://forum.handbrake.fr/viewtopic.php?f=11&t=32520
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7310 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
|
|
|
|
|
| |
... instead of a 0 length buffer.
This fixes this issue:
https://forum.handbrake.fr/viewtopic.php?f=12&t=31959
Theora can create 0 length output. These 0 length frames indicate
duplicate frames. So we can't use 0 length buffers to indicate the end
of the stream.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7143 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
|
|
|
|
|
| |
This global was shared between the CLI and libhb and used as a back door to
force scan and encode passes to use the same ffmpeg context for hardware
decoding. Aside from the fact that this context sharing should not be necessary
and needs fixing, this information belongs in the hb_handle_t that is shared
between the scan and the encode. So put it there and make sure the hb_handle_t
get propagated to where the flag is needed.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7028 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
|
|
| |
Dolby Digital Plus (E-AC-3), Dolby TrueHD and FLAC can now be passed through without re-encoding. They aren't covered by Auto Passthru yet, however.
In addition, encoding to E-AC-3 is now possible.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6908 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
|
|
|
| |
Apply aac_adtstoasc bitstream filter while muxing AAC stream and extract
AudioSpecificConfig during scan.
Patch submitted by Taihei Momma
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6867 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
| |
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6852 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
| |
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6607 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
|
|
|
| |
There are several changes to job and title structs that break
current windows interop code. The interop code should be changed
such that it only uses json APIs. So if there is any missing
features (or bugs) in these APIs, please let me know.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6602 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
|
|
| |
We used to check ac3 crc's when we used a52 dec. When we switched to libav
we did not enable crc checks. I suspect this is the root cause of this
problem https://forum.handbrake.fr/viewtopic.php?f=12&t=31032
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6507 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
| |
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6480 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
|
|
|
| |
Puts the decoder into a mode that returns *all* frames. I.e.
it won't just scan to the end of the file looking for an IDR. Then
we decode multiple frames (up to 100) searching for an I frame. This way,
the reconstructed frame we use for a preview is more likely to be complete.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6430 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
|
|
| |
Use avcodec parser->split() instead of writing our own parser. This
makes extradata parsing work for stream formats other than vc1 if the
need should ever arise.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6429 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
| |
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6394 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
| |
Addresses https://forum.handbrake.fr/viewtopic.php?f=12&t=30307&p=140045#p139847
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6235 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
|
|
| |
... and probably other formats that use a palette.
The palette is stored in AVPacket side data which we did not read. So
read the side data and stash it in hb_buffer_t so that it can be used
later by the decoder.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6207 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly:
- coding style
- formatting
- indentation
Also:
- fix two warnings
- remove unnecessary header
- remove unused parameter in parse_nalus
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6145 b64f7644-9d1e-0410-96f1-a4d463321fa5
|