Andreas Rheinhardt
c3ff716808
avcodec/h264_*: Remove unnecessary internal.h inclusions
...
Also remove some other unnecessary headers while at it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Anton Khirnov
e15371061d
lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bump
...
They are not properly namespaced and not intended for public use.
4 years ago
Michael Niedermayer
222c9f031d
avcodec/h264_mvpred: Fix runtime error: left shift of negative value -1
...
Fixes: 734/clusterfuzz-testcase-4821293192970240
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
ab998f4c7f
avcodec/h264_mvpred: Fix multiple runtime error: left shift of negative value
...
Fixes: 710/clusterfuzz-testcase-5091051431788544
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Anton Khirnov
9df889a5f1
h264: rename h264.[ch] to h264dec.[ch]
...
This is more consistent with the naming of other decoders.
9 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Anton Khirnov
3176217c60
h264: decouple h264_ps from the h264 decoder
...
Make the SPS/PPS parsing independent of the H264Context, to allow
decoupling the parser from the decoder. The change is modelled after the
one done earlier for HEVC.
Move the dequant buffers to the PPS to avoid complex checks whether they
changed and an expensive copy for frame threads.
9 years ago
Michael Niedermayer
53fd70579b
avcodec/h264_mvpred: Fix undefined shifts in MAP_F2F
...
Fixes: asan_heap-oob_17301a3_2100_cov_3226131691_ff_add_pixels_clamped_mmx.m2ts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Anton Khirnov
bc98e8c0e0
h264: move mb_field_decoding_flag into the per-slice context
10 years ago
Anton Khirnov
3bea6409a1
h264_mvpred: constify all uses of H264Context
...
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
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
bd3e460b73
h264: move direct_cache into the per-slice context
10 years ago
Anton Khirnov
6479c79f55
h264: move mvd_cache 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
e7226984ac
h264: move [{top,left}_]cbp 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
99a35d1ccb
h264: move neighbor_transform_size 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
8b00f4df20
h264: move some neighbour information into the per-slice context
10 years ago
Anton Khirnov
5355ed6b20
h264: move {prev,next}_mb_skipped into the per-slice context
10 years ago
Anton Khirnov
d231e84b06
h264: move the quantizers into the per-slice context
10 years ago
Vittorio Giovara
e0c16e4e32
mpegvideo: move mpegvideo formats-related defines to mpegutils.h
11 years ago
Michael Niedermayer
4fb1221e66
h264: reduce whitespace differences to libav
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
2a61592573
avcodec: Remove some commented-out debug cruft
11 years ago
Anton Khirnov
23e85be58f
h264: add a parameter to the CHROMA444 macro.
...
This way it does not look like a constant.
12 years ago
Anton Khirnov
e962bd08ee
h264: add a parameter to the CHROMA422 macro.
...
This way it does not look like a constant.
12 years ago
Anton Khirnov
6d2b6f21eb
h264: add a parameter to the CABAC macro.
...
This way it does not look like a constant.
12 years ago
Anton Khirnov
7bece9b22f
h264: add a parameter to the FRAME_MBAFF macro.
...
This way it does not look like a constant.
12 years ago
Anton Khirnov
da6be8fcec
h264: add a parameter to the MB_FIELD macro.
...
This way it does not look like a constant.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Anton Khirnov
2c54155407
h264: deMpegEncContextize
...
Most of the changes are just trivial are just trivial replacements of
fields from MpegEncContext with equivalent fields in H264Context.
Everything in h264* other than h264.c are those trivial changes.
The nontrivial parts are:
1) extracting a simplified version of the frame management code from
mpegvideo.c. We don't need last/next_picture anymore, since h264 uses
its own more complex system already and those were set only to appease
the mpegvideo parts.
2) some tables that need to be allocated/freed in appropriate places.
3) hwaccels -- mostly trivial replacements.
for dxva, the draw_horiz_band() call is moved from
ff_dxva2_common_end_frame() to per-codec end_frame() callbacks,
because it's now different for h264 and MpegEncContext-based
decoders.
4) svq3 -- it does not use h264 complex reference system, so I just
added some very simplistic frame management instead and dropped the
use of ff_h264_frame_start(). Because of this I also had to move some
initialization code to svq3.
Additional fixes for chroma format and bit depth changes by
Janne Grunau <janne-libav@jannau.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Michael Niedermayer
4e3fc46828
h264_mvpred: use av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
1de53d006b
h264: K&R formatting cosmetics for header files (part II/II)
13 years ago
Michael Niedermayer
4d70023a2a
h264: fix init of topleft ref/mv.
...
Fixes Ticket778
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
58c42af722
doxygen: misc consistency, spelling and wording fixes
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
Mans Rullgard
4d1418cd4f
h264: fix signed overflows in x*0x01010101 expressions
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Baptiste Coudurier
231a6df9ea
h264dec: h264: 4:2:2 intra decoding
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
806212498a
h264: move fill_decode_neighbors()/fill_decode_caches() to h264_mvpred.h
...
This fixes a bunch of unused function warnings.
14 years ago
Diego Biurrun
028216b2c2
h264: move decode_mb_skip() from h264.h to h.264_mvpred.h
...
This resolves a circular dependency between the headers.
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
ef0c594801
H.264: merge fill_rectangle into P-SKIP MV prediction, to match B-SKIP
14 years ago
Jason Garrett-Glaser
5136ba7c69
H.264: faster P-SKIP decoding
...
Inline the relevant parts of fill_decode_caches into P-SKIP mv prediction to
avoid calling the whole thing.
14 years ago