44 a->interlace = !memcmp(avctx->
extradata + ndx,
"1:1(", 4);
57 const uint8_t *buf = avpkt->
data;
58 int buf_size = avpkt->
size;
59 int y, ret, true_height;
61 true_height = buf_size / (2*avctx->
width);
73 for(y = 0; y < avctx->
height-1; y+=2) {
74 memcpy(p->data[0] + (y+
a->tff)*p->linesize[0], buf , 2*avctx->
width);
75 memcpy(p->data[0] + (y+!
a->tff)*p->linesize[0], buf + avctx->
width*true_height+4, 2*avctx->
width);
76 buf += 2*avctx->
width;
79 buf += (true_height - avctx->
height)*avctx->
width*2;
80 for(y = 0; y < avctx->
height; y++) {
81 memcpy(p->data[0] + y*p->linesize[0], buf, 2*avctx->
width);
82 buf += 2*avctx->
width;
const FFCodec ff_avrn_decoder
Libavcodec external API header.
static int decode_frame(AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt)
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
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...
static int decode_frame(AVCodecContext *avctx, AVFrame *picture, int *got_frame, AVPacket *avpkt)
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
main external API structure.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int width
picture width / height.
uint8_t * extradata
Out-of-band global headers that may be used by some codecs.
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.