Ronald S. Bultje
27209bb108
h264: mark some MC functions with av_always_inline instead of inline.
...
This actually causes them to be inlined, leading to a significant
speedup (1-1.5% in my measurements).
13 years ago
Ronald S. Bultje
05fb63f5a0
H264: have hl_motion() and its callees take a chroma_idc argument.
13 years ago
Ronald S. Bultje
c2d337429c
H264: change weight/biweight functions to take a height argument.
...
Neon parts by Mans Rullgard <mans@mansr.com>.
13 years ago
Ronald S. Bultje
229d263cc9
Support for lossless and inter H264 4:2:2.
13 years ago
Baptiste Coudurier
76741b0e56
h264: 4:2:2 intra decoding support
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Steven Walters
27237d524e
w32threads: support for frame multithreading
...
Replace our incomplete w32threads implementation with x264's pthreads
w32threads wrapper.
Relicensed to LGPL with kind permission by Pegasys Inc.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Mans Rullgard
318efbfc10
h264: change unsupported bit depth message to error level
...
Unsupported bit depth is certainly an error the user will
want to know about.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Laurent Aimar
4c7a232fc8
h264: reset h->ref_count in case of errors in ff_h264_decode_ref_pic_list_reordering()
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Mans Rullgard
4d1418cd4f
h264: fix signed overflows in x*0x01010101 expressions
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Michael Niedermayer
14c21c1ff5
H264: Only wait before triggering ff_thread_setup_complete() until the next slice that contains a start-of-field/frame macroblock
...
This allows concurrent decoding of the last field/frame, rather than
only the last slice, of data packets with multiple NAL units packed
together.
This will fix the slowdown reported in e.g. bug 52.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Ronald S. Bultje
4418aa9cb3
h264: correct implicit_weight for field-interlaced pictures.
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
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
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
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
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
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
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
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
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
Alexander Strange
6a9c859444
H264/MPEG frame-level multi-threading.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Felipe Contreras
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>
14 years ago
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.
14 years ago
Ronald S. Bultje
0ffc841505
h264: fix loopfilter with threading at slice boundaries.
14 years ago
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".
14 years ago
Oskar Arvidsson
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>
14 years ago