![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include "dxt_encoder.h"#include "dxt_util.h"#include "dxt_glsl.h"#include <GL/glew.h>#include <string.h>
Go to the source code of this file.
Classes | |
| struct | dxt_encoder |
Functions | |
| int | dxt_encoder_buffer_allocate (struct dxt_encoder *encoder, unsigned char **image_compressed, int *image_compressed_size) |
| int | dxt_encoder_buffer_free (unsigned char *image_compressed) |
| int | dxt_encoder_compress (struct dxt_encoder *encoder, DXT_IMAGE_TYPE *image, unsigned char *image_compressed) |
| int | dxt_encoder_compress_texture (struct dxt_encoder *encoder, int texture, unsigned char *image_compressed) |
| struct dxt_encoder * | dxt_encoder_create (enum dxt_type type, int width, int height, enum dxt_format format, int legacy) |
| int | dxt_encoder_destroy (struct dxt_encoder *encoder) |
| static int | dxt_prepare_yuv422_shader (struct dxt_encoder *encoder) |
Variables | |
| const int | FORMAT_RGB = 0 |
| const int | FORMAT_YUV = 1 |
| static GLfloat | points [] |
| int dxt_encoder_buffer_allocate | ( | struct dxt_encoder * | encoder, |
| unsigned char ** | image_compressed, | ||
| int * | image_compressed_size ) |
Documented at declaration
Definition at line 444 of file dxt_encoder.c.
References DXT_TYPE_DXT1, and DXT_TYPE_DXT5_YCOCG.
Referenced by main(), and perform_encode().
| int dxt_encoder_buffer_free | ( | unsigned char * | image_compressed | ) |
Documented at declaration
Definition at line 725 of file dxt_encoder.c.
Referenced by main(), and perform_encode().
| int dxt_encoder_compress | ( | struct dxt_encoder * | encoder, |
| DXT_IMAGE_TYPE * | image, | ||
| unsigned char * | image_compressed ) |
Documented at declaration
Definition at line 466 of file dxt_encoder.c.
References dxt_encoder_compress_texture(), DXT_FORMAT_RGB, DXT_FORMAT_RGBA, DXT_FORMAT_YUV, DXT_FORMAT_YUV422, DXT_IMAGE_GL_TYPE, TIMER_INIT, TIMER_START, and TIMER_STOP_PRINT.
Referenced by main(), and perform_encode().

| int dxt_encoder_compress_texture | ( | struct dxt_encoder * | encoder, |
| int | texture, | ||
| unsigned char * | image_compressed ) |
Compress image by DXT encoder
| encoder | Encoder structure |
| tex | texture index |
| image_compressed | Pointer to buffer where compressed image data will be placed |
Definition at line 617 of file dxt_encoder.c.
References convert, DXT_TYPE_DXT5_YCOCG, TIMER_START, and TIMER_STOP_PRINT.
Referenced by dxt_encoder_compress().
| struct dxt_encoder * dxt_encoder_create | ( | enum dxt_type | type, |
| int | width, | ||
| int | height, | ||
| enum dxt_format | format, | ||
| int | legacy ) |
Documented at declaration
Definition at line 230 of file dxt_encoder.c.
References DXT_FORMAT_RGB, DXT_FORMAT_RGBA, DXT_FORMAT_YUV, DXT_FORMAT_YUV422, dxt_prepare_yuv422_shader(), dxt_shader_create_from_source(), DXT_TYPE_DXT1, DXT_TYPE_DXT1_YUV, DXT_TYPE_DXT5_YCOCG, dxt_encoder::format, FORMAT_RGB, FORMAT_YUV, dxt_encoder::height, dxt_encoder::legacy, points, type, and dxt_encoder::width.
Referenced by main(), and perform_encode().

| int dxt_encoder_destroy | ( | struct dxt_encoder * | encoder | ) |
Documented at declaration
Definition at line 733 of file dxt_encoder.c.
References FALSE.
Referenced by main(), and perform_encode().
|
static |
Definition at line 140 of file dxt_encoder.c.
References dxt_shader_create_from_source(), and points.
Referenced by dxt_encoder_create().

| const int FORMAT_RGB = 0 |
Definition at line 70 of file dxt_encoder.c.
Referenced by dxt_encoder_create().
| const int FORMAT_YUV = 1 |
Definition at line 71 of file dxt_encoder.c.
Referenced by dxt_encoder_create().
|
static |
Copyright (c) 2011, Martin Srom All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition at line 61 of file dxt_encoder.c.
Referenced by dxt_encoder_create(), and dxt_prepare_yuv422_shader().