Alexander Strange
bc6a3bd4a5
h264: Fix a possible overread in decode_nal_units()
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
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
Michael Niedermayer
38331d2036
h264: disable checking reader, overreads are not possible
...
in ffmpegs h264 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
3d07e0aba0
h264: return the consumed amountg in case of Q264
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
227960427b
h264: retuen the amount read in case of NAL_END_SEQUENCE
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
902c090413
h264: reset nal_unit_type so that decoding frames without any nal units
...
dont leave its value at something random.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
a4755df523
h264: fix midstream extardata handling with dump.f4v
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
d998a6ddee
h264: Fix build with --disable-everything --enable-decoder='h264' --disable-optimizations
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
3dea28cc2e
h264: Fix concealment regression introduced by babf4fe01a
...
Limit the new case to when the decoder is flushed instead of at each idr frame
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
8743400961
h264: reset prev_poc_msb to the same value everywhere.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
cc61643123
h264: improve "no picture" debug output.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
5b2873c1d5
h264: switch from qatars has_b_frames calculation back to mine.
...
Their 2nd try does like the first not work at all.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
d9ced9fec6
h264: init prev_frame_num to -1 on init
...
Fixes Ticket711
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
6287a356e3
h264: Fix memleaks on close, reset more fields
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
fb266f5973
h264: show when has_b_frames is being increased.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Carl Eugen Hoyos
2d6a45c12a
Silence warnings when decoding QNAP Systems H264 codec.
...
Fixes ticket #571 .
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
Joakim Plate
babf4fe01a
Don't fill in frame gaps with copied refs after flush
...
The filled in refs cause corruptions in the video frame
for a long time after it should have recovered.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
3e971fc6b5
h264: fix cur_chroma_format_idc with slice multithreading.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
4f7ad4c3e4
h264: migrate poc gap based has_b_frames calculation into new has_b_frame calculation code.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
ed83f84891
h264: minor simplification
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
bfca35114a
h264: rewrite has_b_frame calculation code,
...
the previous implementation was too buggy.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
18b7f40007
h264: reset last_pocs on IDRs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
545ec935a4
h264: Use mismatching frame numbers in fields to synchronize the
...
first/second field state independant of them being reference or not.
Fixes Ticket354
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Joakim Plate
29a29226bb
Set avctx->coded_width/height to uncropped h264 sizes
...
avctx->width/height remain right/bottom cropped as previous behaviour.
Hardware decoders need to know the uncropped data to allocate surfaces
of correct height. Some hardware is picky and fails to decoder properly
if a surface larger than needed is used during decode, so just aligning
up is not enough.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
23acfcd9e5
h264: favor coded_width in resolution chnaged checks
...
Suggested-by: Joakim Plate <elupus@ecce.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
146f99cfec
h264: add nal_length_size and is_avc to the publically readable fields
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Sebastien Zwickert
d66ee6ac48
HWAccel: adds Video Decoder Acceleration (VDA) module for Mac OS X.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
0387ad892c
Be more verbose about unsupported H.264 bit-depths.
13 years ago
Carl Eugen Hoyos
7afa6b4458
Warn if YCgCo colourspace is detected in H.264.
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
Michael Niedermayer
23040e2e3d
h264: use long reading for first_mb_in_slice
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e403a97aac
h264: 10l fix, missing () after replacing % by &
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
35075dc650
h264: Calculate a tighter recovery_frame.
...
Reduces delay with mplayers TS demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago