Diego Biurrun
3856a2aaa6
h264-test: Remove unused DSP and AVCodec contexts and related init calls.
...
This also avoids a segfault on startup.
13 years ago
Michael Niedermayer
beb19a0444
h264: Disallow w/h/pixfmt changes for frame threads.
...
Previously this was just checked in case of slice threads,
but frame threads do not support this either currently.
Making them support this is of course the long term goal
Fixes bug155
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
55b9ef18e4
cabac: split cabac.h into declarations and function definitions
...
This fixes standalone compilation of some decoders with --disable-optimizations.
cabac.h defines some inline functions that use symbols from cabac.c. Without
optimizations these inline functions are not eliminated and linking fails with
references to non-existing symbols.
Splitting the inline functions off into their own header and only #including
it in the places where the inline functions are used allows #including cabac.h
from anywhere without ill effects.
13 years ago
Diego Biurrun
a7e3cb9d32
h264-test: Initialize AVCodecContext.av_class.
...
This fixes a segfault on startup.
Also remove a commented-out and completely unused variable.
13 years ago
Diego Biurrun
301fb92131
h264: Only use symbols from the SVQ3 decoder under proper conditionals.
...
Fixes --disable-everything --enable-decoder=h264 --disable-optimizations.
13 years ago
Ronald S. Bultje
400ba1d735
h264: return index in buffer on end-of-sequence.
...
Fixes hangs if the last packet contains an end-of-sequence NAL unit,
bug 158.
13 years ago
Diego Biurrun
54e68fb3b8
Merge some declarations and initializations.
...
This fixes compilation failures related to START_TIMER/STOP_TIMER macros and
-Werror=declaration-after-statement. START_TIMER declares variables and thus
may not be placed after statements outside of a new block.
13 years ago
Janne Grunau
881a5e047d
mpegenc: use avctx->slices as number of slices
...
Adds a new member to MpegEncContext to hold the number of used slice
contexts. Fixes segfaults with '-threads 17 -thread_type slice' and
fate-vsynth{1,2}-mpeg{2,4}thread{,_ilace} with --disable-pthreads.
13 years ago
Michael Niedermayer
9ba43e50ef
h264: Fix frame sync / random access handling.
...
It seems I have misunderstood the spec when I implemented this
originally.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
fba6777363
h264: Fix recovery_frame initialization when recovery_frame is -1
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
36fa781bd6
h264: reset picture->sync on allocation.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
ecb14b8af7
h264: add forgotten \n to "Invalid mix of idr and non-idr slices"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
393253b4b3
h264: Print pass in NAL debug output
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
099d6813c2
svq3: Fix memory corruption introduced by automatic thread_count.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
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