40 #define EXTRADATA1_SIZE (6 + 256 * 3)
62 unsigned char* out,
int stride,
int video_base){
67 const unsigned char* back_frame = s->
back_frame;
68 const unsigned char* in_end = in +
size;
69 const unsigned char* out_end = out + stride * s->
avctx->
height;
70 unsigned char* line_end;
73 for(i=0;i<=base_y;i++){
80 line_end = out - stride_adj;
85 unsigned char val = *in++;
95 if(len >= out_end - out)
104 *out++ = (val == 0x80)? *back_frame:val;
109 if(len >= out_end - out)
117 while(out < out_end){
118 memcpy(out, back_frame, line_end - out);
119 back_frame += line_end - out;
120 out = line_end + stride_adj;
167 back_frame,avctx->
width,0);
175 void *
data,
int *got_frame,
179 int buf_size = avpkt->
size;
This structure describes decoded (raw) audio or video data.
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
memory handling functions
#define EXTRADATA1_SIZE
video base, clr count, palette
static av_cold int rl2_decode_end(AVCodecContext *avctx)
Uninit decoder.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
8 bit with PIX_FMT_RGB32 palette
unsigned char * back_frame
background frame
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static int init(AVCodecParserContext *s)
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
int reference
is this picture used as reference The values for this are the same as the MpegEncContext.picture_structure variable, that is 1->top field, 2->bottom field, 3->frame/both fields.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
common internal API header
unsigned int palette[AVPALETTE_COUNT]
int width
picture width / height.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
static int rl2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
main external API structure.
static void close(AVCodecParserContext *s)
unsigned int clr_count
number of used colors (currently unused)
unsigned short video_base
initial drawing offset
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
static av_cold int rl2_decode_init(AVCodecContext *avctx)
Initialize the decoder.
struct Rl2Context Rl2Context
static void rl2_rle_decode(Rl2Context *s, const unsigned char *in, int size, unsigned char *out, int stride, int video_base)
Run Length Decode a single 320x200 frame.
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...