64 while (r->
sum > val && cnt < 9) {
103 v = ((v >> 1) + r->
lossy) ^ -(v & 1);
123 c = data[-stride - step];
151 for (i = 1; i <
width; i++) {
153 data[i * step] = data[i * step - step] +
val;
156 for (j = 1; j <
height; j++) {
161 for (i = 1; i <
width; i++) {
172 void *
data,
int *got_frame,
177 int buf_size = avpkt->
size;
185 #define ADVANCE_BY_DECODED do { \
186 if (decoded < 0 || decoded >= buf_size) goto buf_too_small; \
187 buf += decoded; buf_size -= decoded; \
238 if (decoded < 0 || decoded > buf_size)
244 return avpkt->
size - buf_size;
const char const char void * val
This structure describes decoded (raw) audio or video data.
static av_cold int init(AVCodecContext *avctx)
static int loco_predict(uint8_t *data, int stride, int step)
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int esc_len)
read unsigned golomb rice code (jpegls).
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
packed RGB 8:8:8, 24bpp, BGRBGR...
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
static int loco_get_rice_param(RICEContext *r)
const char * name
Name of the codec implementation.
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
static int get_bits_count(const GetBitContext *s)
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. ...
static int loco_get_rice(RICEContext *r)
Libavcodec external API header.
static void loco_update_rice_param(RICEContext *r, int val)
static av_cold int decode_init(AVCodecContext *avctx)
int width
picture width / height.
static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int height, int stride, const uint8_t *buf, int buf_size, int step)
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define AV_LOG_INFO
Standard information.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
BYTE int const BYTE int int int height
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
#define ADVANCE_BY_DECODED
#define FF_DEBUG_PICT_INFO
common internal api header.
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
#define AVERROR_INVALIDDATA
int key_frame
1 -> keyframe, 0-> not
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
This structure stores compressed data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.