Such buffers are not malloced thus freeing would be bad.
Note though this condition never could have happened so this
is more for correctness sake and not a true bugfix
Fixes CID1061047
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '218d6844b37d339ffbf2044ad07d8be7767e2734':
h264dsp: Factorize code into a new function, h264_find_start_code_candidate
Conflicts:
libavcodec/h264_parser.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '7a82022ee2f9b1fad991ace0936901e7419444be':
h264_parser: Initialize the h264dsp context in the parser as well
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Before After
Mean StdDev Mean StdDev Change
This function 508.8 23.4 185.4 9.0 +174.4%
Overall 3068.5 31.7 2752.1 29.4 +11.5%
In combination with the preceding patch:
Before After
Mean StdDev Mean StdDev Change
Overall 2925.6 26.2 2752.1 29.4 +6.3%
Signed-off-by: Martin Storsjö <martin@martin.st>
This performs the start code search which was previously part of
h264_find_frame_end() - the most CPU intensive part of the function.
By itself, this results in a performance regression:
Before After
Mean StdDev Mean StdDev Change
Overall time 2925.6 26.2 3068.5 31.7 -4.7%
but this can more than be made up for by platform-optimised
implementations of the function.
Signed-off-by: Martin Storsjö <martin@martin.st>
Each AVStream struct for an H.264 elementary stream actually has two
copies of the H264DSPContext struct (and in fact all the other members
of H264Context as well):
((H264Context *) ((AVStream *)st)->codec->priv_data)->h264dsp
((H264Context *) ((AVStream *)st)->parser->priv_data)->h264dsp
but only the first of these was actually being initialised. This
prevented the addition of platform-specific implementations of
parser-related functions.
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit '22c879057ead189c0f59241cb9eeb926381e3299':
mpegvideo_enc: drop outdated copy_picture_attributes() in favour of a modern av_frame_copy_props()
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '86f4c59bd676672040b89d8fea4c9e3b59bfe7ab':
twinvq: Split VQF-specific part from common TwinVQ decoder core
Conflicts:
libavcodec/Makefile
libavcodec/twinvq.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'bc909626b0a3c107625f2cb4c85479d18de422a8':
twinvq: move all bitstream reading into single place
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '2852740e23f91d6775714d7cc29b9a73e1111ce0':
vdpau: store picture data in picture's rather than codec's context
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Prevent build failure for applicatins using the old API
This could be replaced be a include of version.h but some applications
would then need extern C wrapers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The options table is used in tools built by the host compiler and the
deprecation macros pull in bits that are not safe to use if host and
target compiler differ.
This is required for the future addition of VoxWare MetaSound decoder, for its
functions are mostly the same but bitstream reader is completely different
and bitstream format is slightly different too.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
The common case of the pointer having increased by one packet (which results
in no change to the modulus) can be detected with a 64-bit subtraction,
which is far cheaper than a division on many platforms.
Before After
Mean StdDev Mean StdDev Change
Divisions 248.3 8.8 51.5 7.4 +381.7%
Overall 2773.2 25.6 2372.5 43.1 +16.9%
Signed-off-by: Martin Storsjö <martin@martin.st>