Le septidi 7 ventôse, an CCXXIII, Clement Boesch a écrit :
> +    float ratio = (float)nb_out / nb_in;
> +    snprintf(buf, sizeof(buf), "%f", ratio);

I wonder if both values could be useful instead individually. If so, either
set the string to %d/%d or set two metadata keys.

If not, use double instead of float, float is very rarely useful. And in
this particular case it will be converted to double by the vararg call.

> +    av_log(ctx, AV_LOG_INFO, "%d%s colors generated out of %d colors; 
> ratio=%f\n",
> +           s->nb_boxes, s->reserve_transparent ? "(+1)" : "", s->nb_refs,
> +           set_colorquant_ratio_meta(out, s->nb_boxes, s->nb_refs));

This is your code, but I must say that I find returning the double value as
a secondary effect of a function called set_something() not very readable.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to