29 if (avctx->
width & 1) {
50 if (bytestream_get_le32(&buf) !=
MKTAG(
'F',
'R',
'W',
'1')) {
65 for (field = 0; field < 2; field++) {
67 int field_h = (avctx->
height + !field) >> 1;
68 int field_size, min_field_size = avctx->
width * 2 * field_h;
70 if (buf_end - buf < 8)
73 field_size = bytestream_get_le32(&buf);
74 if (field_size < min_field_size) {
75 av_log(avctx,
AV_LOG_ERROR,
"Field size %i is too small (required %i)\n", field_size, min_field_size);
78 if (buf_end - buf < field_size) {
79 av_log(avctx,
AV_LOG_ERROR,
"Packet is too small, need %i, have %i\n", field_size, (
int)(buf_end - buf));
84 for (i = 0; i < field_h; i++) {
85 memcpy(dst, buf, avctx->
width * 2);
86 buf += avctx->
width * 2;
89 buf += field_size - min_field_size;
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
int interlaced_frame
The content of the picture is interlaced.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#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.
static av_cold int decode_init(AVCodecContext *avctx)
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
int top_field_first
If the content is interlaced, is top field displayed first.
int key_frame
1 -> keyframe, 0-> not
#define MKTAG(a, b, c, d)
This structure stores compressed data.