summaryrefslogtreecommitdiff
path: root/libavcodec/h2645_parse.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@googlemail.com>2018-11-21 19:34:29 +0100
committerMark Thompson <sw@jkqxz.net>2018-11-22 23:19:17 +0000
commite895b800fe273d3445be52a4880ae0172c193bc0 (patch)
tree0b758eccaeaa2c20508a1c7e05ccd0db38dace97 /libavcodec/h2645_parse.h
parent97d1ee437bbf67d7e3897bc73df4f7d9771ac309 (diff)
cbs_h2645: Avoid memcpy when splitting fragment
Now memcpy is avoided for NAL units that don't contain 0x03 escape characters. Improves performance of cbs_h2645_fragment_add_nals from 36940 decicycles to 6364 decicycles based on 8 runs with a 5.1 Mb/s H.264 sample (262144 runs each). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
Diffstat (limited to 'libavcodec/h2645_parse.h')
-rw-r--r--libavcodec/h2645_parse.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/h2645_parse.h b/libavcodec/h2645_parse.h
index 2e29ad26cb..6dbba8fe4a 100644
--- a/libavcodec/h2645_parse.h
+++ b/libavcodec/h2645_parse.h
@@ -86,6 +86,12 @@ int ff_h2645_extract_rbsp(const uint8_t *src, int length, H2645RBSP *rbsp,
/**
* Split an input packet into NAL units.
+ *
+ * If data == raw_data holds true for a NAL unit of the returned pkt, then
+ * said NAL unit does not contain any emulation_prevention_three_byte and
+ * the data is contained in the input buffer pointed to by buf.
+ * Otherwise, the unescaped data is part of the rbsp_buffer described by the
+ * packet's H2645RBSP.
*/
int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
void *logctx, int is_nalff, int nal_length_size,