- Posts: 2
- Joined: Fri Oct 24, 2025 2:47 pm
- Real Name: Greg Booth
Hi Blackmagic team,
I've been working with APV MOV exports and noticed a few potential issues with the apvC atom generation in Resolve Studio 20.2.2 (Windows). I wanted to report these in case they're helpful for future updates.
Issue 1: Incorrect apvC atom size
The apvC atom appears to be written with a size of 33 bytes instead of the expected 34 bytes. This seems to truncate the full_range_flag field at the end of the color description data.
According to the APV specification, when color_description_present_flag is true, the minimum atom size should be:
FullBox Header:
4 bytes - Atom size field
4 bytes - 'apvC' fourcc
1 byte - version (= 0)
3 bytes - flags (= 0)
----
12 bytes subtotal
APVDecoderConfigurationRecord:
1 byte - configurationVersion (= 1)
1 byte - number_of_configuration_entry (= 1)
1 byte - pbu_type[0]
1 byte - number_of_frame_info[0] (= 1)
1 byte - flags byte (color_desc_present + capture_time_distance_ignored)
1 byte - profile_idc[0][0]
1 byte - level_idc[0][0]
1 byte - band_idc[0][0]
4 bytes - frame_width[0][0]
4 bytes - frame_height[0][0]
1 byte - chroma_format_idc + bit_depth_minus8
1 byte - capture_time_distance[0][0]
Color description (when flag is true):
1 byte - color_primaries[0][0]
1 byte - transfer_characteristics[0][0]
1 byte - matrix_coefficients[0][0]
1 byte - full_range_flag + reserved ← This appears to be missing
----
22 bytes subtotal
Total: 34 bytes
Issue 2: Width and height values off by one
The frame_width and frame_height fields appear to contain (actual_width - 1) and (actual_height - 1) rather than the actual dimensions. According to the spec, these should be the actual frame dimensions.
Issue 3: Level and band selection
Currently, Resolve APV exports always use Level 7.1 (level_idc = 213) and band_idc = 0, regardless of the actual video parameters. While using the almost highest level isn't harmful, these values should accurately reflect what was actually encoded for proper stream identification.
The APV SDK supports setting Level and Band to "Auto" mode, which allows the encoder to determine the appropriate values based on the actual content. When using Auto mode, the first encoded frame contains the actual Level and Band in its frame header, which can then be read and written to the apvC atom.
Please let me know if you need any additional details or if I've misunderstood anything in the specification. Happy to provide sample files if that would be helpful!
Cheers,
Greg
I've been working with APV MOV exports and noticed a few potential issues with the apvC atom generation in Resolve Studio 20.2.2 (Windows). I wanted to report these in case they're helpful for future updates.
Issue 1: Incorrect apvC atom size
The apvC atom appears to be written with a size of 33 bytes instead of the expected 34 bytes. This seems to truncate the full_range_flag field at the end of the color description data.
According to the APV specification, when color_description_present_flag is true, the minimum atom size should be:
FullBox Header:
4 bytes - Atom size field
4 bytes - 'apvC' fourcc
1 byte - version (= 0)
3 bytes - flags (= 0)
----
12 bytes subtotal
APVDecoderConfigurationRecord:
1 byte - configurationVersion (= 1)
1 byte - number_of_configuration_entry (= 1)
1 byte - pbu_type[0]
1 byte - number_of_frame_info[0] (= 1)
1 byte - flags byte (color_desc_present + capture_time_distance_ignored)
1 byte - profile_idc[0][0]
1 byte - level_idc[0][0]
1 byte - band_idc[0][0]
4 bytes - frame_width[0][0]
4 bytes - frame_height[0][0]
1 byte - chroma_format_idc + bit_depth_minus8
1 byte - capture_time_distance[0][0]
Color description (when flag is true):
1 byte - color_primaries[0][0]
1 byte - transfer_characteristics[0][0]
1 byte - matrix_coefficients[0][0]
1 byte - full_range_flag + reserved ← This appears to be missing
----
22 bytes subtotal
Total: 34 bytes
Issue 2: Width and height values off by one
The frame_width and frame_height fields appear to contain (actual_width - 1) and (actual_height - 1) rather than the actual dimensions. According to the spec, these should be the actual frame dimensions.
Issue 3: Level and band selection
Currently, Resolve APV exports always use Level 7.1 (level_idc = 213) and band_idc = 0, regardless of the actual video parameters. While using the almost highest level isn't harmful, these values should accurately reflect what was actually encoded for proper stream identification.
The APV SDK supports setting Level and Band to "Auto" mode, which allows the encoder to determine the appropriate values based on the actual content. When using Auto mode, the first encoded frame contains the actual Level and Band in its frame header, which can then be read and written to the apvC atom.
Please let me know if you need any additional details or if I've misunderstood anything in the specification. Happy to provide sample files if that would be helpful!
Cheers,
Greg