27#define BITSTREAM_READER_LE
41 const unsigned char *src_end,
42 unsigned char *
dst,
int dst_size)
50 for (
i = 0, sz = 0;
i < 64 && sz < dst_size;
i++) {
54 sz +=
FFABS(code_table[
i]);
63 if (src_end -
src < 1)
79 const unsigned char *
src,
80 const unsigned char *src_end,
86 unsigned char block[8 * 8];
88 if (src_end -
src < 1)
95 for (
b = 0;
b < 8;
b++) {
102 for (
i = 0;
i < 8;
i++) {
103 for (
b = 0;
b < 8;
b++)
118 for (
b = 0;
b < 8;
b++) {
119 for (
i = 0;
i < 8;
i++)
129 const unsigned char *
src,
130 const unsigned char *src_end,
135 if (src_end -
src < 8 * 8)
138 for (
i = 0;
i < 8;
i++) {
148 const unsigned char *
src,
149 const unsigned char *src_end,
155 if (src_end -
src < 2)
160 }
while (!(
pos & 0x80));
167 const unsigned char *data_end =
data + data_size;
177 palette = (uint32_t *)seq->
frame->
data[1];
178 if (data_end -
data < 256 * 3)
180 for (
i = 0;
i < 256;
i++) {
181 for (j = 0; j < 3; j++,
data++)
188 if (data_end -
data < 128)
191 for (y = 0; y < 128; y += 8)
192 for (x = 0; x < 256; x += 8) {
235 const uint8_t *buf = avpkt->
data;
236 int buf_size = avpkt->
size;
264 .p.name =
"tiertexseqvideo",
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
const FFCodec ff_tiertexseqvideo_decoder
static av_cold void close(AVCodecParserContext *s)
Libavcodec external API header.
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Identical in function to ff_get_buffer(), except it reuses the existing buffer if available.
int ff_set_dimensions(AVCodecContext *s, int width, int height)
int(* init)(AVBSFContext *ctx)
static const uint8_t bits[8]
bitstream reader API header.
static int get_sbits(GetBitContext *s, int n)
static int get_bits_left(GetBitContext *gb)
static int get_bits_count(const GetBitContext *s)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
@ AV_CODEC_ID_TIERTEXSEQVIDEO
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
const uint8_t ff_log2_tab[256]
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
main external API structure.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
This structure describes decoded (raw) audio or video data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
This structure stores compressed data.
static int seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int data_size)
static av_cold int seqvideo_decode_end(AVCodecContext *avctx)
static const unsigned char * seq_decode_op1(SeqVideoContext *seq, const unsigned char *src, const unsigned char *src_end, unsigned char *dst)
static av_cold int seqvideo_decode_init(AVCodecContext *avctx)
static const unsigned char * seq_unpack_rle_block(const unsigned char *src, const unsigned char *src_end, unsigned char *dst, int dst_size)
static const unsigned char * seq_decode_op3(SeqVideoContext *seq, const unsigned char *src, const unsigned char *src_end, unsigned char *dst)
static const unsigned char * seq_decode_op2(SeqVideoContext *seq, const unsigned char *src, const unsigned char *src_end, unsigned char *dst)
static int seqvideo_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
static const ColorEntry color_table[]