72 for (i = 0; i < 16; i++) {
77 for (i = 0; i < 16; i++)
107 #define DEFAULT_BG_COLOR 0
140 void *
data,
int *got_frame,
145 int buf_size = avpkt->
size;
146 const uint8_t *buf_end = buf+buf_size;
157 while (buf + 2 < buf_end) {
159 int type = *buf >> 6;
160 int count = (*buf & 0x3F) + 1;
164 for (i = 0; i < count && buf + 1 < buf_end; i++) {
171 for (i = 0; i < count && buf < buf_end; i++)
176 for (i = 0; i < count && buf < buf_end; i++)
182 for (i = 0; i < count && buf < buf_end; i++)
188 while (buf + 2 < buf_end) {
191 if (buf + 6 > buf_end)
193 for (i = 0; i < buf[2]; i++)
202 while (buf + 1 < buf_end) {
223 #if CONFIG_BINTEXT_DECODER
236 #if CONFIG_XBIN_DECODER
249 #if CONFIG_IDF_DECODER
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
#define AV_LOG_WARNING
Something somehow does not look correct.
static av_cold int init(AVCodecContext *avctx)
AVCodec ff_bintext_decoder
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
const uint8_t avpriv_vga16_font[4096]
static av_unused void hscroll(AVCodecContext *avctx)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame)
Identical in function to av_frame_make_writable(), except it uses ff_get_buffer() to allocate the buf...
static av_cold int decode_init(AVCodecContext *avctx)
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
8 bits with AV_PIX_FMT_RGB32 palette
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static av_cold int decode_end(AVCodecContext *avctx)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const uint8_t avpriv_cga_font[2048]
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
const char * name
Name of the codec implementation.
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
static void draw_char(AVCodecContext *avctx, int c, int a)
Draw character to screen.
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.
Libavcodec external API header.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_RB24
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
main external API structure.
int palette_has_changed
Tell user application that palette has changed from previous frame.
const uint32_t ff_cga_palette[16]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
This structure stores compressed data.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
CGA/EGA/VGA ROM font data.