63 void *
data,
int *got_frame,
67 int buf_size = avpkt->
size;
70 unsigned char *y_plane;
71 unsigned char *u_plane;
72 unsigned char *v_plane;
78 const signed char *y_table = (
const signed char*)buf + 0;
79 const signed char *u_table = (
const signed char*)buf + 16;
80 const signed char *v_table = (
const signed char*)buf + 32;
82 unsigned char y_pred, u_pred, v_pred;
84 unsigned char cur_byte;
95 if (buf_size != 48 + s->
height * (s->
width * 3 / 4)) {
119 for (y_ptr = 0, u_ptr = 0, v_ptr = 0;
126 cur_byte = buf[stream_ptr++];
127 u_plane[u_ptr++] = u_pred = cur_byte & 0xF0;
128 y_plane[y_ptr++] = y_pred = (cur_byte & 0x0F) << 4;
130 cur_byte = buf[stream_ptr++];
131 v_plane[v_ptr++] = v_pred = cur_byte & 0xF0;
132 y_pred += y_table[cur_byte & 0x0F];
133 y_plane[y_ptr++] = y_pred;
135 cur_byte = buf[stream_ptr++];
136 y_pred += y_table[cur_byte & 0x0F];
137 y_plane[y_ptr++] = y_pred;
138 y_pred += y_table[(cur_byte & 0xF0) >> 4];
139 y_plane[y_ptr++] = y_pred;
142 pixel_groups = s->
width / 4 - 1;
143 while (pixel_groups--) {
145 cur_byte = buf[stream_ptr++];
146 u_pred += u_table[(cur_byte & 0xF0) >> 4];
147 u_plane[u_ptr++] = u_pred;
148 y_pred += y_table[cur_byte & 0x0F];
149 y_plane[y_ptr++] = y_pred;
151 cur_byte = buf[stream_ptr++];
152 v_pred += v_table[(cur_byte & 0xF0) >> 4];
153 v_plane[v_ptr++] = v_pred;
154 y_pred += y_table[cur_byte & 0x0F];
155 y_plane[y_ptr++] = y_pred;
157 cur_byte = buf[stream_ptr++];
158 y_pred += y_table[cur_byte & 0x0F];
159 y_plane[y_ptr++] = y_pred;
160 y_pred += y_table[(cur_byte & 0xF0) >> 4];
161 y_plane[y_ptr++] = y_pred;
182 #if CONFIG_AURA_DECODER
196 #if CONFIG_CYUV_DECODER
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.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
struct CyuvDecodeContext CyuvDecodeContext
static av_cold int cyuv_decode_init(AVCodecContext *avctx)
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
static int init(AVCodecParserContext *s)
static av_cold int cyuv_decode_end(AVCodecContext *avctx)
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
int width
picture width / height.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a 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)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
static int cyuv_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
#define FF_BUFFER_HINTS_VALID
This structure stores compressed data.