Janne Grunau
729ebb2f18
h264: clear trailing bits in partially parsed NAL units
...
Trailing bits are likely to be non-zero if the NAL unit is truncated.
Clearing the bits make overreads of the bitstream less likely in this
case. Fixes playback of
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4 which
has a forbidden byte sequence of 0x00 0x00 0x00 in it SPS.
13 years ago
Janne Grunau
358ea75e9e
Revert "h264: skip start code search if the size of the nal unit is known"
...
This reverts commit 87eebb3454
.
13 years ago
Janne Grunau
87eebb3454
h264: skip start code search if the size of the nal unit is known
...
Start code emulation prevention is only required in Annex B bytestream
packed NAL units. For other coding formats the size is already known.
Looking for a start code prefix can result in false positives like in
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4
which has a false positive in the SPS.
13 years ago
Ronald S. Bultje
0b4c323213
h264: don't drop B-frames after next keyframe on POC reset.
...
The keyframe after a POC reset may not be the first to be returned to
the user. Therefore, don't reset the expected next POC once we return
a keyframe to the user, but once we know that the next frame in the
return-queue is a keyframe.
13 years ago
Luca Barbato
63ccd46687
lavc: introduce ER_MB_END and ER_MB_ERROR
...
Simplify a little error resilience calls
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Luca Barbato
5bf2ac2b37
error_resilience: use the ER_ namespace
...
Add the namespace to {AC_,DC_,MV_}{END,ERROR} macros
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Diego Biurrun
58c42af722
doxygen: misc consistency, spelling and wording fixes
13 years ago
Dustin Brody
5b22d6e132
lavc: convert error_recognition to err_recognition.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Mans Rullgard
5695ae46f8
h264: remove useless cast
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
373211d828
Remove extraneous semicolons
...
These semicolons cause invalid empty top-level declarations.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Diego Biurrun
da9cea77e3
Fix a bunch of common typos.
13 years ago
Ronald S. Bultje
adedd840e2
h264: fix frame reordering code.
...
Fixes fate-h264-conformance-{mr2_tandberg_e,mr3_tandberg_b} without
requiring -strict 1.
13 years ago
Ronald S. Bultje
2574f08d4c
h264: cap max has_b_frames at MAX_DELAYED_PIC_COUNT - 1.
...
This prevents frame allocation overflows, and fixed
fate-h264-conformance-mr3_tandberg_b with 2 threads.
13 years ago
Ronald S. Bultje
db431f7efe
h264: add support for decoding planar RGB images.
13 years ago
Justin Ruggles
f3a29b750a
avcodec: move some AVCodecContext fields to an internal struct.
...
A new field, AVCodecContext.internal is used to hold a new struct
AVCodecInternal, which has private fields that are not codec-specific and are
used by general libavcodec functions.
Moved internal_buffer, internal_buffer_count, and is_copy.
13 years ago
Sebastien Zwickert
ac3dbb4d58
hwaccel: OS X Video Decoder Acceleration (VDA) support.
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Ronald S. Bultje
ea2bb12e3e
h264: improve calculation of codec delay.
...
Fixes the following conformance suite samples:
HCBP1_HHI_A.264, HCBP2_HHI_A.264, HCMP1_HHI_A.264 (main)
HCHP1_HHI_B.264, HCHP2_HHI_A.264, HCHP3_HHI_A.264 (frext)
13 years ago
Anton Mitrofanov
640d5f1c80
Fix decoding of lossless 4:2:2 H.264
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Anton Mitrofanov
fdb5314ea7
Fix decoding of lossless 10-bit 4:4:4 H.264
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Anton Khirnov
acffe45732
mpegvideo: remove some unused variables from MpegEncContext.
13 years ago
Dustin Brody
9abc98737f
lavc: replace references to deprecated AVCodecContext.error_recognition to use AVCodecContext.err_recognition
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
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.
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
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