Timothy Gu
826c780c12
Revert "Revert "Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'""
...
This reverts commit e4af9be0f4
and redoes
796027f221
.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Timothy Gu
e4af9be0f4
Revert "Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'"
...
This reverts commit 796027f221
, reversing
changes made to bca30ed2b6
.
Preemptive revert before further testing has been done.
9 years ago
James Almer
613c86299f
avcodec/h264dec: move ff_h264_ps_uninit prototype to h264_ps.h
...
It's the proper place since 8c7932884d
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
Anton Khirnov
d1d7678040
h264: fix the check for mixed IDR/non-IDR slices
9 years ago
Anton Khirnov
b13fc1e344
h264: do not pass H264Context to h264_slice_header_parse()
...
This should make it more clear that this function does not need any
decoder-global state other than the parameter sets.
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
19446dc5ff
h264: drop unused NAL_FF_IGNORE
9 years ago
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.
9 years ago
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.
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
Clément Bœsch
34ec084b84
lavc/h264: move history parsing variable to H264ParseContext
...
This makes h264_find_frame_end() not depend on H264Context anymore.
9 years ago
Clément Bœsch
7dd8cd1933
lavc/h264_sei: fix broken style around green metadata code
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
Anton Khirnov
61f168ae34
h264: factor out setting the parameter sets for a frame
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
Anton Khirnov
3fba16ecd9
h264: factor starting a new field out of parsing the slice header
9 years ago
Anton Khirnov
bec993381c
h264: postpone generating the implicit MMCOs
...
Do it right before the MMCOs are applied to the DPB. This will allow
moving the frame_start() call out of the slice header parsing, since
generating the implicit MMCOs needs to be done after frame_start().
9 years ago
Anton Khirnov
2d410ebbaa
h264: decode the MMCOs into per-slice contexts
...
They are stored in the slice header, so technically they are per-slice
(though they must be the same in every slice). This will simplify the
following commits.
9 years ago
Anton Khirnov
39ab2ea531
h264: rename mmco_index to nb_mmco
...
The variable stores the number of mmco entries, so the current name is
misleading.
9 years ago
Anton Khirnov
7ab5d577a9
h264: move initializing the slice start out of h264_slice_header_parse()
9 years ago
Anton Khirnov
ed9a20ebe4
h264: split reading the ref list modifications and actually building the ref list
...
This will allow postponing the reference list construction (and by
consequence some other functions, like frame_start) until the whole
slice header has been parsed.
9 years ago
Anton Khirnov
7b50d60442
h264: call ff_h264_fill_mbaff_ref_list() when constructing the normal ref list
...
There is no real reason to call it separately.
9 years ago
Clément Bœsch
83163577e2
lavc/h264: remove unused ff_h264_init_dequant_tables prototype
...
Unused since 1534ef87
/ 3176217c
.
9 years ago
Anton Khirnov
2e4a7bd553
h264: drop unused H264Context.gb
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Anton Khirnov
2e5bde9565
h264: eliminate max_contexts
...
It is always equal to nb_slice_ctx.
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
56087ec0a2
h264: drop a pointless indirection
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
89ae244e78
h264_refs: remove an unused parameter from ff_h264_fill_mbaff_ref_list()
9 years ago
Anton Khirnov
755f79f84c
h264_refs: make the H264Context const where possible
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
8d0cc8ca97
h264_parser: switch to h2645_parse for NAL unescaping
...
Remove now unused ff_h264_decode_nal().
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
add1467e5e
svq3: drop the build dependency on the h264 decoder
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
e481458bc3
h264: factor out pred weight table parsing into a separate file
...
This will allow decoupling the parser from the decoder.
9 years ago