Mark Thompson
da6db843b8
cbs_h2645: Allocate all internal buffers with padding
...
Any of these buffers (for both H.264 and H.265) might reasonably be
parsed using the bitstream reader, so include padding on all of them.
6 years ago
Mark Thompson
3143fe34f6
cbs_h264: Actually decompose end-of-sequence NAL units
...
64c50c0e97
declared support for decomposing
them but omitted to implement it; this adds an implementation.
Also do the same for end-of-stream NAL units, since they are equivalent.
6 years ago
Aman Gupta
64c50c0e97
avcodec/cbs_h264: silence errors about end_of_seq nalus
...
[ffmpeg] AVBSFContext: Decomposition unimplemented for unit 4 (type 10).
Signed-off-by: Aman Gupta <aman@tmm1.net>
6 years ago
Mark Thompson
ac687add84
cbs_h264: Add support for mastering display SEI messages
7 years ago
Mark Thompson
d94dda742c
cbs_h264: Add support for pan-scan rectangle SEI messages
7 years ago
Haihao Xiang
2943dd35b7
cbs_h265: read/write content light level information SEI message
...
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
7 years ago
Haihao Xiang
56ed011692
cbs_h265: read/write HEVC PREFIX SEI
...
Similar to H264, cbs_h265_{read, write}_nal_unit() can handle HEVC
prefix SEI NAL units. Currently mastering display colour volume SEI
message is added only, we may add more SEI message if needed later
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
7 years ago
James Almer
c6a63e1109
avcodec/cbs_h2645: use AVBufferRef to store list of active parameter sets
...
Removes unnecessary data copies, and partially fixes potential issues
with dangling references held in said lists.
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Mark Thompson
300ef25314
cbs: Add support for array subscripts in trace output
...
This makes the trace output for arrays significantly nicer.
7 years ago
Mark Thompson
315cc8c098
cbs_h2645: Simplify representation of fixed values
7 years ago
James Almer
0807a77160
avcodec/cbs_h2645: create a reference to the existing buffer when decomposing slice units
...
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
James Almer
df3a2ff767
avcodec/cbs: use a reference to the assembled CodedBitstreamFragment buffer when writing packets
...
This saves one malloc + memcpy per packet
The CodedBitstreamFragment buffer is padded to follow the requirements
of AVPacket.
Reviewed-by: jkqxz
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Mark Thompson
eccc03c8fb
cbs_h264: Add support for filler NAL units
7 years ago
Mark Thompson
7157d95926
cbs_h264: Move slice_group_id array out of PPS structure
...
It's very large, and is only used in some FMO streams.
7 years ago
Mark Thompson
a2ca8ed903
cbs_h264: Add utility functions to insert/delete SEI messages
7 years ago
Mark Thompson
ce5870a3a8
cbs: Refcount all the things!
...
This makes it easier for users of the CBS API to get alloc/free right -
all subelements use the buffer API so that it's clear how to free them.
It also allows eliding some redundant copies: the packet -> fragment copy
disappears after this change if the input packet is refcounted, and more
codec-specific cases are now possible (but not included in this patch).
7 years ago
Mark Thompson
0e4c166cdd
cbs_h2645: Remove active ps references when it is replaced
7 years ago
Mark Thompson
1d12a545ce
cbs: Add an explicit type for coded bitstream unit types
...
Also fix conversion specifiers used for the unit type.
7 years ago
Carl Eugen Hoyos
9b79c65ec0
lavu/lavc/lavf/lavfi: Do not use type modifier %zu on Windows MSVCRT.
7 years ago
Mark Thompson
7bf3f38046
cbs: Add padding to slice data allocations
...
These may be read by the bitstream reader, so they should include the
necessary padding for overreads.
7 years ago
Mark Thompson
22aed77687
cbs_h2645: Fix memory leak on when reading SEI fails
7 years ago
Mark Thompson
41272e112b
cbs_h264: Fix memory leak in error case
...
Fixes CID 1419834.
7 years ago
Mark Thompson
624d4739db
cbs_h264: Fix writing streams with auxiliary pictures
...
Tested with the alphaconformanceG sample.
Fixes CID 1419836.
(cherry picked from commit 9ed18f302b
)
7 years ago
Mark Thompson
9b0c7aa0e4
lavc: Add coded bitstream read/write support for H.265
...
(cherry picked from commit 867381b8b5
)
(cherry picked from commit f763489364
)
(cherry picked from commit 067a9ddeb8
)
7 years ago
Mark Thompson
b4c915f4b3
lavc: Add coded bitstream read/write support for H.264
...
(cherry picked from commit acf06f4544
)
(cherry picked from commit 768eb9182e
)
(cherry picked from commit e7f64191b2
)
7 years ago
Mark Thompson
9ed18f302b
cbs_h264: Fix writing streams with auxiliary pictures
...
Tested with the alphaconformanceG sample.
7 years ago
Mark Thompson
e7f64191b2
cbs: Add buffer padding when splitting fragments
...
Remove any trailing zeroes from H.26[45] NAL units at the same time.
7 years ago
Mark Thompson
44cde38c8a
cbs: Always check for bitstream end before reading
7 years ago
Mark Thompson
768eb9182e
cbs_h2645: Return error if writing fails
7 years ago
Mark Thompson
867381b8b5
lavc: Add coded bitstream read/write support for H.265
7 years ago
Mark Thompson
acf06f4544
lavc: Add coded bitstream read/write support for H.264
7 years ago