27 #define BITSTREAM_READER_LE
47 static const uint8_t LUT[256] = {
48 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,
49 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,
50 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,
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 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,
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 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,
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,
59 for (i = 0; i < ctx->
size; i++) {
74 allbits += ctx->
val[i];
90 int i, j, left, left_top;
92 for (i = 0; i <
height; i++) {
93 for (j = 0; j <
width; j++) {
96 int v = (1 << val[j]) +
get_bits(gb, val[j]) - 1;
97 val[j] = (v >> 1) ^ -(v & 1);
104 width, &left, &left_top);
107 for (j = 1; j <
width; j++)
108 dst[j] = val[j] + dst[j - 1];
124 int width_uv = avctx->
width / 2, height_uv = avctx->
height / 2;
127 if (avpkt->
size < 4 || avpkt->
size - 4 > INT_MAX/8) {
162 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)
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
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)
static int get_bits_left(GetBitContext *gb)
#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.
static const uint8_t offset[127][2]
Libavcodec external API header.
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.
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.
#define CODEC_FLAG_GRAY
Only decode/encode grayscale.
static void vble_restore_plane(VBLEContext *ctx, AVFrame *pic, GetBitContext *gb, int plane, int offset, int width, int height)
int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height)
Calculate the size in bytes that a picture of the given width and height would occupy if stored in th...
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.