Approximately 3% faster on Cortex-A8.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 7da48fd0111adf504cfcfc5ebda7fd0681968041)
Overlay documentation is still using the old unsupported syntax.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit aa8ac53b51cd8b9446b50404660685041060fa4f)
Based on original patch by Kostya Shishkov
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit e00f41d5742b3a0dc1877b030f4f6f58c19b7bbd)
it's not touched anywhere in ffmpeg, the code setting it was removed
over two years ago (e9b78eeba22b050810a507e69df1b652e56ab62b).
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b0294c80d3a3981ec7ef9e4654962780e8566075)
Merge find_near_mvs and mv bitstream decoding: don't do prediction steps
until absolutely necessary.
(cherry picked from commit f3d09d44b70492022964e2ead5f439bb7c96eaa2)
s->windowed_samples will always have a range of [-32767,32767] due to the
window function, so the return value from log2_tab() will always be in the
range [0,14].
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 626264b11b5406c0c78c4056cabb63cb650e9bf2)
This code will be later split out into a function which takes a 'size'
argument, so I'm keeping the name 'sizeX' here.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 0b1d291a716dd79ca6862a95baf9ac574feba885)
Only trivial splits are done here -- i.e. copy/paste + reindent +
missing variable declarations.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit c1fea2307011ac7a7bb98af98010f81abc789732)
This avoids double semicolons after macro expansion.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 44adbebe1744c68d66d7f811c38270fdcc89665a)
Instead of returning an error when bytes are left over, just return
the number of actually used bytes as other decoders do.
Instead add a special case so an error will be returned when none
of the data looks valid to avoid making debugging a pain.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 4a72765a1c94b05bd3053b1f34f8457a3b71d714)
The function return type is void, so a return statement with an
expression is forbidden (and pointless).
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit b4668274b944abae61759e796c5cc36ade510f24)
Its contents aren't used for anything.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit d7a5106eb2dad33765b0e5f11fd8b1a87e5a9b4b)
This will be useful for splitting asf_read_header()
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 7c7253802bbb4f7330ff9b32358bf05f9880cbdf)
This will be useful for splitting asf_read_header()
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit d42b09723ed154d5269b95efcc20cb1874f60816)
Keep the original corner case behaviour, where reuse is enabled
for the case where no argument is given to the reuse url option.
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 00952be424ba7403d71c338933354d2172df8e67)
The avcodec_thread_free() compatibility wrapper calls ff_thread_free(),
which is not defined when threading is disabled. Make this call
conditional.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 9a77a92c2b6855781d2a4cfab14c67ae4025760c)
This should fix building with win32 threads.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit aef669cdfd984a737ad876b33ee1b160f87f5f9a)
check AVCodecContext->sample_fmt against AVCodec->sample_fmts[] to ensure
that the encoder supports the specified sample format. Error out if it doesn't.
Previously, it would continue and output garbage. Fixes issue 2587.
(cherry picked from commit 2cfa2d925808e6cc6fb7a7c133b7cb7622afd37e)
Decode times for big_buck_bunny_720p_stereo:
1 thread:
real 1m14.227s
user 1m13.104s
sys 0m1.108s
2 threads: (33% faster)
real 0m49.329s
user 1m33.735s
sys 0m1.834s
3 threads: (44% faster)
real 0m41.593s
user 1m44.884s
sys 0m1.967s
(cherry picked from commit d23845f311f04e98777612cae1b55e28923ccdc6)
As a side effect of the last commit, avcodec_open() now calls it automatically,
so there is no longer any need for clients to call it.
Instead they should set AVCodecContext.thread_count.
avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the
next MAJOR libavcodec bump.
Rename the functions to ff_thread_init/free, since they are now internal.
Wrappers are provided to maintain API compatibility.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit c0b102ca03fe92250f1ce620aec3836f529fc1d6)
Also allow qmin/qmax to go up to 69 (the current max value for libx264). This
will have to increase when we add 9/10-bit support.
(cherry picked from commit c7ac200d15e3240972d269df768068f0e3bb9c2f)
Due to being pants-on-head retarded, libavcodec defaults this to zero, which
results in broken output. This didn't affect ffmpeg.c, which sets it itself,
but caused problems for other calling apps using VBV.
(cherry picked from commit f7f8120fb9a06b5d7fbf5add48a0d8464319a332)
Fix emu_edge_v_extend_15 to be <128 bytes on Win64, by being more strict
on the size of registers and which registers are being used for operations
where multiple are available. This fixes segfaults in emulated_edge()
function calls on Win64.
(cherry picked from commit 17cf7c68ed26a4cb3c7adf7488a38c2e19118918)
It is useful for applications that hand input data directly to lavf via
a ByteIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 3940caad02fbc4f075e77bc605849b1d84ba1b8e)
There is no need to pass the ByteIOContext via a pointer to a pointer
anymore.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit aad216fd7e3209fe0a865d8751e680925f6654d3)
It never reopens the bytestream anymore.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 4d016dd4e5b288b3c0c7396935326cb07a289ac2)
Currently (since the data_offset fix) the ogg demuxer assumes that
after the first non-header packets in any stream no more header packets
will follow.
This is not guaranteed, so change the code back again to wait until it
has finished the headers for all streams before returning from ogg_get_headers.
This fixes issue 2428.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 6bd69e6adadf645fd07e909bebc150eab4b9c3c8)