64 while (r->
sum > val && cnt < 9) {
103 v = ((v >> 1) + r->
lossy) ^ -(v & 1);
123 c = data[-stride - step];
154 for (i = 1; i <
width; i++) {
156 data[i * step] = data[i * step - step] +
val;
159 for (j = 1; j <
height; j++) {
164 for (i = 1; i <
width; i++) {
178 for (y=1; y<
height; y++) {
180 memmove(data + y*stride,
181 data + y*(stride + step),
184 memmove(data + y*stride + step*(width-y),
192 void *
data,
int *got_frame,
197 int buf_size = avpkt->
size;
205 #define ADVANCE_BY_DECODED do { \
206 if (decoded < 0 || decoded >= buf_size) goto buf_too_small; \
207 buf += decoded; buf_size -= decoded; \
239 if (avctx->
width & 1)
260 if (decoded < 0 || decoded > buf_size)
266 return avpkt->
size - buf_size;
const char const char void * val
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
static av_cold int init(AVCodecContext *avctx)
static int loco_predict(uint8_t *data, int stride, int step)
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).
#define av_assert0(cond)
assert() equivalent, that is always enabled.
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)
static void rotate_faulty_loco(uint8_t *data, int width, int height, int stride, int step)
#define FF_DEBUG_PICT_INFO
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
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. ...
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
const char * name
Name of the codec implementation.
static int loco_get_rice(RICEContext *r)
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
static void loco_update_rice_param(RICEContext *r, int val)
static av_cold int decode_init(AVCodecContext *avctx)
int width
picture width / height.
packed RGB 8:8:8, 24bpp, BGRBGR...
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)
#define AV_LOG_INFO
Standard information.
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
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
#define ADVANCE_BY_DECODED
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
GLint GLenum GLboolean GLsizei stride
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
common internal api header.
int key_frame
1 -> keyframe, 0-> not
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
This structure stores compressed data.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.