27 #define BITSTREAM_READER_LE
49 static const uint8_t LUT[256] = {
50 8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
51 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
52 6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
53 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
54 7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
55 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
56 6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
57 5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,
61 for (i = 0; i < ctx->
size; i++) {
76 allbits += ctx->
val[i];
92 int i, j, left, left_top;
94 for (i = 0; i <
height; i++) {
95 for (j = 0; j <
width; j++) {
98 int v = (1 << val[j]) +
get_bits(gb, val[j]) - 1;
99 val[j] = (v >> 1) ^ -(v & 1);
106 width, &left, &left_top);
109 for (j = 1; j <
width; j++)
110 dst[j] = val[j] + dst[j - 1];
126 int width_uv = avctx->
width / 2, height_uv = avctx->
height / 2;
129 if (avpkt->
size < 4 || avpkt->
size - 4 > INT_MAX/8) {
164 offset += width_uv * height_uv;
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 unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_WARNING
Something somehow does not look correct.
static av_cold int init(AVCodecContext *avctx)
static int vble_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
av_cold void ff_huffyuvdsp_init(HuffYUVDSPContext *c)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
static int vble_unpack(VBLEContext *ctx, GetBitContext *gb)
bitstream reader API header.
void(* add_hfyu_median_pred)(uint8_t *dst, const uint8_t *top, const uint8_t *diff, intptr_t w, int *left, int *left_top)
#define AV_CODEC_FLAG_GRAY
Only decode/encode grayscale.
static int get_bits_left(GetBitContext *gb)
int av_image_get_buffer_size(enum AVPixelFormat pix_fmt, int width, int height, int align)
Return the size in bytes of the amount of data required to store an image with the given parameters...
#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. ...
int flags
AV_CODEC_FLAG_*.
const char * name
Name of the codec implementation.
static const uint8_t offset[127][2]
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
static unsigned int show_bits(GetBitContext *s, int n)
Show 1-25 bits.
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static av_cold int vble_decode_close(AVCodecContext *avctx)
static unsigned int get_bits1(GetBitContext *s)
BYTE int const BYTE int int int height
static void skip_bits(GetBitContext *s, int n)
uint8_t * val
This array first holds the lengths of vlc symbols and then their value.
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 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.
static void vble_restore_plane(VBLEContext *ctx, AVFrame *pic, GetBitContext *gb, int plane, int offset, int width, int height)
int key_frame
1 -> keyframe, 0-> not
static av_cold int vble_decode_init(AVCodecContext *avctx)
#define av_malloc_array(a, b)
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.