[FFmpeg-devel] [PATCH 2/6] avformat/s337m: Consider container bit resolution

Nicolas Gaullier nicolas.gaullier at cji.paris
Fri Feb 17 11:44:17 EET 2023


>> @@ -56,6 +56,12 @@ static int s337m_get_offset_and_codec(void *avc,
>>              avpriv_report_missing_feature(avc, "Data type %#x in 
>> SMPTE 337M", data_type & 0x1F);
>>          return AVERROR_PATCHWELCOME;
>>      }
>> +    if (container_word_bits &&
>> +        !(container_word_bits == 16 && word_bits == 16) &&
>> +        !(container_word_bits == 24 && word_bits == 20) &&
>
>I presume 20/24 is intentional. Does WAV not support signalling 20-bit?
>
>The rest looks OK enough
>
>/Tomas

You are true, I meant "container_word_bits" as "block_size" rather than "valid bits per sample" and
I think this should be clarified is the latter integration code in "wavdec: s337m support" patch where
I use par->bits_per_coded_sample...
But I should have rather coded "AV_CODEC_ID_PCM_S16LE ? 16 : 24"
This is in case a wav file would be detected as 20 bits in a 24 bits container (I don't think it is supported yet, but it could as bitspersample and validbitpersample are two different fields in WAVE_FORMAT_EXTENSIBLE).
Are you ok with this ?

Nicolas


More information about the ffmpeg-devel mailing list