#include <stdio.h>#include <stdlib.h>#include "common.h"#include "bitstream.h"#include "avcodec.h"

Go to the source code of this file.
Data Structures | |
| struct | LclContext |
Defines | |
| #define | BMPTYPE_YUV 1 |
| #define | BMPTYPE_RGB 2 |
| #define | IMGTYPE_YUV111 0 |
| #define | IMGTYPE_YUV422 1 |
| #define | IMGTYPE_RGB24 2 |
| #define | IMGTYPE_YUV411 3 |
| #define | IMGTYPE_YUV211 4 |
| #define | IMGTYPE_YUV420 5 |
| #define | COMP_MSZH 0 |
| #define | COMP_MSZH_NOCOMP 1 |
| #define | COMP_ZLIB_HISPEED 1 |
| #define | COMP_ZLIB_HICOMP 9 |
| #define | COMP_ZLIB_NORMAL -1 |
| #define | FLAG_MULTITHREAD 1 |
| #define | FLAG_NULLFRAME 2 |
| #define | FLAG_PNGFILTER 4 |
| #define | FLAGMASK_UNUSED 0xf8 |
| #define | CODEC_MSZH 1 |
| #define | CODEC_ZLIB 3 |
| #define | FOURCC_MSZH mmioFOURCC('M','S','Z','H') |
| #define | FOURCC_ZLIB mmioFOURCC('Z','L','I','B') |
Functions | |
| static unsigned char | fix (int pix14) |
| static unsigned char | get_b (unsigned char yq, signed char bq) |
| static unsigned char | get_g (unsigned char yq, signed char bq, signed char rq) |
| static unsigned char | get_r (unsigned char yq, signed char rq) |
| static unsigned int | mszh_decomp (unsigned char *srcptr, int srclen, unsigned char *destptr, unsigned int destsize) |
| static int | decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
| static int | encode_frame (AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data) |
| static int | decode_init (AVCodecContext *avctx) |
| static int | encode_init (AVCodecContext *avctx) |
| static int | decode_end (AVCodecContext *avctx) |
| static int | encode_end (AVCodecContext *avctx) |
Variables | |
| AVCodec | mszh_decoder |
| AVCodec | zlib_decoder |
Fourcc: MSZH, ZLIB
Original Win32 dll: Ver2.23 By Kenji Oshima 2000.09.20 avimszh.dll, avizlib.dll
A description of the decoding algorithm can be found here: http://www.pcisys.net/~melanson/codecs
Supports: BGR24 (RGB 24bpp)
Definition in file lcl.c.
| #define CODEC_MSZH 1 |
| #define CODEC_ZLIB 3 |
| #define COMP_MSZH 0 |
| #define COMP_MSZH_NOCOMP 1 |
| #define COMP_ZLIB_HICOMP 9 |
| #define COMP_ZLIB_HISPEED 1 |
| #define COMP_ZLIB_NORMAL -1 |
| #define FLAG_MULTITHREAD 1 |
| #define FLAG_NULLFRAME 2 |
| #define FLAG_PNGFILTER 4 |
| #define FLAGMASK_UNUSED 0xf8 |
| #define IMGTYPE_RGB24 2 |
Definition at line 57 of file lcl.c.
Referenced by decode_frame(), decode_init(), and encode_init().
| #define IMGTYPE_YUV111 0 |
| #define IMGTYPE_YUV211 4 |
| #define IMGTYPE_YUV411 3 |
| #define IMGTYPE_YUV420 5 |
| #define IMGTYPE_YUV422 1 |
| static int decode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 852 of file lcl.c.
References c, LclContext::pic, AVCodecContext::priv_data, and AVCodecContext::release_buffer.
| static int decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 199 of file lcl.c.
References av_log(), AV_LOG_ERROR, c, AVCodecContext::codec_id, CODEC_ID_MSZH, CODEC_ID_ZLIB, COMP_MSZH, COMP_MSZH_NOCOMP, COMP_ZLIB_NORMAL, LclContext::compression, LclContext::decomp_buf, LclContext::decomp_size, FF_BUFFER_HINTS_VALID, FLAG_MULTITHREAD, FLAG_PNGFILTER, LclContext::flags, get_b(), AVCodecContext::get_buffer, get_g(), get_r(), AVCodecContext::height, height, LclContext::imgtype, IMGTYPE_RGB24, IMGTYPE_YUV111, IMGTYPE_YUV211, IMGTYPE_YUV411, IMGTYPE_YUV420, IMGTYPE_YUV422, mszh_decomp(), LclContext::pic, AVCodecContext::priv_data, AVCodecContext::release_buffer, AVCodecContext::width, and width.

| static int decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 616 of file lcl.c.
References av_log(), AV_LOG_ERROR, AV_LOG_INFO, av_malloc(), avcodec_check_dimensions(), LclContext::avctx, c, AVCodecContext::codec_id, CODEC_ID_MSZH, CODEC_ID_ZLIB, CODEC_MSZH, CODEC_ZLIB, COMP_MSZH, COMP_MSZH_NOCOMP, COMP_ZLIB_HICOMP, COMP_ZLIB_HISPEED, COMP_ZLIB_NORMAL, LclContext::compression, LclContext::decomp_buf, LclContext::decomp_size, AVCodecContext::extradata, AVCodecContext::extradata_size, FLAG_MULTITHREAD, FLAG_NULLFRAME, FLAG_PNGFILTER, FLAGMASK_UNUSED, LclContext::flags, AVCodecContext::has_b_frames, AVCodecContext::height, LclContext::imgtype, IMGTYPE_RGB24, IMGTYPE_YUV111, IMGTYPE_YUV211, IMGTYPE_YUV411, IMGTYPE_YUV420, IMGTYPE_YUV422, NULL, LclContext::pic, AVCodecContext::pix_fmt, PIX_FMT_BGR24, AVCodecContext::priv_data, and AVCodecContext::width.

| static int encode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 872 of file lcl.c.
References av_freep(), c, LclContext::comp_buf, AVCodecContext::extradata, and AVCodecContext::priv_data.

| static int encode_frame | ( | AVCodecContext * | avctx, | |
| unsigned char * | buf, | |||
| int | buf_size, | |||
| void * | data | |||
| ) | [static] |
Definition at line 555 of file lcl.c.
References av_log(), AV_LOG_ERROR, c, LclContext::comp_buf, FF_I_TYPE, flush_put_bits(), AVCodecContext::height, init_put_bits(), LclContext::max_comp_size, LclContext::pb, LclContext::pic, AVCodecContext::pix_fmt, PIX_FMT_BGR24, AVCodecContext::priv_data, put_bits(), and AVCodecContext::width.

| static int encode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 780 of file lcl.c.
References av_log(), AV_LOG_ERROR, av_malloc(), av_mallocz(), LclContext::avctx, AVCodecContext::bits_per_sample, c, CODEC_ZLIB, AVCodecContext::coded_frame, LclContext::comp_buf, LclContext::compression, LclContext::decomp_size, AVCodecContext::extradata, AVCodecContext::extradata_size, LclContext::flags, AVCodecContext::height, LclContext::imgtype, IMGTYPE_RGB24, LclContext::max_comp_size, NULL, LclContext::pic, AVCodecContext::pix_fmt, PIX_FMT_BGR24, AVCodecContext::priv_data, and AVCodecContext::width.

| static unsigned char fix | ( | int | pix14 | ) | [inline, static] |
| static unsigned char get_b | ( | unsigned char | yq, | |
| signed char | bq | |||
| ) | [inline, static] |
Definition at line 127 of file lcl.c.
References fix().
Referenced by decode_frame().

| static unsigned char get_g | ( | unsigned char | yq, | |
| signed char | bq, | |||
| signed char | rq | |||
| ) | [inline, static] |
Definition at line 134 of file lcl.c.
References fix().
Referenced by decode_frame().

| static unsigned char get_r | ( | unsigned char | yq, | |
| signed char | rq | |||
| ) | [inline, static] |
Definition at line 141 of file lcl.c.
References fix().
Referenced by decode_frame().

| static unsigned int mszh_decomp | ( | unsigned char * | srcptr, | |
| int | srclen, | |||
| unsigned char * | destptr, | |||
| unsigned int | destsize | |||
| ) | [static] |
Initial value:
{
"mszh",
CODEC_TYPE_VIDEO,
CODEC_ID_MSZH,
sizeof(LclContext),
decode_init,
NULL,
decode_end,
decode_frame,
CODEC_CAP_DR1,
}
Definition at line 885 of file lcl.c.
Referenced by avcodec_register_all().
Initial value:
{
"zlib",
CODEC_TYPE_VIDEO,
CODEC_ID_ZLIB,
sizeof(LclContext),
decode_init,
NULL,
decode_end,
decode_frame,
CODEC_CAP_DR1,
}
Definition at line 898 of file lcl.c.
Referenced by avcodec_register_all().
1.5.5