Go to the documentation of this file.
   51     for (
i = 0; 
i < 3; ++
i)
 
   59     for (
i = 0; 
i < 3; ++
i) {
 
   96                               unsigned char *
dst, 
int dst_size)
 
   99     unsigned char huff_code_table[15];
 
  100     unsigned char *dst_cur       = 
dst;
 
  101     unsigned char *dst_end       = 
dst + dst_size;
 
  102     const unsigned char *src_end = 
src + src_size;
 
  104     memcpy(huff_code_table, 
src, 15);
 
  107     while (
src < src_end) {
 
  109         if ((huff_code >> 4) == 15) {
 
  112             *dst_cur++ = 
b | (huff_code >> 4);
 
  114             *dst_cur++ = huff_code_table[huff_code >> 4];
 
  115         if (dst_cur >= dst_end)
 
  119         if (huff_code == 15) {
 
  122             *dst_cur++ = huff_code_table[huff_code];
 
  123         if (dst_cur >= dst_end)
 
  127     return dst_cur - 
dst;
 
  131                            unsigned char *
dst, 
int dst_size)
 
  135     unsigned char *dst_end       = 
dst + dst_size, *dst_start = 
dst;
 
  136     const unsigned char *src_end = 
src + src_size;
 
  138     while (
src < src_end && 
dst < dst_end) {
 
  140         for (
i = 0; 
i < 8 && 
src < src_end && 
dst < dst_end; ++
i) {
 
  141             if (
code & (1 << 
i)) {
 
  149                 sz = (cmd & 0xF) + 2;
 
  162     if (dst_end - 
dst > dst_size - dst_size/10)
 
  169                            unsigned char *
dst, 
int dst_size)
 
  172     unsigned char *dst_end       = 
dst + dst_size;
 
  173     const unsigned char *src_end = 
src + src_size;
 
  175     while (
src + 1 < src_end && 
dst < dst_end) {
 
  192     if (dst_end - 
dst > dst_size - dst_size/10)
 
  201     const uint8_t *buf   = avpkt->
data;
 
  202     int buf_size         = avpkt->
size;
 
  204     int i, y, palette_type, palette_colors_count,
 
  205         bitmap_frame_type, bitmap_frame_size, res = 0;
 
  207     palette_type         = buf[0];
 
  208     palette_colors_count = 
AV_RL16(buf + 1);
 
  209     bitmap_frame_type    = buf[3];
 
  212     bitmap_frame_size = buf_size - 4;
 
  215     if (bitmap_frame_size < palette_colors_count * (3 + (palette_type != 0)))
 
  217     if (palette_type == 0) {
 
  218         if (palette_colors_count > 256)
 
  220         for (
i = 0; 
i < palette_colors_count; ++
i) {
 
  221             cin->
palette[
i]    = 0xFF
U << 24 | bytestream_get_le24(&buf);
 
  222             bitmap_frame_size -= 3;
 
  225         for (
i = 0; 
i < palette_colors_count; ++
i) {
 
  228             bitmap_frame_size   -= 4;
 
  234     switch (bitmap_frame_type) {
 
  297 #if FF_API_PALETTE_HAS_CHANGED 
  330     .
p.
name         = 
"dsicinvideo",
 
  
#define FF_ENABLE_DEPRECATION_WARNINGS
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
attribute_deprecated int palette_has_changed
Tell user application that palette has changed from previous frame.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
This structure describes decoded (raw) audio or video data.
static av_cold void destroy_buffers(CinVideoContext *cin)
@ AV_CODEC_ID_DSICINVIDEO
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
AVCodec p
The public AVCodec.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void cin_apply_delta_data(const unsigned char *src, unsigned char *dst, int size)
#define FF_CODEC_DECODE_CB(func)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
uint8_t * bitmap_table[3]
#define CODEC_LONG_NAME(str)
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
static av_cold int cinvideo_decode_end(AVCodecContext *avctx)
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
const FFCodec ff_dsicinvideo_decoder
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_RL24
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
static int cin_decode_rle(const unsigned char *src, int src_size, unsigned char *dst, int dst_size)
#define i(width, name, range_min, range_max)
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some it can consider them to be part of the FIFO and delay acknowledging a status change accordingly Example code
static av_cold int cinvideo_decode_init(AVCodecContext *avctx)
static av_cold int allocate_buffers(CinVideoContext *cin)
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
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.
#define FFSWAP(type, a, b)
main external API structure.
static int cin_decode_lzss(const unsigned char *src, int src_size, unsigned char *dst, int dst_size)
int discard_damaged_percentage
The percentage of damaged samples to discard a frame.
#define FF_DISABLE_DEPRECATION_WARNINGS
This structure stores compressed data.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int cinvideo_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
static int cin_decode_huffman(const unsigned char *src, int src_size, unsigned char *dst, int dst_size)