[FFmpeg-devel] patch 2: comments style cleanup in libavcodec/cinepakenc.c

Moritz Barsnick barsnick at gmx.net
Sat Jan 28 21:30:34 EET 2017


On Sat, Jan 28, 2017 at 11:50:27 +0100, u-9iep at aetey.se wrote:
> -// MAX_STRIPS limits the maximum quality you can reach
> -//            when you want high quality on high resolutions,
> -// MIN_STRIPS limits the minimum efficiently encodable bit rate
> -//            on low resolutions
> -// the numbers are only used for brute force optimization for the first frame,
> -// for the following frames they are adaptively readjusted
> -// NOTE the decoder in ffmpeg has its own arbitrary limitation on the number
> -// of strips, currently 32
> +#define MAX_STRIPS  32      /* Note: having fewer choices regarding the number of strips speeds up encoding (obviously) */
> +#define MIN_STRIPS  1       /* Note: having more strips speeds up encoding the frame (this is less obvious) */
> +/* MAX_STRIPS limits the maximum quality you can reach */
> +/*            when you want high quality on high resolutions, */
> +/* MIN_STRIPS limits the minimum efficiently encodable bit rate */
> +/*            on low resolutions */
> +/* the numbers are only used for brute force optimization for the first frame, */
> +/* for the following frames they are adaptively readjusted */
> +/* NOTE the decoder in ffmpeg has its own arbitrary limitation on the number */
> +/* of strips, currently 32 */

If this is supposed to be cosmetic, it's extremely ugly. Does any other
ffmpeg code use this "style"?

I think you'd rather use:

  /*
   * Extremely long
   * multiline comment
   * using non-C++ style
   * comment delimiters.
   */

(I do agree though that mixing styles isn't nice.)

Moritz


More information about the ffmpeg-devel mailing list