Commit Graph

114 Commits

Author SHA1 Message Date
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>
2015-07-27 15:24:58 +01:00
Vittorio Giovara 6a85dfc830 lavc: Replace av_dlog and tprintf with internal macros 2015-04-19 12:41:59 +01:00
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
2015-03-21 11:27:15 +01:00
Anton Khirnov bc98e8c0e0 h264: move mb_field_decoding_flag into the per-slice context 2015-03-21 11:27:15 +01:00
Anton Khirnov 0edbe6faa7 h264: move mb_xy into the per-slice context 2015-03-21 11:27:14 +01:00
Anton Khirnov e6c90ce94f h264: move loopfilter parameters into the per-slice context 2015-03-21 11:27:14 +01:00
Anton Khirnov e7226984ac h264: move [{top,left}_]cbp into the per-slice context 2015-03-21 11:27:13 +01:00
Anton Khirnov 95eb35f305 h264: move the ref lists variables into the per-slice context 2015-03-21 11:27:13 +01:00
Anton Khirnov e6287f077c h264: move {mv,ref}_cache into the per-slice context 2015-03-21 11:27:13 +01:00
Anton Khirnov f69574cf7a h264: move non_zero_count_cache into the per-slice context 2015-03-21 11:27:12 +01:00
Anton Khirnov 8b00f4df20 h264: move some neighbour information into the per-slice context 2015-03-21 11:27:12 +01:00
Anton Khirnov d231e84b06 h264: move the quantizers into the per-slice context 2015-03-21 11:27:12 +01:00
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.
2014-09-05 13:55:04 +02:00
Vittorio Giovara d24e9a99a4 h264 does not depend on mpegvideo any more 2014-03-16 23:05:47 +01:00
Vittorio Giovara e0c16e4e32 mpegvideo: move mpegvideo formats-related defines to mpegutils.h 2014-03-16 23:04:41 +01:00
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>
2014-02-20 18:58:38 +01:00
Diego Biurrun 2a61592573 avcodec: Remove some commented-out debug cruft 2013-08-20 19:59:50 +02:00
Anton Khirnov 23e85be58f h264: add a parameter to the CHROMA444 macro.
This way it does not look like a constant.
2013-03-21 10:21:02 +01:00
Anton Khirnov e962bd08ee h264: add a parameter to the CHROMA422 macro.
This way it does not look like a constant.
2013-03-21 10:20:58 +01:00
Anton Khirnov 6d2b6f21eb h264: add a parameter to the CABAC macro.
This way it does not look like a constant.
2013-03-21 10:20:52 +01:00
Anton Khirnov 7fa00653a5 h264: add a parameter to the FIELD_PICTURE macro.
This way it does not look like a constant.
2013-03-21 10:20:44 +01:00
Anton Khirnov 7bece9b22f h264: add a parameter to the FRAME_MBAFF macro.
This way it does not look like a constant.
2013-03-21 10:20:39 +01:00
Anton Khirnov da6be8fcec h264: add a parameter to the MB_FIELD macro.
This way it does not look like a constant.
2013-03-21 10:20:35 +01:00
Anton Khirnov 759001c534 lavc decoders: work with refcounted frames. 2013-03-08 07:38:30 +01:00
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>
2013-02-15 16:35:16 +01:00
Diego Biurrun 218aefce44 dsputil: Move LOCAL_ALIGNED macros to libavutil 2013-02-08 23:13:37 +01:00
Diego Biurrun 9c6cf7f2c9 avcodec: Drop silly and/or broken printf debug output 2012-10-01 10:24:28 +02:00
Diego Biurrun e44c11e9fa cosmetics: Move static and inline attributes to more standard places.
Fixes several "‘static’ is not at beginning of declaration" warnings.
2012-01-14 17:32:36 +01:00
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>
2011-10-21 01:00:41 -07:00
Jason Garrett-Glaser b5bbc84fe2 H.264: add filter_mb_fast support for >8-bit decoding
Much faster high bit depth deblocking.
2011-07-11 14:58:50 -07:00
Jason Garrett-Glaser f6b7f72461 H.264: avoid redundant alpha/beta calculations in loopfilter 2011-07-11 08:46:44 -07:00
Jason Garrett-Glaser a4f6be86d6 H.264: optimize intra/inter loopfilter decision 2011-07-11 08:46:03 -07:00
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.
2011-07-11 00:19:00 +02:00
Jason Garrett-Glaser 7f7dc4fb55 H.264: fix filter_mb_fast with 4:4:4 + 8x8dct 2011-07-09 13:32:55 -07:00
Jason Garrett-Glaser 6a2176aac0 H.264: improve qp_thresh check
Eliminate redundant check in filter_mb_fast, consider bit depth in calculating qp_thresh.
2011-07-08 16:12:42 -07:00
Jason Garrett-Glaser a625e13208 H.264: make loopfilter bS const where applicable 2011-07-05 16:28:37 -07:00
Jason Garrett-Glaser 556f8a066c H.264: template left MB handling
Faster H.264 decoding with ALLOW_INTERLACE off.
2011-07-03 15:06:00 -07:00
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.
2011-07-03 15:05:49 -07:00
Jason Garrett-Glaser 84153d1883 H.264: make filter_mb_fast support 4:4:4 2011-06-26 14:35:36 -07:00
Jason Garrett-Glaser 2702a6f114 H.264: fix 4:4:4 + deblocking + 8x8dct + cavlc + MBAFF 2011-06-22 02:39:20 -07:00
Jason Garrett-Glaser 7c9079ab4c H.264: fix 4:4:4 + deblocking + MBAFF 2011-06-22 02:39:17 -07:00
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.
2011-06-13 21:16:33 -07:00
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.
2011-06-13 21:16:30 -07:00
Jason Garrett-Glaser 504811baea Roll back 4:4:4 H.264 for now
Needs some ARM/PPC asm modifications.
2011-06-13 13:38:46 -07:00
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.
2011-06-13 12:21:49 -07:00
Jason Garrett-Glaser c9c493872c 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.
2011-06-13 12:21:39 -07:00
Oskar Arvidsson 6e3ef511d7 Add the notion of pixel size in h264 related functions.
In high bit depth the pixels will not be stored in uint8_t like in the
normal case, but in uint16_t. The pixel size is thus 1 in normal bit
depth and 2 in high bit depth.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:33 -04:00
Oskar Arvidsson 44ca80df34 Make the h264 loop filter bit depth aware.
Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-10 07:24:32 -04:00
Ronald S. Bultje dd561441b1 h264: DSP'ize MBAFF loopfilter. 2011-05-10 07:24:08 -04:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00