Michael Niedermayer
cd5a48e549
avcodec/h264_slice: Put CONFIG_GRAY first in if()
...
This is more consistent
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
354db19ff4
avcodec/h264: Remove bits_per_raw_sample hacks
...
Fixes assertion failure
Fixes: f12c79769501ee471a5c731b8304ffcb/signal_sigabrt_7ffff6ac8cc9_3766_cov_4267830138_undemuxable_h264.ts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
141b9d5c3b
avcodec/h264_slice: update slice context linesizes when a new picture is allocated
...
previously they where only updated when decoding started and would thus have
been inconsistent for a longer period of time leaving more chances for
problems
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d86e8f235e
avcodec/h264_slice: Merge 2 memcpy()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
c28ed1d743
h264: move [uv]linesize to the per-slice context
...
While it is a per-frame variable, it is only really used in the
low-level decoding code, so it is more efficient to store it in the
slice context.
10 years ago
Anton Khirnov
a12d3188cb
h264: use a smaller struct for the ref lists
...
There is no need to store a whole H264Picture, with a full AVFrame
embedded in it. This should allow getting rid of the embedded AVFrame
later.
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
92e0b7342c
h264_slice: constify all the uses of H264Context during slice decoding
...
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
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
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
e9b2383bf8
h264: move mb_mbaff into the per-slice context
10 years ago
Anton Khirnov
bc98e8c0e0
h264: move mb_field_decoding_flag into the per-slice context
10 years ago
Anton Khirnov
f42485dbce
h264: use a separate GetBitContext for slice data
10 years ago
Anton Khirnov
404a416d4b
h264: remove some remnants of data partitioning
10 years ago
Anton Khirnov
7bbc254d64
h264: move resync_mb_{x,y} into the per-slice context
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
07c5ca551b
h264: move is_complex into the per-slice context
10 years ago
Anton Khirnov
47a0d39350
h264: move mb_skip_run 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
a9b201cacf
h264: move cabac_init_idc into the per-slice context
10 years ago
Anton Khirnov
e6c90ce94f
h264: move loopfilter parameters 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
5c8280c307
h264: move last_qscale_diff into the per-slice context
10 years ago
Anton Khirnov
e7226984ac
h264: move [{top,left}_]cbp into the per-slice context
10 years ago
Anton Khirnov
30da98adbd
h264: move cabac[_state] into the per-slice context
10 years ago
Anton Khirnov
bf03a878a7
h264: move mb[_{padding,luma_dc}] 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
ee0d774dfa
h264: move dist_scale_factor[_field] 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
5f390eef8e
h264: move mb_[uv]linesize 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
7d8154edd5
h264: move intra4x4_pred_mode[_cache] into the per-slice context
10 years ago
Anton Khirnov
8b00f4df20
h264: move some neighbour information into the per-slice context
10 years ago
Anton Khirnov
06789ad3b7
h264: move qp_thresh into the per-slice context
10 years ago
Anton Khirnov
d231e84b06
h264: move the quantizers into the per-slice context
10 years ago
Anton Khirnov
d40ae0e595
h264: do not copy qscale when updating per-thread contexts
...
It's a per-slice quantity constructed when parsing the slice header.
10 years ago
Anton Khirnov
92c6c2a605
h264: split weighted pred-related vars into per-slice context
10 years ago
Anton Khirnov
ad786dd450
h264: remove a now redundant error check
...
It was only relevant when data partitioning was in use.
10 years ago
Michael Niedermayer
b37c3396cd
avcodec/h264: Add ff_ prefix to the shared h264_init_dequant_tables() function
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c23a0e77dd
avcodec/h264: Only reinit quant tables if a new PPS is allowed
...
Fixes null pointer dereference
Fixes: signal_sigsegv_3042097_3007_cov_1741463594_non_monotone_timestamps1.mkv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
0dea4c77cc
h264: only ref cur_pic in update_thread_context if it is initialized
...
It may be empty if the previous thread's decode call did not contain a
valid frame.
10 years ago
Peter Meerwald
9abc80f1ed
libavcodec: Make use of av_clip functions
...
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Michael Niedermayer
de6df46120
avcodec/h264: Setup decoder to have matching reference to the EC code
...
Also move EC ref initialization to where the EC code is called.
Fixes out of array read
Fixes: asan_heap-uaf_143f420_142_20110805_112659_ch0.mkv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2fd9ce92af
avcodec/h264_slice: assert that reinit does not occur after the first slice
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago