avfilter: use the getters for xGA font data arrays

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-07-21 21:39:16 -03:00
parent cb9742af76
commit da18c2a373
11 changed files with 26 additions and 22 deletions

View File

@@ -88,6 +88,7 @@ static int query_formats(const AVFilterContext *ctx,
static void draw_text(FFDrawContext *draw, AVFrame *frame, FFDrawColor *color,
int x0, int y0, const uint8_t *text, int vertical)
{
const uint8_t *cga_font = avpriv_cga_font_get();
int x = x0;
for (; *text; text++) {
@@ -98,7 +99,7 @@ static void draw_text(FFDrawContext *draw, AVFrame *frame, FFDrawColor *color,
}
ff_blend_mask(draw, color, frame->data, frame->linesize,
frame->width, frame->height,
avpriv_cga_font + *text * 8, 1, 8, 8, 0, 0, x, y0);
&cga_font[*text * 8], 1, 8, 8, 0, 0, x, y0);
if (vertical) {
x = x0;
y0 += 8;