cga_data.c File Reference

CGA/EGA/VGA ROM data. More...

#include <stdint.h>
#include "cga_data.h"
Include dependency graph for cga_data.c:

Go to the source code of this file.

Functions

void ff_draw_pc_font (uint8_t *dst, int linesize, const uint8_t *font, int font_height, int ch, int fg, int bg)
 Draw CGA/EGA/VGA font to 8-bit pixel buffer. More...
 

Variables

const uint32_t ff_cga_palette [16]
 
const uint32_t ff_ega_palette [64]
 

Detailed Description

CGA/EGA/VGA ROM data.

Note
fonts are in libavutil/xga_font_data.[ch]

Definition in file cga_data.c.

Function Documentation

void ff_draw_pc_font ( uint8_t dst,
int  linesize,
const uint8_t font,
int  font_height,
int  ch,
int  fg,
int  bg 
)

Draw CGA/EGA/VGA font to 8-bit pixel buffer.

Parameters
dstDestination pixel buffer
linesizeLinesize (pixels)
fontFont table. We assume font width is always 8 pixels wide.
font_heightFont height (pixels)
fg,bgForeground and background palette index
chCharacter to draw

Definition at line 46 of file cga_data.c.

Referenced by draw_char(), and tmv_decode_frame().

Variable Documentation

const uint32_t ff_cga_palette[16]
Initial value:
= {
0xFF000000, 0xFF0000AA, 0xFF00AA00, 0xFF00AAAA, 0xFFAA0000, 0xFFAA00AA, 0xFFAA5500, 0xFFAAAAAA,
0xFF555555, 0xFF5555FF, 0xFF55FF55, 0xFF55FFFF, 0xFFFF5555, 0xFFFF55FF, 0xFFFFFF55, 0xFFFFFFFF,
}

Definition at line 30 of file cga_data.c.

Referenced by decode_frame(), decode_init(), set_palette(), and tmv_decode_frame().

const uint32_t ff_ega_palette[64]
Initial value:
= {
0xFF000000, 0xFF0000AA, 0xFF00AA00, 0xFF00AAAA, 0xFFAA0000, 0xFFAA00AA, 0xFFAAAA00, 0xFFAAAAAA,
0xFF000055, 0xFF0000FF, 0xFF00AA55, 0xFF00AAFF, 0xFFAA0055, 0xFFAA00FF, 0xFFAAAA55, 0xFFAAAAFF,
0xFF005500, 0xFF0055AA, 0xFF00FF00, 0xFF00FFAA, 0xFFAA5500, 0xFFAA55AA, 0xFFAAFF00, 0xFFAAFFAA,
0xFF005555, 0xFF0055FF, 0xFF00FF55, 0xFF00FFFF, 0xFFAA5555, 0xFFAA55FF, 0xFFAAFF55, 0xFFAAFFFF,
0xFF550000, 0xFF5500AA, 0xFF55AA00, 0xFF55AAAA, 0xFFFF0000, 0xFFFF00AA, 0xFFFFAA00, 0xFFFFAAAA,
0xFF550055, 0xFF5500FF, 0xFF55AA55, 0xFF55AAFF, 0xFFFF0055, 0xFFFF00FF, 0xFFFFAA55, 0xFFFFAAFF,
0xFF555500, 0xFF5555AA, 0xFF55FF00, 0xFF55FFAA, 0xFFFF5500, 0xFFFF55AA, 0xFFFFFF00, 0xFFFFFFAA,
0xFF555555, 0xFF5555FF, 0xFF55FF55, 0xFF55FFFF, 0xFFFF5555, 0xFFFF55FF, 0xFFFFFF55, 0xFFFFFFFF
}

Definition at line 35 of file cga_data.c.

Referenced by decode_frame().