[FFmpeg-devel] [PATCH v2 1/3] libavutil/imgutils: add utility to get plane sizes

Nicolas George george at nsup.org
Tue Jul 14 15:47:23 EEST 2020


James Almer (12020-07-10):
> Because my opinion and tastes are not yours. I already said why *i*
> consider it ugly. It doesn't need to fit *your* conception of ugliness.

If it is only a matter of taste, then it cannot count as an argument.
But tastes are frequently a proxy for minor factors. If you can express
the minor factors behind your tastes, they can count as arguments.

Which is what I am trying to do about my tastes.

One of these minor factors: there is frequently a "int ret" variable and
a "return ret" at the end. If the return value conflates size with the
error code, ret cannot be used, which means some kind of "if (size < 0)
ret = size;" need to happen, but would easily be forgotten, initially or
in refactoring.

> int av_image_fill_plane_sizes(size_t sizes[4], enum AVPixelFormat
> pix_fmt, const ptrdiff_t linesizes[4]);

So the question is now: is the total size useful enough to warrant an
extra return parameter or not? I have no advice on the question.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200714/d3ab26d7/attachment.sig>


More information about the ffmpeg-devel mailing list