1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-11 03:45:05 +02:00
Commit Graph

164 Commits

Author SHA1 Message Date
James Almer
8c7932884d Merge commit 'f638b67e5790735f34620bf82025c9b9d6fc7216'
* commit 'f638b67e5790735f34620bf82025c9b9d6fc7216':
  h264: move the parameter set definitions to a new header file

Conflicts:
libavcodec/h264_parse.h
libavcodec/h264_ps.c
libavcodec/h264dec.h

Merged-by: James Almer <jamrial@gmail.com>
2016-08-01 12:58:09 -03:00
Clément Bœsch
15b26e88cb Merge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'
* commit '9df889a5f116c1ee78c2f239e0ba599c492431aa':
  h264: rename h264.[ch] to h264dec.[ch]

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-29 11:01:36 +02:00
Clément Bœsch
5565e27111 Merge commit '6e92181bf836f48627a4733b6fd240a99fd36365'
* commit '6e92181bf836f48627a4733b6fd240a99fd36365':
  h264: pass just the PPS to get_chroma_qp()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-07-01 14:23:38 +02:00
Clément Bœsch
8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
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.
2016-06-21 11:13:29 +02:00
Anton Khirnov
9df889a5f1 h264: rename h264.[ch] to h264dec.[ch]
This is more consistent with the naming of other decoders.
2016-06-21 11:11:26 +02:00
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.
2016-06-12 20:27:53 +02:00
Clément Bœsch
1534ef87c7 Merge commit '3176217c60ca7828712985092d9102d331ea4f3d'
* commit '3176217c60ca7828712985092d9102d331ea4f3d':
  h264: decouple h264_ps from the h264 decoder

Main changes:

- a local GetBitContext is created for the various
  ff_h264_decode_seq_parameter_set() attempts

- just like the old code, remove_sps() is adjusted so it doesn't remove
  the pps.

  Fixes decode with Ticket #631
  http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20111108/dae58f17/attachment.mp4
  but see next point as well.

- ff_h264_update_thread_context() is updated to work even when SPS
  isn't set as it breaks current skip_frame code. This makes sure we
  can still decode the sample from ticket #631 without the need for
  -flags2 +chunks. (Thanks to Michael)

- keep {sps,pps}_ref pointers that stay alive even when the active
  pps/sps get removed from the available lists (patch by michaelni with
  additionnal frees in ff_h264_free_context() from mateo)

- added a check on sps in avpriv_h264_has_num_reorder_frames() to fix
  crashes with mpegts_with_dvbsubs.ts from Ticket #4074
  http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4074/mpegts_with_dvbsubs.ts

- in h264_parser.c:h264_parse(), after the ff_h264_decode_extradata() is
  called, the pps and sps from the local parser context are updated with
  the pps and sps from the used h264context. This fixes fate-flv-demux.

- in h264_slice.c, "PPS changed between slices" error is not triggered
  anymore in one condition as it makes fate-h264-xavc-4389 fails with
  THREADS=N (Thanks to Michael)

Merged-by: Clément Bœsch <clement@stupeflix.com>
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-06-12 13:26:52 +02:00
Vittorio Giovara
41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
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.
2016-04-24 10:06:23 +02:00
Michael Niedermayer
94d68a41fa Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
* commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615':
  lavc: AV-prefix all codec flags

Conflicts:
	doc/examples/muxing.c
	ffmpeg.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/aacdec.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/ac3enc_float.c
	libavcodec/atrac1.c
	libavcodec/atrac3.c
	libavcodec/atrac3plusdec.c
	libavcodec/dcadec.c
	libavcodec/ffv1enc.c
	libavcodec/h264.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_mb.c
	libavcodec/imc.c
	libavcodec/libmp3lame.c
	libavcodec/libtheoraenc.c
	libavcodec/libtwolame.c
	libavcodec/libvpxenc.c
	libavcodec/libxavs.c
	libavcodec/libxvid.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegaudiodec_template.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/nellymoserdec.c
	libavcodec/nellymoserenc.c
	libavcodec/nvenc.c
	libavcodec/on2avc.c
	libavcodec/options_table.h
	libavcodec/opus_celt.c
	libavcodec/pngenc.c
	libavcodec/ra288.c
	libavcodec/ratecontrol.c
	libavcodec/twinvq.c
	libavcodec/vc1_block.c
	libavcodec/vc1_loopfilter.c
	libavcodec/vc1_mc.c
	libavcodec/vc1dec.c
	libavcodec/vorbisdec.c
	libavcodec/vp3.c
	libavcodec/wma.c
	libavcodec/wmaprodec.c
	libavcodec/x86/hpeldsp_init.c
	libavcodec/x86/me_cmp_init.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:10:35 +02:00
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
Michael Niedermayer
8f7b022c8c Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'
* commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25':
  lavc: Replace av_dlog and tprintf with internal macros

Conflicts:
	libavcodec/aacdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/bitstream.c
	libavcodec/dcadec.c
	libavcodec/dnxhddec.c
	libavcodec/dvbsubdec.c
	libavcodec/dvdec.c
	libavcodec/dvdsubdec.c
	libavcodec/get_bits.h
	libavcodec/gifdec.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_refs.c
	libavcodec/imc.c
	libavcodec/interplayvideo.c
	libavcodec/jpeglsdec.c
	libavcodec/libopencore-amr.c
	libavcodec/mjpegdec.c
	libavcodec/mpeg12dec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_parser.c
	libavcodec/pngdec.c
	libavcodec/ratecontrol.c
	libavcodec/rv10.c
	libavcodec/svq1dec.c
	libavcodec/vqavideo.c
	libavcodec/wmadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:10:10 +02:00
Vittorio Giovara
6a85dfc830 lavc: Replace av_dlog and tprintf with internal macros 2015-04-19 12:41:59 +01:00
Michael Niedermayer
2730163329 Merge commit '34d4c605e9a5116d5289b35633ade5b01cacab24'
* commit '34d4c605e9a5116d5289b35633ade5b01cacab24':
  h264_loopfilter: constify all uses of H264Context

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 18:26:10 +01:00
Michael Niedermayer
d511dc6530 Merge commit 'bc98e8c0e0a8babfea35c98855e366b29cbe1191'
* commit 'bc98e8c0e0a8babfea35c98855e366b29cbe1191':
  h264: move mb_field_decoding_flag into the per-slice context

Conflicts:
	libavcodec/h264_slice.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 18:03:54 +01:00
Michael Niedermayer
668c65e7e7 Merge commit '0edbe6faa7ef80daf0e84353cbe733389bf1a522'
* commit '0edbe6faa7ef80daf0e84353cbe733389bf1a522':
  h264: move mb_xy into the per-slice context

Conflicts:
	libavcodec/h264.c
	libavcodec/h264_cabac.c
	libavcodec/svq3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 16:18:29 +01:00
Michael Niedermayer
7d23931632 Merge commit 'e6c90ce94f1b07f50cea2babf7471af455cca0ff'
* commit 'e6c90ce94f1b07f50cea2babf7471af455cca0ff':
  h264: move loopfilter parameters into the per-slice context

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 15:59:20 +01:00
Michael Niedermayer
4c5c913dd8 Merge commit 'e7226984ac13aacb84eae77a372df8ff7685848f'
* commit 'e7226984ac13aacb84eae77a372df8ff7685848f':
  h264: move [{top,left}_]cbp into the per-slice context

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 15:48:13 +01:00
Michael Niedermayer
cc2cfdc497 Merge commit '95eb35f30513e335990ad0d5dca6ddc318477291'
* commit '95eb35f30513e335990ad0d5dca6ddc318477291':
  h264: move the ref lists variables into the per-slice context

Conflicts:
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_direct.c
	libavcodec/h264_mb.c
	libavcodec/h264_picture.c
	libavcodec/h264_refs.c
	libavcodec/h264_slice.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 15:18:10 +01:00
Michael Niedermayer
f1436a7f96 Merge commit 'e6287f077c3e8e4aca11e61dd4bade1351439e6b'
* commit 'e6287f077c3e8e4aca11e61dd4bade1351439e6b':
  h264: move {mv,ref}_cache into the per-slice context

Conflicts:
	libavcodec/h264_cabac.c
	libavcodec/h264_mb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 14:06:30 +01:00
Michael Niedermayer
b7e0356cc3 Merge commit 'f69574cf7aca4fe4d57a2155e925f37fc863474d'
* commit 'f69574cf7aca4fe4d57a2155e925f37fc863474d':
  h264: move non_zero_count_cache into the per-slice context

Conflicts:
	libavcodec/h264.c
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 14:02:02 +01:00
Michael Niedermayer
61635c7a88 Merge commit '8b00f4df20f4a8ab0656fdaf7d00233a6515a052'
* commit '8b00f4df20f4a8ab0656fdaf7d00233a6515a052':
  h264: move some neighbour information into the per-slice context

Conflicts:
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 13:42:44 +01:00
Michael Niedermayer
c27f53b9fb Merge commit 'd231e84b06a9964c840cff4e228509f706165fb6'
* commit 'd231e84b06a9964c840cff4e228509f706165fb6':
  h264: move the quantizers into the per-slice context

Conflicts:
	libavcodec/dxva2_h264.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 13:24:23 +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
Christophe Gisquet
3814f92fd7 lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED
The later may yield incorrect code for on-stack variables.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 20:36:43 +01:00
Michael Niedermayer
1e4e760f76 Merge commit '213e606752d16f51337e94431962fb5d7749c07e'
* commit '213e606752d16f51337e94431962fb5d7749c07e':
  Replace av_unused attributes by block structures

Conflicts:
	libavcodec/h264_loopfilter.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-05 19:24:49 +02: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
Michael Niedermayer
ad9a6e19e1 Merge commit 'd24e9a99a40166bf881ccd2e3ae5688af4726658'
* commit 'd24e9a99a40166bf881ccd2e3ae5688af4726658':
  h264 does not depend on mpegvideo any more

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-17 13:46:23 +01:00
Michael Niedermayer
9517900bef Merge commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b'
* commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b':
  mpegvideo: move mpegvideo formats-related defines to mpegutils.h

Conflicts:
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_mvpred.h
	libavcodec/svq1enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-17 12:36:48 +01: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
Michael Niedermayer
de7b50e9cd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: Lower bound check for slice offsets

Conflicts:
	libavcodec/h264.c

See: 91253839e1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-21 00:20:55 +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
Michael Niedermayer
de8049d27c h264: add an argument to CHROMA for consistency
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21 13:17:19 +01:00
Michael Niedermayer
86d9d349cc Merge commit '23e85be58fc64b2e804e68b0034a08a6d257e523'
* commit '23e85be58fc64b2e804e68b0034a08a6d257e523':
  h264: add a parameter to the CHROMA444 macro.
  h264: add a parameter to the CHROMA422 macro.

Conflicts:
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21 13:06:14 +01:00
Michael Niedermayer
92656787cf Merge commit '6d2b6f21eb45ffbda1103c772060303648714832'
* commit '6d2b6f21eb45ffbda1103c772060303648714832':
  h264: add a parameter to the CABAC macro.
  h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.

Conflicts:
	libavcodec/h264.c
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21 12:58:00 +01:00
Michael Niedermayer
bf4d0f8328 Merge commit '7fa00653a550c0d24b3951c0f9fed6350ecf5ce4'
* commit '7fa00653a550c0d24b3951c0f9fed6350ecf5ce4':
  h264: add a parameter to the FIELD_PICTURE macro.
  h264: add a parameter to the FRAME_MBAFF macro.

Conflicts:
	libavcodec/h264.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_refs.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21 12:50:18 +01:00
Michael Niedermayer
e168b50816 Merge commit 'da6be8fcec16a94d8084bda8bb8a0a411a96bcf7'
* commit 'da6be8fcec16a94d8084bda8bb8a0a411a96bcf7':
  h264: add a parameter to the MB_FIELD macro.
  h264: add a parameter to the MB_MBAFF macro.

Conflicts:
	libavcodec/h264.c
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-21 12:43:32 +01: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