Go to the documentation of this file.
32 void *
data,
int *got_frame,
35 const uint8_t *buf = avpkt->
data;
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 FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
static double cb(void *priv, double x, double y)
This structure describes decoded (raw) audio or video data.
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.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
int key_frame
1 -> keyframe, 0-> not
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const AVCodec ff_cljr_decoder
@ AV_PICTURE_TYPE_I
Intra.
enum AVPictureType pict_type
Picture type of the frame.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static av_cold int decode_init(AVCodecContext *avctx)
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
main external API structure.
This structure stores compressed data.
static double cr(void *priv, double x, double y)
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.