[FFmpeg-devel] [PATCH v4] avutil/csp: create avpriv API for colorspace structs

Ronald S. Bultje rsbultje at gmail.com
Fri May 20 14:26:56 EEST 2022


Hi Michael,

On Fri, May 20, 2022 at 6:28 AM Michael Niedermayer <michael at niedermayer.cc>
wrote:

> 1. exactly representing values
>

This isn't actually what I meant when I made the argument. If the spec says
"0.137", I'd expect to be able to git grep the source code for "0.137" and
find where it's defined. This is lost with AVRational, where it becomes {
137, 1000 }. This may sound silly, but I find this helpful.

One way to address this is to add the exact value in a comment, like
"(AVRational) { 137, 1000 }, // 0.137". This isn't pretty but retains
grep-discoverability.

Ronald


More information about the ffmpeg-devel mailing list