Blender V2.61 - r43446
|
#include "AVI_avi.h"
#include <stdlib.h>
#include <string.h>
#include "jpeglib.h"
#include "jerror.h"
#include "MEM_guardedalloc.h"
#include "mjpeg.h"
Go to the source code of this file.
Defines | |
#define | PADUP(num, amt) ((num+(amt-1))&~(amt-1)) |
Functions | |
static void | jpegmemdestmgr_build (j_compress_ptr cinfo, unsigned char *buffer, int bufsize) |
static void | jpegmemsrcmgr_build (j_decompress_ptr dinfo, unsigned char *buffer, int bufsize) |
static void | add_huff_table (j_decompress_ptr dinfo, JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val) |
static void | std_huff_tables (j_decompress_ptr dinfo) |
static int | Decode_JPEG (unsigned char *inBuffer, unsigned char *outBuffer, unsigned int width, unsigned int height, int bufsize) |
static void | Compress_JPEG (int quality, unsigned char *outbuffer, unsigned char *inBuffer, int width, int height, int bufsize) |
static void | interlace (unsigned char *to, unsigned char *from, int width, int height) |
static void | deinterlace (int odd, unsigned char *to, unsigned char *from, int width, int height) |
static int | check_and_decode_jpeg (unsigned char *inbuf, unsigned char *outbuf, int width, int height, int bufsize) |
static void | check_and_compress_jpeg (int quality, unsigned char *outbuf, unsigned char *inbuf, int width, int height, int bufsize) |
void * | avi_converter_from_mjpeg (AviMovie *movie, int stream, unsigned char *buffer, int *size) |
void * | avi_converter_to_mjpeg (AviMovie *movie, int stream, unsigned char *buffer, int *size) |
static void | jpegmemdestmgr_init_destination (j_compress_ptr cinfo) |
static boolean | jpegmemdestmgr_empty_output_buffer (j_compress_ptr cinfo) |
static void | jpegmemdestmgr_term_destination (j_compress_ptr cinfo) |
static void | jpegmemsrcmgr_init_source (j_decompress_ptr dinfo) |
static boolean | jpegmemsrcmgr_fill_input_buffer (j_decompress_ptr dinfo) |
static void | jpegmemsrcmgr_skip_input_data (j_decompress_ptr dinfo, long skipcnt) |
static void | jpegmemsrcmgr_term_source (j_decompress_ptr dinfo) |
Variables | |
static int | numbytes |
Definition in file mjpeg.c.
#define PADUP | ( | num, | |
amt | |||
) | ((num+(amt-1))&~(amt-1)) |
Definition at line 46 of file mjpeg.c.
Referenced by check_and_compress_jpeg(), and check_and_decode_jpeg().
static void add_huff_table | ( | j_decompress_ptr | dinfo, |
JHUFF_TBL ** | htblptr, | ||
const UINT8 * | bits, | ||
const UINT8 * | val | ||
) | [static] |
void* avi_converter_from_mjpeg | ( | AviMovie * | movie, |
int | stream, | ||
unsigned char * | buffer, | ||
int * | size | ||
) |
Definition at line 337 of file mjpeg.c.
References check_and_decode_jpeg(), _AviMovie::header, _AviMainHeader::Height, interlace(), MEM_freeN(), MEM_mallocN(), and _AviMainHeader::Width.
Referenced by avi_format_convert().
void* avi_converter_to_mjpeg | ( | AviMovie * | movie, |
int | stream, | ||
unsigned char * | buffer, | ||
int * | size | ||
) |
Definition at line 361 of file mjpeg.c.
References check_and_compress_jpeg(), deinterlace(), _AviMovie::header, _AviMainHeader::Height, _AviMovie::interlace, MEM_freeN(), MEM_mallocN(), numbytes, _AviMovie::odd_fields, _AviStreamHeader::Quality, _AviStreamRec::sh, size(), _AviMovie::streams, and _AviMainHeader::Width.
Referenced by avi_format_convert().
static void check_and_compress_jpeg | ( | int | quality, |
unsigned char * | outbuf, | ||
unsigned char * | inbuf, | ||
int | width, | ||
int | height, | ||
int | bufsize | ||
) | [static] |
Definition at line 309 of file mjpeg.c.
References Compress_JPEG(), i, MEM_freeN(), MEM_mallocN(), and PADUP.
Referenced by avi_converter_to_mjpeg().
static int check_and_decode_jpeg | ( | unsigned char * | inbuf, |
unsigned char * | outbuf, | ||
int | width, | ||
int | height, | ||
int | bufsize | ||
) | [static] |
Definition at line 286 of file mjpeg.c.
References Decode_JPEG(), i, MEM_freeN(), MEM_mallocN(), and PADUP.
Referenced by avi_converter_from_mjpeg().
static void Compress_JPEG | ( | int | quality, |
unsigned char * | outbuffer, | ||
unsigned char * | inBuffer, | ||
int | width, | ||
int | height, | ||
int | bufsize | ||
) | [static] |
Definition at line 200 of file mjpeg.c.
References FALSE, i, jpegmemdestmgr_build(), and TRUE.
Referenced by check_and_compress_jpeg().
static int Decode_JPEG | ( | unsigned char * | inBuffer, |
unsigned char * | outBuffer, | ||
unsigned int | width, | ||
unsigned int | height, | ||
int | bufsize | ||
) | [static] |
Definition at line 147 of file mjpeg.c.
References jpegmemsrcmgr_build(), NULL, numbytes, std_huff_tables(), and TRUE.
Referenced by check_and_decode_jpeg().
static void deinterlace | ( | int | odd, |
unsigned char * | to, | ||
unsigned char * | from, | ||
int | width, | ||
int | height | ||
) | [static] |
static void interlace | ( | unsigned char * | to, |
unsigned char * | from, | ||
int | width, | ||
int | height | ||
) | [static] |
Definition at line 262 of file mjpeg.c.
References i.
Referenced by avi_converter_from_mjpeg(), and pluginapi_force_ref().
static void jpegmemdestmgr_build | ( | j_compress_ptr | cinfo, |
unsigned char * | buffer, | ||
int | bufsize | ||
) | [static] |
Definition at line 411 of file mjpeg.c.
References jpegmemdestmgr_empty_output_buffer(), jpegmemdestmgr_init_destination(), jpegmemdestmgr_term_destination(), MEM_mallocN(), and numbytes.
Referenced by Compress_JPEG().
static boolean jpegmemdestmgr_empty_output_buffer | ( | j_compress_ptr | cinfo | ) | [static] |
static void jpegmemdestmgr_init_destination | ( | j_compress_ptr | cinfo | ) | [static] |
Definition at line 393 of file mjpeg.c.
Referenced by jpegmemdestmgr_build().
static void jpegmemdestmgr_term_destination | ( | j_compress_ptr | cinfo | ) | [static] |
Definition at line 404 of file mjpeg.c.
References MEM_freeN(), and numbytes.
Referenced by jpegmemdestmgr_build().
static void jpegmemsrcmgr_build | ( | j_decompress_ptr | dinfo, |
unsigned char * | buffer, | ||
int | bufsize | ||
) | [static] |
Definition at line 464 of file mjpeg.c.
References jpegmemsrcmgr_fill_input_buffer(), jpegmemsrcmgr_init_source(), jpegmemsrcmgr_skip_input_data(), jpegmemsrcmgr_term_source(), MEM_mallocN(), and numbytes.
Referenced by Decode_JPEG().
static boolean jpegmemsrcmgr_fill_input_buffer | ( | j_decompress_ptr | dinfo | ) | [static] |
static void jpegmemsrcmgr_init_source | ( | j_decompress_ptr | dinfo | ) | [static] |
Definition at line 427 of file mjpeg.c.
Referenced by jpegmemsrcmgr_build().
static void jpegmemsrcmgr_skip_input_data | ( | j_decompress_ptr | dinfo, |
long | skipcnt | ||
) | [static] |
Definition at line 448 of file mjpeg.c.
Referenced by jpegmemsrcmgr_build().
static void jpegmemsrcmgr_term_source | ( | j_decompress_ptr | dinfo | ) | [static] |
Definition at line 457 of file mjpeg.c.
References MEM_freeN(), and numbytes.
Referenced by jpegmemsrcmgr_build().
static void std_huff_tables | ( | j_decompress_ptr | dinfo | ) | [static] |
int numbytes [static] |
Definition at line 51 of file mjpeg.c.
Referenced by avi_converter_to_mjpeg(), Decode_JPEG(), jpegmemdestmgr_build(), jpegmemdestmgr_term_destination(), jpegmemsrcmgr_build(), and jpegmemsrcmgr_term_source().