On 7/21/19 11:23 PM, Paul B Mahol wrote: > On 7/22/19, David Bryant <da...@wavpack.com> wrote: >> Hi, >> >> As I promised late last year, here is a patch to add a WavPack DSD decoder. >> >> Thanks! >> >> -David Bryant >> >> > Please correct me if I'm wrong, but why this uses new codec id? > Apparently is also copies some logic from other files.
Yes, I created a new codec ID for WavPack DSD. It would be possible to just piggyback on the existing WavPack codec by silently decimating the DSD to PCM, but that seemed weird and wrong to me. For one thing, the user would have no idea that the file was actually DSD and not high sample-rate PCM. Also, since regular WavPack has threading enabled but WavPack DSD can't (because of the dsd2pcm conversion) I would have to turn off threading for all WavPack (unless there's some way of making that conditional at runtime). It would also mean that regular WavPack would be dependent on the dsd2pcm component even if DSD was not required (not everyone needs DSD). And of course I was looking closely at the only other DSD codec in FFmpeg (DST) which has its own codec ID. Because regular WavPack PCM and DSD share the same block format and metadata structure, there is a little code that is shared between the two codecs (although they are no longer identical because of the threading difference). Is this a problem? I could combine the two codecs into one file and sprinkle in a few conditionals, but I don't think it would be as clean or clear (but might save a little duplicate code). That's my thinking, but obviously I am not as familiar with the FFmpeg philosophy as you guys. -David > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".