Michael Niedermayer
3af2de76ac
h264: set unused ref_counts to 0 as a precautionary meassure.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
c9c7a776db
h264: try reading SPS with wrong escaping, it sometimes works better
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
dc9ce40069
h264: More correct ref_count check in decode_slice_header()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
5a6e7771ed
h264: dont set key_frame when the frame is not a real keyframe.
...
Fixes Ticket514
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
f85c9b7771
h264dec: fix decoding problems introduced with baad01d8b4
.
...
This affected cases where extradata was not set.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Alexander Strasser
baad01d8b4
h264: improve checks before calling ff_h264_decode_extradata
...
The ff_h264_decode_extradata routine now checks for the buffer size
and pointer internally. This makes it possible to remove the external
checks in ff_h264_decode_init.
In decode_frame there was a size check missing because the buffer
gets tested prior to the invocation of ff_h264_decode_extradata().
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
13 years ago
Alexander Strasser
715f259bf9
h264: ff_h264_decode_extradata: check buffer args
...
The buffer size and pointer were not checked prior to testing the first
byte of the buffer. These were sometimes checked before calling, but it is
better to add it inside the function as it takes buf and size arguments.
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
13 years ago
Laurent Aimar
d1186ff72d
h264: check for out of bounds reads in ff_h264_decode_extradata().
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Laurent Aimar
57764c6996
h264: Check for out of bounds reads in ff_h264_decode_extradata().
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
9b73fbcff6
h264dec: Decode in stream avc extradata.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
4ba396834d
h264: pass buffer & size to ff_h264_decode_extradata()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
95a06eb4d5
Fix assert() calls that need updates after FF_COMMON_FRAME macro elimination.
...
This fixes build failures with -DDEBUG in CPPFLAGS.
13 years ago
Michael Niedermayer
4832ed4c62
h264: do not increase recovery frame which would lead to endless moving away of the recovery point.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
a8a9844a3c
h264: reset recovery frame on seeks.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
John Stebbins
53e37840bf
calculate frame_num for recovery point "keyframe"
...
recovery points that have non-zero recovery_frame_cnt resulted in
flagging incomplete frames as keyframes. This delays setting the
keyframe flag till the frame has been fully constructed.
13 years ago
Michael Niedermayer
ba5ff1b31e
h264dec: add forgotten copying of h->sync
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
0812ad01c8
h264dec: Support CODEC_FLAG2_SHOW_ALL.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
a64b028aeb
h264dec: Dont display trash before a keyframe.
...
Fixes Ticket472
This may (or may not) cause problems with files that have no keyframes.
Plese open a bugreport or mail me if you have a file for which this fails.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
205c13685f
h264: allow disabling bitstream overread protection by using the fast flag.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
716c1f7b2a
h264: improve MAX_SLICES too small check so it gives less false positives.
...
Fixes Ticket273
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
ea0ac11e52
h264: prevent an out of array read in decode_nal_units()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
23f5cff92c
h264dec: Prevent CABAC and CAVLC bitsteram overreading
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
66ce282df5
h264: clean all non null elements of delayed_pic[]
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
b955ab2f49
h264: change MAX_DELAYED_PIC_COUNT check to av_assert0
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Luca Barbato
22141917a9
Revert "h264: Properly set coded_{width, height} when parsing H.264."
...
This reverts commit b47904d158
.
coded_{width, height} overwrites width and height in avcodec_open and
it currently just report the non-lowres size.
13 years ago
Michael Niedermayer
13e9a0fbfb
h264: fixup indention
...
issue spoted in last merge (probably indention fixed there by diego)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Jeff Downs
6581e161c5
h264: fix PCM intra-coded blocks in monochrome case
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Jeff Downs
87cf70eb23
h264: correct implicit weight table computation for long ref pics
...
Correct computation of implicit weight tables when referencing pictures
that are marked for long reference.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Baptiste Coudurier
231a6df9ea
h264dec: h264: 4:2:2 intra decoding
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Dustin Brody
bac3ab13ea
h264: notice memory allocation failure
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Dustin Brody
12fe759423
h264: propagate error return values for AV_LOG_ERROR-triggering events
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
14 years ago
Jeff Downs
4105443872
h264 - Correct implicit weight table computation for long ref pics
...
Correct computation of implicit weight tables when referencing pictures
that are marked for long reference.
14 years ago
Jeff Downs
188694b2f5
h264 - Fix PCM intra coded blocks in monochrome case
14 years ago
Michael Niedermayer
2fb9fc0f6c
h264: improve max slices error message
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Mans Rullgard
5cc2600964
dsputil: create 16/32-bit dctcoef versions of some functions
...
High bitdepth H.264 needs 32-bit transform coefficients, whereas
dnxhd does not. This creates a conflict with the templated
functions operating on DCTELEM data. This patch adds a field
allowing the caller to choose the element size in dsputil_init()
and adds the required functions.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Michael Niedermayer
ba99474b1d
h264: fix h264-test
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Diego Biurrun
1b4a17094e
h264: remove some disabled code
14 years ago
Diego Biurrun
657ccb5ac7
Eliminate FF_COMMON_FRAME macro.
...
FF_COMMON_FRAME holds the contents of the AVFrame structure and is also copied
to struct Picture. Replace by an embedded AVFrame structure in struct Picture.
14 years ago
Jason Garrett-Glaser
6a2176aac0
H.264: improve qp_thresh check
...
Eliminate redundant check in filter_mb_fast, consider bit depth in calculating qp_thresh.
14 years ago
Jason Garrett-Glaser
298e52c99c
H.264: Remove redundant hl_motion_16/8 code
14 years ago
Jason Garrett-Glaser
bbdd52ed34
H.264: av_always_inline some more functions
...
These weren't getting inlined all the time in all gcc versions.
14 years ago
Jason Garrett-Glaser
556f8a066c
H.264: template left MB handling
...
Faster H.264 decoding with ALLOW_INTERLACE off.
14 years ago
Jason Garrett-Glaser
3b7ebeb4d5
H.264: faster write_back_*
...
Avoid aliasing, unroll loops, and inline more functions.
14 years ago
Jason Garrett-Glaser
cb5469462d
H.264: faster fill_filter_caches
...
Reduce aliasing problems and unroll mv/ref loop.
14 years ago
Mans Rullgard
add41decd9
Remove return statements following infinite loops without break
...
These statements cannot be reached and are thus not needed.
This removes a number of compiler warnings.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Jason Garrett-Glaser
9a0dda8b3a
H.264: disable 2tap qpel with CODEC_FLAG2_FAST and >8-bit
...
2tap qpel isn't implemented yet for high bit depth, so it just breaks decoding.
14 years ago
Jason Garrett-Glaser
7c9079ab4c
H.264: fix 4:4:4 + deblocking + MBAFF
14 years ago
Jason Garrett-Glaser
3b79f2e2e9
H.264: fix bug in lossless 4:4:4 decoding
...
Coefficient test for i16x16 add_pixels4 assumed luma plane.
14 years ago
Diego Biurrun
6371ce4b0f
h264: Fix assert that failed to compile with -DDEBUG.
...
The assert referenced a variable that no longer exists since 4:4:4 support.
14 years ago