65 const unsigned char *src,
int src_stride,
67 int xoffset,
int yoffset,
74 if (i+xoffset>=0 && i+xoffset<width &&
75 j+yoffset>=0 && j+yoffset<height) {
76 dst[j*dst_stride + i] = src[(j+yoffset)*src_stride + i+xoffset];
78 dst[j*dst_stride + i] = 0;
89 for(x=0; x<s->
avctx->
width/4 && buf_end - buf > i; x++) {
92 if (raw+16<buf_end && *raw==0xFF) {
99 }
else if(raw<buf_end) {
100 int xoffset = (*raw & 0xF) - 7;
101 int yoffset = ((*raw >> 4)) - 7;
109 int xoffset = (buf[i] & 0xF) - 7;
110 int yoffset = ((buf[i] >> 4)) - 7;
122 int pal_start, pal_count, i, fps;
124 if(buf_end - buf < 16) {
142 for (i=pal_start; i<pal_start+pal_count && i<
AVPALETTE_COUNT && buf_end - buf >= 3; i++) {
148 #define EA_PREAMBLE_SIZE 8
149 #define MVIh_TAG MKTAG('M', 'V', 'I', 'h')
152 void *
data,
int *got_frame,
156 int buf_size = avpkt->
size;
158 const uint8_t *buf_end = buf + buf_size;
This structure describes decoded (raw) audio or video data.
int buffer_hints
codec suggestion on buffer type if != 0
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
unsigned int palette[AVPALETTE_COUNT]
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
#define FFSWAP(type, a, b)
8 bit with PIX_FMT_RGB32 palette
static int init(AVCodecParserContext *s)
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 CmvContext CmvContext
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
struct AVRational AVRational
rational number numerator/denominator
static av_cold int cmv_decode_init(AVCodecContext *avctx)
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of the image can be address...
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
static int cmv_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
int width
picture width / height.
static void cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t *buf_end)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
static void cmv_motcomp(unsigned char *dst, int dst_stride, const unsigned char *src, int src_stride, int x, int y, int xoffset, int yoffset, int width, int height)
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
AVFrame last2_frame
second-last
main external API structure.
static void close(AVCodecParserContext *s)
static void cmv_decode_inter(CmvContext *s, const uint8_t *buf, const uint8_t *buf_end)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static void cmv_decode_intra(CmvContext *s, const uint8_t *buf, const uint8_t *buf_end)
common internal api header.
common internal and external API header
#define AVERROR_INVALIDDATA
int key_frame
1 -> keyframe, 0-> not
#define FF_BUFFER_HINTS_VALID
This structure stores compressed data.
static av_cold int cmv_decode_end(AVCodecContext *avctx)
if(!(ptr_align%ac->ptr_align)&&samples_align >=aligned_len)