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 >
2018-03-05 11:44:51 -03:00
Mark Thompson
fbeac5356c
Merge commit 'eccc03c8fbc603a0a3257df66f0705f74fe2581a'
...
* commit 'eccc03c8fbc603a0a3257df66f0705f74fe2581a':
cbs_h264: Add support for filler NAL units
Some bitstream -> get_bits.
Merged-by: Mark Thompson <sw@jkqxz.net >
2018-02-21 22:51:46 +00:00
Mark Thompson
ab6edb173b
Merge commit '7157d959264f3729da463725c6faa580d9394d19'
...
* commit '7157d959264f3729da463725c6faa580d9394d19':
cbs_h264: Move slice_group_id array out of PPS structure
Merged-by: Mark Thompson <sw@jkqxz.net >
2018-02-21 22:41:00 +00:00
Mark Thompson
77eba7bd99
Merge commit 'a2ca8ed903b435446031a8a0792ca535e6ee2913'
...
* commit 'a2ca8ed903b435446031a8a0792ca535e6ee2913':
cbs_h264: Add utility functions to insert/delete SEI messages
Merged-by: Mark Thompson <sw@jkqxz.net >
2018-02-21 22:27:07 +00:00
Mark Thompson
0cc8e34a94
Merge commit 'ce5870a3a8f2b10668ee4f04c2ae0287f66f31b2'
...
* commit 'ce5870a3a8f2b10668ee4f04c2ae0287f66f31b2':
cbs: Refcount all the things!
Some changes for bitstream API.
Merged-by: Mark Thompson <sw@jkqxz.net >
2018-02-21 22:22:54 +00:00
Mark Thompson
af3727e239
Merge commit '0e4c166cdd6446522a085dd9731967d09ac71f72'
...
* commit '0e4c166cdd6446522a085dd9731967d09ac71f72':
cbs_h2645: Remove active ps references when it is replaced
Merged-by: Mark Thompson <sw@jkqxz.net >
2018-02-21 22:03:15 +00:00
Mark Thompson
eccc03c8fb
cbs_h264: Add support for filler NAL units
2018-02-20 22:04:12 +00:00
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.
2018-02-20 22:04:12 +00:00
Mark Thompson
a2ca8ed903
cbs_h264: Add utility functions to insert/delete SEI messages
2018-02-20 22:04:12 +00:00
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).
2018-02-20 22:04:12 +00:00
Mark Thompson
0e4c166cdd
cbs_h2645: Remove active ps references when it is replaced
2018-02-20 22:04:12 +00:00
Mark Thompson
1d12a545ce
cbs: Add an explicit type for coded bitstream unit types
...
Also fix conversion specifiers used for the unit type.
2018-02-20 22:04:12 +00:00
Carl Eugen Hoyos
9b79c65ec0
lavu/lavc/lavf/lavfi: Do not use type modifier %zu on Windows MSVCRT.
2017-12-17 18:05:42 +01:00
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.
2017-12-02 15:21:30 +00:00
Mark Thompson
22aed77687
cbs_h2645: Fix memory leak on when reading SEI fails
2017-11-12 16:00:41 +00:00
Mark Thompson
41272e112b
cbs_h264: Fix memory leak in error case
...
Fixes CID 1419834.
2017-10-18 20:05:11 +01:00
Mark Thompson
624d4739db
cbs_h264: Fix writing streams with auxiliary pictures
...
Tested with the alphaconformanceG sample.
Fixes CID 1419836.
(cherry picked from commit 9ed18f302b )
2017-10-18 20:05:11 +01:00
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 )
2017-10-17 20:56:29 +01:00
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 )
2017-10-17 20:56:29 +01:00
Mark Thompson
9ed18f302b
cbs_h264: Fix writing streams with auxiliary pictures
...
Tested with the alphaconformanceG sample.
2017-09-25 20:42:42 +01:00
Mark Thompson
e7f64191b2
cbs: Add buffer padding when splitting fragments
...
Remove any trailing zeroes from H.26[45] NAL units at the same time.
2017-09-12 22:11:47 +01:00
Mark Thompson
44cde38c8a
cbs: Always check for bitstream end before reading
2017-09-12 22:11:41 +01:00
Mark Thompson
768eb9182e
cbs_h2645: Return error if writing fails
2017-08-20 13:59:17 +01:00
Mark Thompson
867381b8b5
lavc: Add coded bitstream read/write support for H.265
2017-08-12 22:17:20 +01:00
Mark Thompson
acf06f4544
lavc: Add coded bitstream read/write support for H.264
2017-08-12 22:17:20 +01:00