mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-01-12 00:06:51 +08:00
avcodec/dovi_rpu(enc|dec) - fix parsing and writing of L11 DoVi metadata
sharpness, noise_reduction, mpeg_noise_reduction, frame_rate_conversion, brightness and color are not actual fields in L11 metadata, this appears to be based on perhaps an out of date patent specification. Instead the two bytes are considered reserved. Drop reading them and write out 0s, the fields will be deprecated from the struct in a future commit and scheduled for removal.
This commit is contained in:
committed by
Niklas Haas
parent
ec42a0aec0
commit
56bc8fd0a1
@@ -261,12 +261,8 @@ static int parse_ext_v2(DOVIContext *s, GetBitContext *gb, AVDOVIDmData *dm,
|
||||
dm->l11.whitepoint = get_bits(gb, 4);
|
||||
dm->l11.reference_mode_flag = get_bits1(gb);
|
||||
skip_bits(gb, 3); /* reserved */
|
||||
dm->l11.sharpness = get_bits(gb, 2);
|
||||
dm->l11.noise_reduction = get_bits(gb, 2);
|
||||
dm->l11.mpeg_noise_reduction = get_bits(gb, 2);
|
||||
dm->l11.frame_rate_conversion = get_bits(gb, 2);
|
||||
dm->l11.brightness = get_bits(gb, 2);
|
||||
dm->l11.color = get_bits(gb, 2);
|
||||
skip_bits(gb, 8); /* reserved */
|
||||
skip_bits(gb, 8); /* reserved */
|
||||
break;
|
||||
case 254:
|
||||
dm->l254.dm_mode = get_bits(gb, 8);
|
||||
|
||||
@@ -546,12 +546,8 @@ static void generate_ext_v2(PutBitContext *pb, const AVDOVIDmData *dm)
|
||||
put_bits(pb, 4, dm->l11.whitepoint);
|
||||
put_bits(pb, 1, dm->l11.reference_mode_flag);
|
||||
put_bits(pb, 3, 0); /* reserved */
|
||||
put_bits(pb, 2, dm->l11.sharpness);
|
||||
put_bits(pb, 2, dm->l11.noise_reduction);
|
||||
put_bits(pb, 2, dm->l11.mpeg_noise_reduction);
|
||||
put_bits(pb, 2, dm->l11.frame_rate_conversion);
|
||||
put_bits(pb, 2, dm->l11.brightness);
|
||||
put_bits(pb, 2, dm->l11.color);
|
||||
put_bits(pb, 8, 0); /* reserved */
|
||||
put_bits(pb, 8, 0); /* reserved */
|
||||
break;
|
||||
case 254:
|
||||
put_bits(pb, 8, dm->l254.dm_mode);
|
||||
|
||||
Reference in New Issue
Block a user