History

avcodec/dovi_rpudec: clarify semantics

ff_dovi_rpu_parse() and ff_dovi_rpu_generate() are a bit inconsistent in that they expect different levels of encapsulation, due to the nature of how this is handled in the context of different APIs. Clarify the status quo. (And fix an incorrect reference to the RPU payload bytes as 'RBSP')

Niklas Haas committed 2 years ago

Commit e42a0761 parent 6b66df72 files · +4 −3Browse files

Unified · Split

2 files
  1. libavcodec/dovi_rpu.h +3 −2
  2. libavcodec/dovi_rpudec.c +1 −1
libavcodec/dovi_rpu.h+3−2
@@ -95,8 +95,9 @@ void ff_dovi_ctx_unref(DOVIContext *s); · 94 unmodified lines
95void ff_dovi_ctx_flush(DOVIContext *s);95void ff_dovi_ctx_flush(DOVIContext *s);
96 96
97/**97/**
98 * Parse the contents of a Dovi RPU NAL and update the parsed values in the98 * Parse the contents of a Dolby Vision RPU and update the parsed values in the
99 * DOVIContext struct.99 * DOVIContext struct. This function should receive the decoded unit payload,
100 * without any T.35 or NAL unit headers.
100 *101 *
101 * Returns 0 or an error code.102 * Returns 0 or an error code.
102 *103 *
libavcodec/dovi_rpudec.c+1−1
@@ -360,7 +360,7 @@ int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size, · 359 unmodified lines
360 emdf_protection = get_bits(gb, 5 + 12);360 emdf_protection = get_bits(gb, 5 + 12);
361 VALIDATE(emdf_protection, 0x400, 0x400);361 VALIDATE(emdf_protection, 0x400, 0x400);
362 } else {362 } else {
363 /* NAL RBSP with prefix and trailing zeroes */363 /* NAL unit with prefix and trailing zeroes */
364 VALIDATE(rpu[0], 25, 25); /* NAL prefix */364 VALIDATE(rpu[0], 25, 25); /* NAL prefix */
365 rpu++;365 rpu++;
366 rpu_size--;366 rpu_size--;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t