32 void *
data,
int *got_frame,
36 int buf_size = avpkt->
size;
48 "Resolution larger than buffer size. Invalid header?\n");
59 for (y = 0; y < avctx->
height; y++) {
63 for (x = 0; x < avctx->
width; x += 4) {
64 luma[3] = (
get_bits(&gb, 5)*33) >> 2;
65 luma[2] = (
get_bits(&gb, 5)*33) >> 2;
66 luma[1] = (
get_bits(&gb, 5)*33) >> 2;
67 luma[0] = (
get_bits(&gb, 5)*33) >> 2;
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static double cb(void *priv, double x, double y)
bitstream reader API header.
#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. ...
const char * name
Name of the codec implementation.
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.
static av_cold int decode_init(AVCodecContext *avctx)
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
int key_frame
1 -> keyframe, 0-> not
static double cr(void *priv, double x, double y)
This structure stores compressed data.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.