Anton Khirnov
606fb6c032
h264: call the hwaccel frame_start() from h264_field_start()
...
This is a more appropriate place for it.
9 years ago
Anton Khirnov
d1d7678040
h264: fix the check for mixed IDR/non-IDR slices
9 years ago
Anton Khirnov
bc7f426851
h264: drop tests whether the codec id is AV_CODEC_ID_H264
...
Those are unused remnants of the old SVQ3 code.
9 years ago
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.
9 years ago
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
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.
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
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.
9 years ago
Anton Khirnov
19446dc5ff
h264: drop unused NAL_FF_IGNORE
9 years ago
Anton Khirnov
b25cd7540e
h264: pass a H2645NAL to slice header decoding
...
Replace the decoder-global nal_unit_type/nal_ref_idc variables with the
per-NAL ones. The decoder-global ones still cannot be removed because
they are used by hwaccels.
9 years ago
Matthieu Bouron
0ea58059d6
lavc/h264_ps: add ff_h264_ps_uninit and use it
9 years ago
Vittorio Giovara
187d719760
h264: Support AV_PKT_DATA_NEW_EXTRADATA
9 years ago
Clément Bœsch
5342bb624d
lavc/h264: rename GreenMetaData to H264SEIGreenMetaData
...
Reduces diff for the next merge with Libav.
9 years ago
Clément Bœsch
fef89aae98
lavc/h264: move green meta logging out of the sei decoding
...
This will simplify the next Libav merge where SEI decoding doesn't have
access to the debug level anymore.
9 years ago
Michael Niedermayer
f883f0b0bd
avcodec/h264: Put context_count check back
...
Fixes assertion failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
27c1eae55f
avcodec/h264: Fix off by 1 context count
...
Fixes fate-h264-xavc-4389 with slice threads
9 years ago
Michael Niedermayer
641dccc2aa
avcodec/h264: Check init_get_bits8() for failure
...
Fixes CID1361935
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Hendrik Leppkes
d6f92103e0
h264: do not return an error when NAL parsing of extradata failed
...
Fixes AnnexB samples with broken extradata, but proper in-band parameter sets
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
9 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Michael Niedermayer
1ef267b83f
avcodec/h264: Put the removed SPS handling code back
...
reverts one hunk from 7966ddfc0b
The new code from 7966ddfc0b
only covers extradata based SPS
Fixes: ffplay -ss 13 58af5798-fa2c-42a2-997d-dc8e49de2d8a.flv
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Diego Biurrun
0f40c90984
Drop pointless assert.h #includes
9 years ago
Michael Niedermayer
566d64d4fb
avcodec/h264: Only recover from reference pictures
...
Fixes spec compliance
Fixes Ticket5346
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Anton Khirnov
2e5bde9565
h264: eliminate max_contexts
...
It is always equal to nb_slice_ctx.
9 years ago
Anton Khirnov
e3c9041cfe
h264: allocate some tables per slice contexts, not threads
...
This is more correct and avoids wasting space when frame threading is
used.
9 years ago
Anton Khirnov
e065279529
h264: remove an artificial restriction on the number of slice threads
...
This limit is now unnecessary, we can easily support an arbitrary number
of threads.
9 years ago
Anton Khirnov
b77fffa127
h264: make slice threading work with deblocking_filter=1
...
In such a case, decode the MBs in parallel without the loop filter, then
execute the filter serially.
The ref2frm array was previously moved to H264SliceContext. That was
incorrect, since it applies to all the slices and should properly be in
H264Context (it did not actually break decoding, since this distinction
only becomes relevant with slice threading and deblocking_filter=1,
which was not implemented before this commit). The ref2frm array is thus
moved back to H264Context.
9 years ago
Anton Khirnov
370ddc7b38
h264: remove H264Context.pict_type
...
It is not used for anything internally, just exported in the output
frames. So remove the indirection and set it directly in frame_start().
9 years ago
Anton Khirnov
0e7772c5e4
h264: remove unused H264SliceContext.rbsp_buffer
9 years ago
Anton Khirnov
7f045c4429
h264: merge ff_h264_free_context() into h264_decode_end()
...
It is no longer called from outside the h264 decoder.
9 years ago
Anton Khirnov
99c554efc8
h264: eliminate low_delay
...
It is always unconditionally initialized in decode_postinit() and then
immediately used in one place further below. All the other places where
it is accessed are just useless fluff.
9 years ago
Anton Khirnov
5b35b290dd
h264: remove a stale comment
...
This comment used to apply to code that was removed.
9 years ago
Anton Khirnov
72da8d9bb2
h264_parser: remove the remaining dependencies on the h264 decoder
9 years ago
Anton Khirnov
98c97994c5
h264: decouple extradata parsing from the decoder
...
This will allow decoupling the parser from the decoder.
9 years ago
Anton Khirnov
728d90a0c1
h264: decouple h264_sei from the h264 decoder
...
Make the SEI parsing independent of the H264Context, to allow
decoupling the parser from the decoder.
9 years ago
Anton Khirnov
c8dcff0cdb
h264: factor out calculating the POC count into a separate file
...
This will allow decoupling the parser from the decoder.
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
Anton Khirnov
a6e27f7add
h264: factor out parsing the reference count into a separate file
...
This will allow decoupling the parser from the decoder.
9 years ago
Anton Khirnov
56b17a33f2
h264: stop testing whether the reference count changes in ff_set_ref_count()
...
It is no longer necessary after 741b494fa8
9 years ago
Anton Khirnov
e9f884416c
h264: move reading direct_spatial_mv_pred out of ff_set_ref_count()
...
It has nothing to do with the reference count and so does not belong in
this function.
9 years ago
Anton Khirnov
8d0cc8ca97
h264_parser: switch to h2645_parse for NAL unescaping
...
Remove now unused ff_h264_decode_nal().
9 years ago
Ivan
3a727606c4
avcodec/h264: Fix for H.264 configuration parsing
...
Sometimes video fails to decode if H.264 configuration changes mid stream.
The reason is that configuration parser assumes that nal_ref_idc is equal to 11b
while actually some codecs but 01b there. The H.264 spec is somewhat
vague about this but it looks like it allows any non-zero nal_ref_idc for sps/pps.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Diego Biurrun
061dc20351
h264: Add missing ff_ prefix to internally visible h264_init_dequant_tables()
9 years ago
Anton Khirnov
ca2f19b9cc
h264: switch to h2645_parse for NAL parsing
9 years ago
Anton Khirnov
a7829a2a3f
h264: reimplement 3aa661ec5
in a more explicit way
...
Instead of handling the problem inside NAL decoding code, add a higher
level wrapper function. This should be more robust against future
changes (and easier to read).
9 years ago
Anton Khirnov
ecc31f6b08
h264: move ff_h264_check_intra[4x4]_pred_mode() to h264_parse
...
It is shared with svq3.
9 years ago
Anton Khirnov
9b30f8dd8f
h264: remove the svq3-specific code
9 years ago
Anton Khirnov
e481458bc3
h264: factor out pred weight table parsing into a separate file
...
This will allow decoupling the parser from the decoder.
9 years ago
Michael Niedermayer
98a0053d0f
avcodec/h264: Execute error concealment before marking the frame as done.
...
Fixes race condition causing artifacts
Fixes Ticket4122
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
588e2e3387
avcodec/h264: Fix memleak of a53_caption
...
Fixes Ticket5111
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
e0b187e7da
avcodec/h264: Fix memleak in case of ff_h264_decode_extradata() failure
...
Fixes Ticket5139
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago