37 #define EXTRADATA1_SIZE (6 + 256 * 3)
59 unsigned char* out,
int stride,
int video_base){
64 const unsigned char* back_frame = s->
back_frame;
65 const unsigned char* in_end = in +
size;
66 const unsigned char* out_end = out + stride * s->
avctx->
height;
67 unsigned char* line_end = out + s->
avctx->
width;
70 for(i=0;i<=base_y;i++){
77 line_end = out - stride_adj;
82 unsigned char val = *in++;
92 if(len >= out_end - out)
101 *out++ = (val == 0x80)? *back_frame:val;
106 if(len >= out_end - out)
114 while(out < out_end){
115 memcpy(out, back_frame, line_end - out);
116 back_frame += line_end - out;
117 out = line_end + stride_adj;
164 back_frame,avctx->
width,0);
172 void *
data,
int *data_size,
175 const uint8_t *buf = avpkt->
data;
176 int buf_size = avpkt->
size;
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int(* get_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of each frame to get a buffer for it.
enum PixelFormat pix_fmt
Pixel format, see PIX_FMT_xxx.
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
#define EXTRADATA1_SIZE
video base, clr count, palette
static av_cold int rl2_decode_end(AVCodecContext *avctx)
Uninit decoder.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
unsigned char * back_frame
background frame
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static int init(AVCodecParserContext *s)
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
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.
unsigned int palette[AVPALETTE_COUNT]
int width
picture width / height.
struct AVFrame AVFrame
Audio Video Frame.
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)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int rl2_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
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.
AV_WL32 AV_WL24 AV_WL16 AV_WB32 AV_RB24
static av_cold int rl2_decode_init(AVCodecContext *avctx)
Initialize the decoder.
8 bit with PIX_FMT_RGB32 palette
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.