Laurent Aimar and Anton Khirnov
d1186ff72d
h264: check for out of bounds reads in ff_h264_decode_extradata().
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-09-25 15:04:58 +02:00
Diego Biurrun
95a06eb4d5
Fix assert() calls that need updates after FF_COMMON_FRAME macro elimination.
...
This fixes build failures with -DDEBUG in CPPFLAGS.
2011-09-21 09:57:32 +02:00
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.
2011-08-29 18:32:31 +02:00
Jeff Downs and Diego Biurrun
6581e161c5
h264: fix PCM intra-coded blocks in monochrome case
...
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2011-08-19 16:02:33 +02:00
Jeff Downs and Diego Biurrun
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 >
2011-08-19 14:36:52 +02:00
Dustin Brody and Ronald S. Bultje
bac3ab13ea
h264: notice memory allocation failure
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-08-11 15:59:07 -07:00
Dustin Brody and Ronald S. Bultje
12fe759423
h264: propagate error return values for AV_LOG_ERROR-triggering events
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-08-09 12:29:13 -07:00
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
2011-07-29 08:42:34 +02:00
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 >
2011-07-21 18:10:58 +01:00
Diego Biurrun
1b4a17094e
h264: remove some disabled code
2011-07-20 15:04:51 +02:00
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.
2011-07-11 00:19:00 +02:00
Jason Garrett-Glaser
6a2176aac0
H.264: improve qp_thresh check
...
Eliminate redundant check in filter_mb_fast, consider bit depth in calculating qp_thresh.
2011-07-08 16:12:42 -07:00
Jason Garrett-Glaser
298e52c99c
H.264: Remove redundant hl_motion_16/8 code
2011-07-08 16:12:36 -07:00
Jason Garrett-Glaser
bbdd52ed34
H.264: av_always_inline some more functions
...
These weren't getting inlined all the time in all gcc versions.
2011-07-08 16:09:35 -07:00
Jason Garrett-Glaser
556f8a066c
H.264: template left MB handling
...
Faster H.264 decoding with ALLOW_INTERLACE off.
2011-07-03 15:06:00 -07:00
Jason Garrett-Glaser
3b7ebeb4d5
H.264: faster write_back_*
...
Avoid aliasing, unroll loops, and inline more functions.
2011-07-03 15:05:55 -07:00
Jason Garrett-Glaser
cb5469462d
H.264: faster fill_filter_caches
...
Reduce aliasing problems and unroll mv/ref loop.
2011-07-03 15:05:52 -07:00
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 >
2011-07-03 21:39:07 +01:00
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.
2011-06-26 14:35:39 -07:00
Jason Garrett-Glaser
7c9079ab4c
H.264: fix 4:4:4 + deblocking + MBAFF
2011-06-22 02:39:17 -07:00
Jason Garrett-Glaser
3b79f2e2e9
H.264: fix bug in lossless 4:4:4 decoding
...
Coefficient test for i16x16 add_pixels4 assumed luma plane.
2011-06-22 02:39:09 -07:00
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.
2011-06-21 20:52:45 +02:00
Ronald S. Bultje
ea6331f8bb
h264-mt: fix deadlock in packets with multiple slices (e.g. MP4).
2011-06-20 10:24:33 -04:00
Alex Converse
0c17beba97
h264: drop some ugly casts
2011-06-18 22:11:55 -07:00
Alexander Strange and Anton Khirnov
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 >
2011-06-16 20:51:51 +02:00
Mike Scheutzow and Anton Khirnov
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 >
2011-06-16 20:24:58 +02:00
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.
2011-06-13 21:16:33 -07:00
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.
2011-06-13 21:16:30 -07:00
Jason Garrett-Glaser
504811baea
Roll back 4:4:4 H.264 for now
...
Needs some ARM/PPC asm modifications.
2011-06-13 13:38:46 -07:00
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.
2011-06-13 12:21:49 -07:00
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.
2011-06-13 12:21:39 -07:00
Michael Niedermayer and Anton Khirnov
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 >
2011-06-13 20:45:09 +02:00
Michael Niedermayer and Anton Khirnov
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 >
2011-06-13 20:44:14 +02:00
Alexander Strange and Ronald S. Bultje
6a9c859444
H264/MPEG frame-level multi-threading.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-06-02 10:16:20 -07:00
Felipe Contreras and Diego Biurrun
b47904d158
h264: Properly set coded_{width, height} when parsing H.264.
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2011-05-23 13:15:55 +02:00
Ronald S. Bultje
4e987f8282
h264: correct border check.
...
When backing up the top-left border, check that the top-left
(rather than left) MB indeed does belong to our slice. If it
doesn't, backing up has no positive effect but may accidentally
interfere with other threads writing in the same space.
Fixes occasional one-off effects when enabling slice-MT.
2011-05-19 20:32:18 -04:00
Ronald S. Bultje
0ffc841505
h264: fix loopfilter with threading at slice boundaries.
2011-05-19 20:32:17 -04:00
Ronald S. Bultje
8d44cd2cd8
h264: copy pixel_shift between slice threading contexts.
...
Fixes "make THREADS=2 THREAD_TYPE=2
fate-h264-conformance-frext-pph10i3_panasonic_a".
2011-05-18 06:54:15 -04:00
Oskar Arvidsson and Ronald S. Bultje
d545cf804c
Enable decoding of high bit depth h264.
...
This patch completes the high bit depth h264 decoding support.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-05-10 07:24:38 -04:00
Oskar Arvidsson and Ronald S. Bultje
19a0729b4c
Adds 8-, 9- and 10-bit versions of some of the functions used by the h264 decoder.
...
This patch lets e.g. dsputil_init chose dsp functions with respect to
the bit depth to decode. The naming scheme of bit depth dependent
functions is <base name>_<bit depth>[_<prefix>] (i.e. the old
clear_blocks_c is now named clear_blocks_8_c).
Note: Some of the functions for high bit depth is not dependent on the
bit depth, but only on the pixel size. This leaves some room for
optimizing binary size.
Preparatory patch for high bit depth h264 decoding support.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-05-10 07:24:36 -04:00
Oskar Arvidsson and Ronald S. Bultje
fcc0224e4f
Add support for higher QP values in h264.
...
In high bit depth, the QP values may now be up to (51 + 6*(bit_depth-8)).
Preparatory patch for high bit depth h264 decoding support.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-05-10 07:24:35 -04:00
Oskar Arvidsson and Ronald S. Bultje
6e3ef511d7
Add the notion of pixel size in h264 related functions.
...
In high bit depth the pixels will not be stored in uint8_t like in the
normal case, but in uint16_t. The pixel size is thus 1 in normal bit
depth and 2 in high bit depth.
Preparatory patch for high bit depth h264 decoding support.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-05-10 07:24:33 -04:00
Oskar Arvidsson and Ronald S. Bultje
e39e3abad4
Choose h264 chroma dc dequant function dynamically.
...
Needed for high bit depth h264 decoding.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-05-10 07:24:17 -04:00
Stefano Sabatini and Diego Biurrun
975a1447f7
Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2011-05-02 12:18:44 +02:00
Stefano Sabatini and Diego Biurrun
6209669de4
Replace deprecated av_get_pict_type_char() with av_get_picture_type_char().
...
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2011-05-02 11:24:45 +02:00
Diego Biurrun
2e15305b70
Remove some disabled printf debug cruft.
2011-04-29 20:00:53 +02:00
Anton Khirnov
e7021c0ed5
lavc: remove FF_API_HURRY_UP cruft
2011-04-26 08:16:05 +02:00
Ronald S. Bultje and Ronald S. Bultje
94f7451a3a
Introduce slice threads flag.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-04-21 19:42:19 -04:00
Anton Khirnov
8ed2ae09a2
lavc: mark hurry_up for removal on next major bump
...
It has been deprecated for about five years, skip_idct/skip_frame should
be used instead.
2011-04-02 16:17:24 +02:00
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com >
2011-03-19 13:33:20 +00:00