#include <stdint.h>
#include "libavcodec/hashtable.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "dxv.h"
#include "encode.h"
#include "texturedsp.h"
Go to the source code of this file.
◆ DXV_HEADER_LENGTH
      
        
          | #define DXV_HEADER_LENGTH   12 | 
      
 
 
◆ DXV_ALIGN
      
        
          | #define DXV_ALIGN | ( |  | x | ) | FFALIGN(x, 16) | 
      
 
 
◆ LOOKBACK_HT_ELEMS
      
        
          | #define LOOKBACK_HT_ELEMS   0x20202 | 
      
 
 
◆ LOOKBACK_WORDS
      
        
          | #define LOOKBACK_WORDS   0x20202 | 
      
 
 
◆ PUSH_OP
Value:    do {                                                                      \
            }                                                                 \
            value = pbc->buffer;                                              \
            bytestream2_put_le32(pbc, 0);                                     \
            state = 0;                                                        \
        }                                                                     \
        if (idx >= 0x102 * x) {                                               \
            op = 3;                                                           \
            bytestream2_put_le16(pbc, (idx / x) - 0x102);                     \
        } else if (idx >= 2 * x) {                                            \
            op = 2;                                                           \
            bytestream2_put_byte(pbc, (idx / x) - 2);                         \
        } else if (idx == x) {                                                \
            op = 1;                                                           \
        } else {                                                              \
            op = 0;                                                           \
        }                                                                     \
        state++;                                                              \
    } while (0)
Definition at line 73 of file dxvenc.c.
 
 
◆ OFFSET
◆ FLAGS
◆ dxv_compress_dxt1()
◆ dxv_encode()
◆ dxv_init()
◆ dxv_close()
◆ options
Initial value:= {
        { 
"dxt1", 
"DXT1 (Normal Quality, No Alpha)", 0, 
AV_OPT_TYPE_CONST, { .i64 = 
DXV_FMT_DXT1   }, 0, 0, 
FLAGS, .unit = 
"format" },
}
Definition at line 310 of file dxvenc.c.
 
 
◆ dxvenc_class
Initial value:= {
    .class_name = "DXV encoder",
}
Definition at line 316 of file dxvenc.c.
 
 
◆ ff_dxv_encoder
Initial value:
Definition at line 322 of file dxvenc.c.
 
 
 
#define CODEC_PIXFMTS(...)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
static const AVClass dxvenc_class
#define FF_CODEC_ENCODE_CB(func)
static int dxv_encode(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
static const AVOption options[]
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.
#define CODEC_LONG_NAME(str)
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
#define LIBAVUTIL_VERSION_INT
static av_always_inline int bytestream2_get_bytes_left_p(const PutByteContext *p)
static av_cold int dxv_close(AVCodecContext *avctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
static av_cold int dxv_init(AVCodecContext *avctx)
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
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 default value
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
@ AV_OPT_TYPE_INT
Underlying C type is int.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.