Change #254109
| Category | ffmpeg |
| Changed by | Ayose <ayosec@gmail.com> |
| Changed at | Sun 04 Jan 2026 14:42:20 |
| Repository | https://git.ffmpeg.org/ffmpeg.git |
| Project | ffmpeg |
| Branch | master |
| Revision | 6300e340d3b1d9d30c216f475ca027038fed830d |
Comments
avfilter/vf_drawvg: skip conversions when a color is assigned to a variable. In libcairo, colors are defined as 4 separate components, and each one is double between 0 and 1. Before this commit, colors stored in variables (like `defhsla`) were converted to a `0xRRGGBBAA` value, which introduced some issues due to rounding errors. Now, when a color is assigned to a variable, the original values (a `double[4]`) are stored in a dedicated array (`color_vars`), so no conversion is needed. This change also reduces the cost of reading a color from a variable (no need for `av_be2ne32`, or the `color[i] / 255` operations). Signed-off-by: Ayose <ayosec@gmail.com>
Changed files
- libavfilter/vf_drawvg.c