1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00
Commit Graph

352 Commits

Author SHA1 Message Date
James Almer
01f0598b18 Merge commit '996f13413b0415097e2a184d161462ffb3ceb647'
* commit '996f13413b0415097e2a184d161462ffb3ceb647':
  h264: fix warnings in fill_filter_caches_inter()

Conflicts:
libavcodec/h264_slice.c

See ef8f6464a5

Merged-by: James Almer <jamrial@gmail.com>
2016-08-01 19:11:08 -03:00
James Almer
517dd04f6d Merge commit 'bc7f4268514624e1286ea76d27a89a56b4ee18e1'
* commit 'bc7f4268514624e1286ea76d27a89a56b4ee18e1':
  h264: drop tests whether the codec id is AV_CODEC_ID_H264

Conflicts:
libavcodec/h264dec.c

Merged-by: James Almer <jamrial@gmail.com>
2016-08-01 18:15:07 -03:00
James Almer
f41048f6ec Merge commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c'
* commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c':
  h264: add H264_ prefix to the NAL unit types

Conflicts:
libavcodec/h264_parse.c
libavcodec/h264_parser.c
libavcodec/h264_slice.c
libavcodec/h264dec.c

Merged-by: James Almer <jamrial@gmail.com>
2016-08-01 15:11:05 -03:00
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
ecf65c30cf Merge commit '251cbb44003caf179fb17afbb8a6c56643c2a646'
* commit '251cbb44003caf179fb17afbb8a6c56643c2a646':
  h264: create a new header for common h264 definitions

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-29 11:13:44 +02: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
7dda97fb86 Merge commit 'f651c6a259d4bc78f25db11d25df9256d5110bd3'
* commit 'f651c6a259d4bc78f25db11d25df9256d5110bd3':
  h264: factor out setting frame properties / side data

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-29 10:39:57 +02:00
Clément Bœsch
13872d2aa1 Merge commit 'bcd91f1644b46dd142c5355c8b742b27d9028903'
* commit 'bcd91f1644b46dd142c5355c8b742b27d9028903':
  h264: move a per-field block from decode_slice_header() to field_start()

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-29 10:24:06 +02:00
Michael Niedermayer
8385e1718e avcodec/h264_slice: Make setup_finished check cover more cases 2016-07-27 19:29:55 +02:00
Clément Bœsch
6c41eda18e Merge commit 'debca90863e4ee53447efd02483c500f89766384'
* commit 'debca90863e4ee53447efd02483c500f89766384':
  h264: store {curr,max}_pic_num in the per-slice context

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-27 18:07:30 +02:00
Clément Bœsch
87d1f82059 Merge commit 'f966498e433fead2f5e6b5b66fad2ac062146d22'
* commit 'f966498e433fead2f5e6b5b66fad2ac062146d22':
  h264: decode the poc values from the slice header into the per-slice context

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-27 17:31:18 +02:00
Clément Bœsch
f8ce1e8282 lavc/h264_slice: adjust a few line breaks to reduce diff with Libav 2016-07-27 17:24:48 +02:00
Clément Bœsch
78c7197ea0 Merge commit '54dd9b1cdd9e54f1ee39ae25af0324f8aba2831b'
* commit '54dd9b1cdd9e54f1ee39ae25af0324f8aba2831b':
  h264: set mb_aff_frame in frame_start()
  h264: move the block starting a new field out of slice_header_parse()

Both commits are merged at the same time in order to prevent a
regression with Ticket  (see 38660128).

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-27 17:00:14 +02:00
Michael Niedermayer
9bf3fdcd3c avcodec/h264_slice: Move h264_init_ps() call into h264_field_start()
This was missing from f512e4a390

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-20 00:07:18 +02:00
Clément Bœsch
2c138b2c9b Merge commit 'b25cd7540e7cba9868edc13817c0ce1ddef90ffc'
* commit 'b25cd7540e7cba9868edc13817c0ce1ddef90ffc':
  h264: pass a H2645NAL to slice header decoding

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-14 19:41:37 +02:00
Clément Bœsch
f512e4a390 Merge commit '61f168ae348f94f39e7afc6971654455a5de0e4d'
* commit '61f168ae348f94f39e7afc6971654455a5de0e4d':
  h264: factor out setting the parameter sets for a frame

Michael's changes on top of the merge undo parts of the original diff
that are not factorization:

"The call point is left where it was before. Such a change should be in
a separate commit and has multiple issues, one being null pointer
dereferences the other is that some safety checks would become
conditional.

I tried to split the PPS init between the new and old functions
similarly to the SPS code."

Merged-by: Clément Bœsch <u@pkh.me>
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-09 13:57:43 +02:00
Clément Bœsch
64c619369b lavc/h264_slice: use sps directly when checking for invalid 8x8 inference 2016-07-03 15:11:40 +02:00
James Almer
77eb05a2f1 avcodec/h264_slice: Only call ff_h264_flush_change() on initialized contexts
Changed by committer to ensure context_initialized is reset
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-01 21:39:09 +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
2021326f99 Merge commit 'd1f539c97e04e7cebecaf6916c5064f243d39fcf'
* commit 'd1f539c97e04e7cebecaf6916c5064f243d39fcf':
  h264: merge the two reinit blocks in slice_header_parse()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-07-01 14:19:09 +02:00
Clément Bœsch
99b37f53a1 Merge commit '3fba16ecd978d5bed338b8da643c3435e62b3437'
* commit '3fba16ecd978d5bed338b8da643c3435e62b3437':
  h264: factor starting a new field out of parsing the slice header

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-07-01 14:02:00 +02:00
Clément Bœsch
f48aea66dd Merge commit 'bec993381cfec72051b0d9f12ac9d9bb9c750983'
* commit 'bec993381cfec72051b0d9f12ac9d9bb9c750983':
  h264: postpone generating the implicit MMCOs

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-30 10:24:03 +02:00
Clément Bœsch
d407e76c42 Merge commit '2d410ebbaa1e760d6837cb434a6d1d4c3c6f0d85'
* commit '2d410ebbaa1e760d6837cb434a6d1d4c3c6f0d85':
  h264: decode the MMCOs into per-slice contexts

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-30 10:15:51 +02:00
Benoit Fouet
879330c561 h264: make H264ParamSets sps const 2016-06-30 09:24:39 +02:00
Benoit Fouet
4cc1ce4a91 h264: straighten dimensions check ff_h264_decode_seq_parameter_set
The MBS only flag was not taken into account when checking macroblock dimensions.
Also removes the unneeded check in init_dimensions for slices.
2016-06-30 09:24:39 +02:00
Clément Bœsch
57d30fde9e Merge commit '39ab2ea53121b9976a619cd545fbd3464b908696'
* commit '39ab2ea53121b9976a619cd545fbd3464b908696':
  h264: rename mmco_index to nb_mmco

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-29 20:07:52 +02:00
Clément Bœsch
c28aecc56a Merge commit '7ab5d577a9affe3397c08b032f983f9bf7101865'
* commit '7ab5d577a9affe3397c08b032f983f9bf7101865':
  h264: move initializing the slice start out of h264_slice_header_parse()

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-29 20:04:23 +02:00
Clément Bœsch
4890b0851c Merge commit '4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960'
* commit '4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960':
  h264: move calculating the POC out of h264_slice_header_parse()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 17:59:57 +02:00
Clément Bœsch
9ab6f01839 Merge commit '6dd996c7c81575a1e4969987ab175a6df7beab3d'
* commit '6dd996c7c81575a1e4969987ab175a6df7beab3d':
  h264: move building the reference list out of h264_slice_header_parse()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 17:42:06 +02:00
Clément Bœsch
3b95452ca8 Merge commit '0bad254300356005af4aef00a706bf2e8eee96bc'
* commit '0bad254300356005af4aef00a706bf2e8eee96bc':
  h264: move initing the implicit pred weight table out of h264_slice_header_parse()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 17:39:33 +02:00
Clément Bœsch
2aff557c6a Merge commit 'ed9a20ebe4a89de119ea97bdccf688ece8c6648c' into merge-libav-new
* commit 'ed9a20ebe4a89de119ea97bdccf688ece8c6648c':
  h264: split reading the ref list modifications and actually building the ref list

ref_modifications.val are read as u32 instead of u8 in FFmpeg.

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 17:32:05 +02:00
Clément Bœsch
a2901472fe lavc/h264_slice: properly forward positive "error" code
Fixes ./ffmpeg -skip_frame nokey -i h264/h264_intra_first-small.ts

Regression since c54e2740e1
2016-06-29 16:16:26 +02:00
Clément Bœsch
cdecb39fca Merge commit 'fa57059079190242517701120cfdccad93c866da'
* commit 'fa57059079190242517701120cfdccad93c866da':
  h264: move initialising the implicit pred weight table for MBAFF

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 15:29:38 +02:00
Clément Bœsch
527a579327 Merge commit '7b50d60442af8d9527e9da46818011fe15a5265a'
* commit '7b50d60442af8d9527e9da46818011fe15a5265a':
  h264: call ff_h264_fill_mbaff_ref_list() when constructing the normal ref list

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 15:17:16 +02:00
Clément Bœsch
3c5a3882f9 Merge commit '77a1e2c5f8f8250dfacff24b993eb473260ed13e'
* commit '77a1e2c5f8f8250dfacff24b993eb473260ed13e':
  h264: move direct mode inits out of h264_slice_header_parse()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 14:58:31 +02:00
Clément Bœsch
c54e2740e1 Merge commit 'd06e4d8aab9c679b6aea2591d2a9b382df9e5f74'
* commit 'd06e4d8aab9c679b6aea2591d2a9b382df9e5f74':
  h264: start splitting decode_slice_header()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 14:55:02 +02:00
Michael Niedermayer
0c50f6905f avcodec/h264: Remove au_pps_id
This should not be needed anymore and simplifies the next merge

Requested-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-29 14:49:15 +02:00
Michael Niedermayer
e6e8750e94 avcodec/h264: Remove current_sps_id
This should not be needed anymore and simplifies the next merge

Requested-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-29 14:49:15 +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
996f13413b h264: fix warnings in fill_filter_caches_inter()
The code does some weird casting to a 2-dimensional sub-array of
ref2frm. This is not necessary, since only one dimension is needed
there.
2016-06-21 11:18:15 +02:00
Anton Khirnov
bc7f426851 h264: drop tests whether the codec id is AV_CODEC_ID_H264
Those are unused remnants of the old SVQ3 code.
2016-06-21 11:17:59 +02:00
Anton Khirnov
5c2fb561d9 h264: add H264_ prefix to the NAL unit types
This will prevent conflicts e.g. in code that deals with both h264 and
hevc.
2016-06-21 11:17:28 +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
251cbb4400 h264: create a new header for common h264 definitions
Move the NAL unit types into it. This will allow to stop including the
whole decoder-specific h264dec.h in some code that is unrelated to the
decoder and only needs some enum values.
2016-06-21 11:12:41 +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
f651c6a259 h264: factor out setting frame properties / side data
Right now this code is mixed with selecting the next output frame. Move
it to a separate function called from h264_field_start(), which is a
more appropriate place for this.
2016-06-21 11:10:58 +02:00
Anton Khirnov
bcd91f1644 h264: move a per-field block from decode_slice_header() to field_start()
This is a more appropriate place for it.
2016-06-21 11:10:29 +02:00
Anton Khirnov
17e7c03e12 h264: only allow ending a field/starting a new one before finish_setup()
Doing this after ff_thread_finish_setup() is called is invalid and can
conflict with reads from the other thread.
2016-06-21 11:10:00 +02:00
Anton Khirnov
debca90863 h264: store {curr,max}_pic_num in the per-slice context
While the value of those variables will be constant for the whole frame,
they are only used in two functions called from slice header decoding.
Moving them to the per-slice context allows us to make the H264Context
passed to slice_header_parse() constant.
2016-06-21 11:09:21 +02:00
Anton Khirnov
f966498e43 h264: decode the poc values from the slice header into the per-slice context
Copy them into the decoder-global context in field_start(). This avoids
modifying the decoder-global context during bitstream parsing.
2016-06-21 11:08:56 +02:00