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.
13 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.
13 years ago
Jeff Downs
188694b2f5
h264 - Fix PCM intra coded blocks in monochrome case
13 years ago
Michael Niedermayer
2fb9fc0f6c
h264: improve max slices error message
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 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
Jason Garrett-Glaser
da0dadb936
Fix H.264 4:4:4 lossless decoding.
...
The coefficient test for i16x16 add_pixels4 assumed luma plane.
14 years ago
Ronald S. Bultje
ea6331f8bb
h264-mt: fix deadlock in packets with multiple slices (e.g. MP4).
14 years ago
Alex Converse
0c17beba97
h264: drop some ugly casts
14 years ago
Michael Niedermayer
a4233d1f95
h264: print actual slice number in "Too many slices" warning
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Alexander Strange
3803af22d8
h264: Complexify frame num gap shortening code
...
By observation it did not seem to handle prev_frame_num > frame_num.
This does not affect any files I have.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Mike Scheutzow
aa15e68721
Fix decoding of mpegts streams with h264 video that does *NOT* have b frames
...
One of the causes of this bug is that the h264 parser defaults low_delay
to 1, but the h264 codec defaults low_delay to 0. Really Ugly.
After many hours of looking at this, I'm still not sure how has_b_frames
is *intended* to behave, but to me the implementation appears way more
complicated than it ought to be.
My patch relies on the encoder to set an optional field in the SPS. This
works for libx264 streams, but I'm not sure that all h264 encoders will
set it.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Jason Garrett-Glaser
7b442ad918
H.264: fix CODEC_FLAG_GRAY
...
It was broken in 4:4:4, and still did chroma deblocking for no reason in 4:2:0.
14 years ago
Jason Garrett-Glaser
c90b94424c
4:4:4 H.264 decoding support
...
Note: this is 4:4:4 from the 2007 spec revision, not the previous (now deprecated) 4:4:4 mode in H.264.
14 years ago
Jason Garrett-Glaser
504811baea
Roll back 4:4:4 H.264 for now
...
Needs some ARM/PPC asm modifications.
14 years ago
Jason Garrett-Glaser
c177cfb4fb
H.264: fix CODEC_FLAG_GRAY
...
It was broken in 4:4:4, and still did chroma deblocking for no reason in 4:2:0.
14 years ago
Jason Garrett-Glaser
c9c493872c
4:4:4 H.264 decoding support
...
Note: this is 4:4:4 from the 2007 spec revision, not the previous (now deprecated) 4:4:4 mode in H.264.
14 years ago
Michael Niedermayer
108f318d90
h264: don't be so picky on decoding pps in extradata.
...
Fixes issue2517
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Michael Niedermayer
33aec3f402
h264: change a few comments into error messages
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Michael Niedermayer
21d5de9303
H264: Reduce pointless diffs to qatar
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
f0e9ee8d94
Revert "H264: Split out hl_motion and template it, this seems a bit faster"
...
This reverts commit a50f0bea25
.
This has been implemented differently in qatar and its better they
maintain it for me instead of me having to spend an average 5sec more
per merge
Conflicts:
libavcodec/h264.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Alexander Strange
33eac92a3c
h264: Complexify frame num gap shortening code
...
By observation it did not seem to handle prev_frame_num > frame_num.
This does not affect any files I have.
(cherry picked from commit 43c0092a80f8212cbb783260bafa157f7b85126e)
14 years ago
Michael Niedermayer
9034001b17
h264 fill_filter_caches: Dont init chroma nnz_cache.
...
Found-by: Dark Shikari
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago