Commit graph

77 commits

Author SHA1 Message Date
Gwenole Beauchesne
2e8949d77b h264: add flag to compile with strict DPB ordering mode.
Allow build with strict DPB ordering mode whereby evicted entries
are replaced by the next entries, in order instead of optimizing
it away with the last entry in the DPB.

This is only useful for debugging purpose, against a reference SW
decoder for example.
2012-10-16 16:52:04 +02:00
Gwenole Beauchesne
26b7c46eda h264: drop extra code covered by built-in codecparsers.
GstH264SliceHdr.n_emulation_prevention_bytes is bound to exist now that
a newer version of codecparsers/ are used if the system provided one is
now recent enough to have those required extensions.
2012-10-16 16:46:17 +02:00
Simon Farnsworth
fa87396905 h264: use pixel-aspect-ratio from SPS header.
Propagate pixel-aspect-ratio determined by the GStreamer codecparser
from the sequence headers.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-10-10 11:29:00 +02:00
Gwenole Beauchesne
3f430b32a4 h264: add decode_nalu() helper function.
Split decode_buffer() into the core infrastructure that determines
the NAL units contained in the adapter and the actual function that
decodes the NAL unit.
2012-10-10 10:35:20 +02:00
Gwenole Beauchesne
6f2e885f11 h264: fix end-of-stream conditions (flush).
Decode pending data in the adapter prior to processing the actual
code for end-of-stream.
2012-10-10 10:31:39 +02:00
Gwenole Beauchesne
1c5c5ea9b8 h264: review and report errors accordingly.
Use GST_ERROR() to report real errors instead of hiding them into
GST_DEBUG().
2012-09-21 16:43:38 +02:00
Gwenole Beauchesne
dde9232e10 h264: exclusively use GstAdapter, drop sub-buffer hack.
Maintaining the sub-buffer is rather suboptimal especially since we
were also maintaining a GstAdapter. Now, we only use the GstAdapter
thus requiring minor extra parsing when receiving avcC buffers.
2012-09-20 18:04:19 +02:00
Gwenole Beauchesne
a10b3d3032 decoder: cope with new GstVaapiContextInfo based API.
Update decoders to report the maximum number of reference frames to use.
2012-09-10 18:27:40 +02:00
Gwenole Beauchesne
61cc02f54b libs: fix build in strict ISO C mode. 2012-09-07 16:23:42 +02:00
Gwenole Beauchesne
7277f0e220 h264: skip all Filler Data NALs. 2012-03-23 17:11:18 +01:00
Gwenole Beauchesne
63e29adbf5 h264: fix slice_data_bit_offset calculation.
Unlike what VA-API documentation defines, the slice_data_bit_offset
represents the offset to the first macroblock in the slice data, minus
any emulation prevention bytes in the slice_header().

This fix copes with binary-only VA drivers that won't be fixed any
time soon. Besides, this aligns with the current FFmpeg behaviour
that was based on those proprietary drivers implementing the API
incorrectly.
2012-03-02 13:41:16 +01:00
Wind Yuan
c979d51da6 h264: skip all Access Unit (AU) NALs.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-03-01 10:35:58 +01:00
Wind Yuan
6b56c84c9b h264: fix modification process of reference picture lists.
Construction of RefPicList0/1 could be off by one element.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-03-01 10:35:58 +01:00
Gwenole Beauchesne
82dbd6f5be h264: complete any current picture decoder before SPS / PPS change.
This ensures the VA context is clear when the encoded resolution
changes. i.e. make sure older picture is decoded with the older
VA context before it changes.
2012-02-08 18:08:49 +01:00
Gwenole Beauchesne
6c5054e840 h264: create VA context earlier when SPS is parsed. 2012-02-08 18:07:14 +01:00
Gwenole Beauchesne
26c105a6ca h264: don't allocate too big data structures on stack. 2012-02-08 17:57:29 +01:00
Gwenole Beauchesne
0fb1147d9c Add header for system-dependent definitions. 2012-01-30 19:52:10 +01:00
Gwenole Beauchesne
5cd0242bbb h264: simplify RefPicList reconstruction. 2012-01-29 15:27:59 +01:00
Gwenole Beauchesne
d656b958a3 h264: flush DPB when the end of the sequence is reached. 2012-01-29 15:27:59 +01:00
Gwenole Beauchesne
e52ca4a2c8 h264: handle Decoded Picture Buffer (DPB). 2012-01-29 15:27:59 +01:00
Gwenole Beauchesne
425060a7a8 h264: fix pred_weight_table() reconstruction.
Only the explicit pred_weight_table(), possibly with the inferred default
values, shall be required. e.g. don't fill in the table if weighted_pred_flag
is not set for P/SP slices.
2012-01-29 15:27:59 +01:00
Gwenole Beauchesne
8c37221fa5 h264: execute reference picture marking process (MMCO). 2012-01-29 15:27:59 +01:00
Gwenole Beauchesne
61753fd55a h264: fix presentation timestamps. 2012-01-29 15:27:59 +01:00
Gwenole Beauchesne
16ccf82363 h264: execute reference picture marking process (sliding window). 2012-01-29 15:27:59 +01:00
Gwenole Beauchesne
5a795b439c h264: handle avcC format for decoding buffers. 2012-01-29 15:27:59 +01:00
Sreerenj Balachandran
6d61965531 h264: handle codec-data.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2012-01-29 15:27:59 +01:00
Gwenole Beauchesne
c071f80f40 Add initial H.264 decoder. 2012-01-29 15:27:59 +01:00