Anton Khirnov
bd737b5178
h264: reset the private data in init_thread_copy()
...
The generic code copies the main context's private data to all the
others. However that is quite dangerous, as it might end up copying some
pointers that are or will become invalid.
Since everything we actually need will be copied later in
update_thread_context(), it's safest to zero the private data in
init_thread_copy(), so it works the same way as init for the main
context.
10 years ago
Anton Khirnov
a939e5b252
h264: remove a commented out nonsense line
10 years ago
Anton Khirnov
65afa65e73
h264: drop redundant initialization of the scaling matrices
...
It will always be initialized when actually parsing the PPS.
10 years ago
Anton Khirnov
e1f907711a
h264: factor out common code from init() and init_thread_copy()
10 years ago
Anton Khirnov
43fd3dd80c
h264: drop redundant initialization in init()
...
There is no real advantage to initializing any of those in init,
assuming yuv420, before the real stream parameters are known.
10 years ago
Anton Khirnov
050324d020
h264: initialize cur_chroma_format_idc
...
This makes sure the various DSP contexts get properly initialized in
ff_h264_set_parameter_from_sps() whatever the value of
raw_bits_per_sample.
10 years ago
Anton Khirnov
a4d34e218f
h264: disable ER by default
...
The way it is currently designed is fundamentally unsafe and cannot be
reasonably fixed without completely rewriting it.
10 years ago
Anton Khirnov
2b4c38d3c6
h264: drop some mpegvideo remnants from draw_horiz_band()
...
This code makes no sense for h.264.
10 years ago
Anton Khirnov
5bf3c0fa49
h264: drop the now unused per-slice H264Contexts
10 years ago
Anton Khirnov
51d8725a6e
h264: use the main H264Context as the parent for all slice contexts
...
There is now no need to have per-slice copies of the H264Context.
10 years ago
Anton Khirnov
3178f4d33f
h264: move rbsp_buffer into the per-slice context
10 years ago
Anton Khirnov
582683b6ac
h264: move remaining ER stuff into the per-slice context
10 years ago
Anton Khirnov
5bc69f38c1
error_resilience: do not require mbintra/skip tables
...
h264dec does not use them at all and only allocates them for ER.
10 years ago
Anton Khirnov
c377e04d8a
h264: move top_borders into the per-slice context
...
Also change the method for allocating to the same one as used by
edge_emu_buffer.
10 years ago
Anton Khirnov
36d04801ba
h264: move the scratch buffers into the per-slice context
...
Also change the method for allocating them. Instead of two possible
alloc calls from different places, just ensure they are allocated at the
start of each slice. This should be simpler and less bug-prone than the
previous method.
10 years ago
Anton Khirnov
5c4b98de4d
h264.c: constify all uses of H264Context in slice and lower-level functions
...
All the variables modified by this code are either per-MB arrays or have
been moved to the per-slice context
10 years ago
Anton Khirnov
f42485dbce
h264: use a separate GetBitContext for slice data
10 years ago
Anton Khirnov
2ea00e35e4
h264: do not abuse the context as a temporary storage in get_last_needed_nal()
...
Use a local variable instead.
10 years ago
Anton Khirnov
404a416d4b
h264: remove some remnants of data partitioning
10 years ago
Anton Khirnov
d4d9068cdf
h264: move mb_{x,y} into the per-slice context
10 years ago
Anton Khirnov
0edbe6faa7
h264: move mb_xy into the per-slice context
10 years ago
Anton Khirnov
9951907f6f
h264: move redundant_pic_count into the per-slice context
10 years ago
Anton Khirnov
a67f8ae9a2
h264: move mvd_table into the per-slice context
10 years ago
Anton Khirnov
95eb35f305
h264: move the ref lists variables into the per-slice context
10 years ago
Anton Khirnov
066aafced4
h264: move direct_spatial_mv_pred into the per-slice context
10 years ago
Anton Khirnov
56febc993b
h264: move the slice type variables into the per-slice context
10 years ago
Anton Khirnov
e6287f077c
h264: move {mv,ref}_cache into the per-slice context
10 years ago
Anton Khirnov
f69574cf7a
h264: move non_zero_count_cache into the per-slice context
10 years ago
Anton Khirnov
64c81b2cd0
h264: move *_samples_available into the per-slice context
10 years ago
Anton Khirnov
7d8154edd5
h264: move intra4x4_pred_mode[_cache] into the per-slice context
10 years ago
Anton Khirnov
92c6c2a605
h264: split weighted pred-related vars into per-slice context
10 years ago
Anton Khirnov
a06b0b1295
h264: initialize H264Context.avctx in init_thread_copy
...
This prevents using a wrong (first thread's) AVCodecContext if decoding
a frame in the first pass over all threads fails.
10 years ago
Michael Niedermayer
61928b68dc
h264: Do not share rbsp_buffer across threads
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
CC: libav-stable@libav.org
10 years ago
Anton Khirnov
167e004e1a
h264: drop any pretense of support for data partitioning
...
It does not work correctly and apparently never did. There is no
indication that this (mis)feature is ever used in the wild or even that
any software other than the reference supports it.
Since the code that attempts to support it adds some nontrivial
complexity and has resulted in several bugs in the past, it is better to
just drop it.
10 years ago
Anton Khirnov
ecab21ac47
h264: do not reset the ref lists in flush_change()
...
They are always constructed anew when needed, so there is no need to
reset them explicitly.
10 years ago
Anton Khirnov
9404a47a2d
h264: move parser-only variables to their own context
10 years ago
Anton Khirnov
cf1e0786ed
error_resilience: move the MECmpContext initialization into ER code
...
Currently, it needs to be initialized by the ER caller (which is
currently either a mpegvideo decoder or h264dec). However, since none of
those decoders use MECmpContext for anything except ER, it makes more
sense to handle it purely inside ER.
10 years ago
Anton Khirnov
f9f883af4f
h264: simplify code in flush_dpb()
...
There is no point in clearing reference explicitly, since that will be
done as a part of ff_h264_unref_picture() right below.
10 years ago
Anton Khirnov
60d4c6ff76
h264: restore a block mistakenly removed in e10fd08a
...
CC: libav-stable@libav.org
Bug-ID: 781
10 years ago
Michael Niedermayer
d69d787dad
h264: proper cleanup in ff_h264_alloc_tables() if DPB alloc fails
...
CC: libav-devel@libav.org
10 years ago
Dale Curtis
56de2897a6
h264: Fix memory leak on ff_h264_decode_init() failure
...
CC: libav-devel@libav.org
10 years ago
Vittorio Giovara
b1b1a7370e
display: fix order of operands
...
CC: libav-stable@libav.org
Bug-Id: CID 1238828 / CID 1238832
10 years ago
Anton Khirnov
7ea1b3472a
lavc: deprecate the use of AVCodecContext.time_base for decoding
...
When decoding, this field holds the inverse of the framerate that can be
written in the headers for some codecs. Using a field called 'time_base'
for this is very misleading, as there are no timestamps associated with
it. Furthermore, this field is used for a very different purpose during
encoding.
Add a new field, called 'framerate', to replace the use of time_base for
decoding.
10 years ago
Michael Niedermayer
2cd7c99498
h264: reset ret to avoid propagating minor failures
...
Unbreak 772d150a6e
.
CC: libav-stable@libav.org
Bug-Id: 750 / 905753
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Gabriel Dume
f929ab0569
cosmetics: Write NULL pointer equality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Felix Abecassis
a7e541c992
h264: fix interpretation of interleved stereo modes
...
Column and row frame packing arrangements were inverted.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Diego Biurrun
2d60444331
dsputil: Split motion estimation compare bits off into their own context
10 years ago
Luca Barbato
2db953f846
h264: K&R formatting cosmetics
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Vittorio Giovara
18e3d61e9e
h264: parse display orientation SEI message
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
11 years ago
Vittorio Giovara
772d150a6e
h264: error out from decode_nal_units() when AV_EF_EXPLODE is set
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
11 years ago