Anton Khirnov
f638b67e57
h264: move the parameter set definitions to a new header file
The PS parsing code is independent from the decoder, so it makes more
sense for it to have its own separate header.
9 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
Anton Khirnov
6e92181bf8
h264: pass just the PPS to get_chroma_qp()
It does not need the whole context. This will simplify the following
commit.
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
Vittorio Giovara
7c6eb0a1b7
lavc: AV-prefix all codec flags
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Anton Khirnov
34d4c605e9
h264_loopfilter: 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
bc98e8c0e0
h264: move mb_field_decoding_flag 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
e6c90ce94f
h264: move loopfilter parameters 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
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
8b00f4df20
h264: move some neighbour information into the per-slice context
10 years ago
Anton Khirnov
d231e84b06
h264: move the quantizers into the per-slice context
10 years ago
Diego Biurrun
213e606752
Replace av_unused attributes by block structures
This is more portable and avoids warnings with compilers that do not
properly support av_unused.
10 years ago
Vittorio Giovara
d24e9a99a4
h264 does not depend on mpegvideo any more
11 years ago
Vittorio Giovara
e0c16e4e32
mpegvideo: move mpegvideo formats-related defines to mpegutils.h
11 years ago
Vittorio Giovara
f777504f64
h264: Lower bound check for slice offsets
And use the value from the specification.
Sample-Id: 00000451-google
Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
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
7fa00653a5
h264: add a parameter to the FIELD_PICTURE 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
Diego Biurrun
218aefce44
dsputil: Move LOCAL_ALIGNED macros to libavutil
12 years ago
Diego Biurrun
9c6cf7f2c9
avcodec: Drop silly and/or broken printf debug output
12 years ago
Diego Biurrun
e44c11e9fa
cosmetics: Move static and inline attributes to more standard places.
Fixes several "‘static’ is not at beginning of declaration" warnings.
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
Jason Garrett-Glaser
b5bbc84fe2
H.264: add filter_mb_fast support for >8-bit decoding
Much faster high bit depth deblocking.
14 years ago
Jason Garrett-Glaser
f6b7f72461
H.264: avoid redundant alpha/beta calculations in loopfilter
14 years ago
Jason Garrett-Glaser
a4f6be86d6
H.264: optimize intra/inter loopfilter decision
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
7f7dc4fb55
H.264: fix filter_mb_fast with 4:4:4 + 8x8dct
14 years ago
Jason Garrett-Glaser
6a2176aac0
H.264: improve qp_thresh check
Eliminate redundant check in filter_mb_fast, consider bit depth in calculating qp_thresh.
14 years ago
Jason Garrett-Glaser
a625e13208
H.264: make loopfilter bS const where applicable
14 years ago
Jason Garrett-Glaser
556f8a066c
H.264: template left MB handling
Faster H.264 decoding with ALLOW_INTERLACE off.
14 years ago
Jason Garrett-Glaser
4320a309ce
H.264: make filter_mb_fast support the case of unavailable top mb
Significantly faster deblocking in streams with lots of slices.
14 years ago
Jason Garrett-Glaser
84153d1883
H.264: make filter_mb_fast support 4:4:4
14 years ago
Jason Garrett-Glaser
2702a6f114
H.264: fix 4:4:4 + deblocking + 8x8dct + cavlc + MBAFF
14 years ago
Jason Garrett-Glaser
7c9079ab4c
H.264: fix 4:4:4 + deblocking + MBAFF
14 years ago
Jason Garrett-Glaser
7b442ad918
H.264: fix CODEC_FLAG_GRAY
It was broken in 4:4:4, and still did chroma deblocking for no reason in 4:2:0.
14 years ago
Jason Garrett-Glaser
c90b94424c
4:4:4 H.264 decoding support
Note: this is 4:4:4 from the 2007 spec revision, not the previous (now deprecated) 4:4:4 mode in H.264.
14 years ago
Jason Garrett-Glaser
504811baea
Roll back 4:4:4 H.264 for now
Needs some ARM/PPC asm modifications.
14 years ago
Jason Garrett-Glaser
c177cfb4fb
H.264: fix CODEC_FLAG_GRAY
It was broken in 4:4:4, and still did chroma deblocking for no reason in 4:2:0.
14 years ago