48 dst = dst + height *
stride;
50 while((size > 0) && (rows_to_go > 0)) {
60 run = ((code & 0x7) << 16) + (c0 << 8) + c1 + 2;
61 }
else if (code >= 0xF0) {
64 run = ((code & 0xF) << 8) + c0 + 2;
65 }
else if (code >= 0xE0) {
66 run = (code & 0x1F) + 2;
67 }
else if (code >= 0xC0) {
71 copy = ((code & 0x3F) << 16) + (c0 << 8) + c1 + 1;
72 }
else if (code >= 0x80) {
75 copy = ((code & 0x7F) << 8) + c0 + 1;
86 for(i = 0; i <
run; i++) {
88 if (filled >= width) {
98 for(i = 0; i <
copy; i++) {
99 dst[filled++] = *src++;
100 if (filled >= width) {
113 { 0x00, 0x20, 0x20, 0x20, 0x18, 0x10, 0x10, 0x20, 0x10, 0x08, 0x18, 0x08, 0x08, 0x18, 0x10, 0x04};
115 { 0x00, 0x20, 0x18, 0x08, 0x18, 0x10, 0x20, 0x10, 0x08, 0x10, 0x20, 0x20, 0x08, 0x10, 0x18, 0x04};
120 int delta,
const uint8_t *ctable, uint8_t *refdata)
128 for(i = 0; i <
height; i++)
129 memcpy(refdata + (i * width), dst + (i * stride), width);
133 dst = dst + height *
stride;
135 while((size > 0) && (height >= 0)) {
141 while((code & 0xF0) == 0xF0) {
144 int me_w, me_h, me_x, me_y;
168 if ((me_x + filled < 0) || (me_x + me_w + filled > width) ||
169 (height - me_y - me_h < 0) || (height - me_y > orig_height) ||
170 (filled + me_w > width) || (height - me_h < 0))
172 me_x, me_y, me_w, me_h, filled, height);
175 me_plane = refdata + (filled + me_x) + (height - me_y) *
width;
176 for(j = 0; j < me_h; j++) {
177 for(i = 0; i < me_w; i++)
178 dst[filled + i - (j * stride)] = me_plane[i - (j *
width)];
195 for(i = 0; i <= code; i++) {
197 if(filled >= width) {
205 }
else if(code >= 0xC0) {
208 for(i = 0; i <= code; i++) {
209 dst[filled++] = *src++;
210 if(filled >= width) {
219 }
else if(code >= 0x80) {
226 skip = (*src++) + 64;
228 skip = (*src++) + 320;
232 while( filled >= width) {
242 dst[filled++] = ctable[code & 0x7F];
245 if(filled >= width) {
255 void *
data,
int *data_size,
258 const uint8_t *buf = avpkt->
data;
259 int buf_size = avpkt->
size;
272 if(buf[0x85] == 0x10) {
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.
int(* reget_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of a frame to get cr buffer for it.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
static void copy(LZOContext *c, int cnt)
Copies bytes from input to output buffer with checking.
static int init(AVCodecParserContext *s)
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
static av_cold int decode_init(AVCodecContext *avctx)
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. ...
struct QpegContext QpegContext
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
int width
picture width / height.
struct AVFrame AVFrame
Audio Video Frame.
static const int qpeg_table_w[16]
uint8_t * av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int *size)
Get side information from packet.
static void qpeg_decode_inter(const uint8_t *src, uint8_t *dst, int size, int stride, int width, int height, int delta, const uint8_t *ctable, uint8_t *refdata)
static const int qpeg_table_h[16]
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.
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int palette_has_changed
Tell user application that palette has changed from previous frame.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
8 bit with PIX_FMT_RGB32 palette
static av_cold int decode_end(AVCodecContext *avctx)
static void qpeg_decode_intra(const uint8_t *src, uint8_t *dst, int size, int stride, int width, int height)