75 fprintf(stderr,
"[RTDXT decompress] Failed to create GL context.\n");
88 fprintf(stderr,
"Wrong compressiong to decompress.\n");
99 if (decompressor->
decoder == NULL) {
100 fprintf(stderr,
"[RTDXT decompress] State initialization failed.\n");
155 fprintf(stderr,
"DXT decoder not configured!\n");
166 unsigned char *line_src, *line_dst;
184 memcpy(line_dst, line_src, linesize);
186 line_dst += s->
pitch;
187 line_src += linesize;
205 if(*
len >=
sizeof(
int)) {
233 if (compression !=
DXT1 && compression !=
DXT1_YUV && compression !=
DXT5) {
int vc_get_linesize(unsigned int width, codec_t codec)
struct dxt_decoder * dxt_decoder_create(enum dxt_type type, int width, int height, enum dxt_format out_format, int legacy)
int dxt_decoder_destroy(struct dxt_decoder *decoder)
int dxt_decoder_decompress(struct dxt_decoder *decoder, unsigned char *image_compressed, DXT_IMAGE_TYPE *image)
static void * dxt_glsl_decompress_init(void)
static int configure_with(struct state_decompress_rtdxt *decompressor, struct video_desc desc)
static const struct video_decompress_info dxt_glsl_info
static int dxt_glsl_decompress_get_property(void *state, int property, void *val, size_t *len)
static int dxt_glsl_decompress_get_priority(codec_t compression, struct pixfmt_desc internal, codec_t ugc)
static int dxt_glsl_decompress_reconfigure(void *state, struct video_desc desc, int rshift, int gshift, int bshift, int pitch, codec_t out_codec)
static void dxt_glsl_decompress_done(void *state)
static decompress_status dxt_glsl_decompress(void *state, unsigned char *dst, unsigned char *buffer, unsigned int src_len, int frame_seq, struct video_frame_callbacks *callbacks, struct pixfmt_desc *internal_prop)
static int dxt_get_size(int width, int height, enum dxt_type format)
bool init_gl_context(struct gl_context *context, int which)
initializes specified OpenGL context
void destroy_gl_context(struct gl_context *context)
void gl_context_make_current(struct gl_context *context)
#define DECOMPRESS_PROPERTY_ACCEPTS_CORRUPTED_FRAME
@ LIBRARY_CLASS_VIDEO_DECOMPRESS
#define REGISTER_MODULE(name, info, lclass, abi)
Registers module to global modules' registry.
decoder_func_t vc_copylineRGBA
struct dxt_decoder * decoder
struct gl_context context
unsigned int width
width of every tile (!)
unsigned int height
height of every tile (!)
Struct containing callbacks of a video_frame.
@ DXT1
S3 Texture Compression DXT1.
@ UYVY
YCbCr 422 8-bit - Cb Y0 Cr Y1.
@ DXT5
S3 Texture Compression DXT5.
@ DXT1_YUV
Structure same as DXT1, instead of RGB, YCbCr values are stored.
@ RGBA
RGBA 8-bit, big-endian.
This is an umbrella header for video functions.
API for video decompress drivers.
#define VIDEO_DECOMPRESS_ABI_VERSION