Smacker decoder. More...
#include <stdio.h>
#include <stdlib.h>
#include "avcodec.h"
#include "libavutil/audioconvert.h"
#include "mathops.h"
#include "get_bits.h"
#include "bytestream.h"
Go to the source code of this file.
Data Structures | |
struct | SmackVContext |
struct | HuffContext |
Context used for code reconstructing. More... | |
struct | DBCtx |
struct | SmackerAudioContext |
Defines | |
#define | BITSTREAM_READER_LE |
#define | SMKTREE_BITS 9 |
#define | SMK_NODE 0x80000000 |
Typedefs | |
typedef struct SmackVContext | SmackVContext |
typedef struct HuffContext | HuffContext |
Context used for code reconstructing. | |
typedef struct DBCtx | DBCtx |
typedef struct SmackerAudioContext | SmackerAudioContext |
Enumerations | |
enum | SmkBlockTypes { SMK_BLK_MONO = 0, SMK_BLK_FULL = 1, SMK_BLK_SKIP = 2, SMK_BLK_FILL = 3 } |
Functions | |
static int | smacker_decode_tree (GetBitContext *gb, HuffContext *hc, uint32_t prefix, int length) |
Decode local frame tree. | |
static int | smacker_decode_bigtree (GetBitContext *gb, HuffContext *hc, DBCtx *ctx) |
Decode header tree. | |
static int | smacker_decode_header_tree (SmackVContext *smk, GetBitContext *gb, int **recodes, int *last, int size) |
Store large tree as FFmpeg's vlc codes. | |
static int | decode_header_trees (SmackVContext *smk) |
static av_always_inline void | last_reset (int *recode, int *last) |
static av_always_inline int | smk_get_code (GetBitContext *gb, int *recode, int *last) |
static int | decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) |
static av_cold int | decode_init (AVCodecContext *avctx) |
static av_cold int | decode_end (AVCodecContext *avctx) |
static av_cold int | smka_decode_init (AVCodecContext *avctx) |
static int | smka_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) |
Decode Smacker audio data. | |
Variables | |
static const int | block_runs [64] |
AVCodec | ff_smacker_decoder |
AVCodec | ff_smackaud_decoder |
Smacker decoder.
Definition in file smacker.c.
#define BITSTREAM_READER_LE |
#define SMK_NODE 0x80000000 |
Definition at line 43 of file smacker.c.
Referenced by smacker_decode_bigtree(), and smk_get_code().
#define SMKTREE_BITS 9 |
Definition at line 42 of file smacker.c.
Referenced by smacker_decode_bigtree(), smacker_decode_header_tree(), and smka_decode_frame().
typedef struct HuffContext HuffContext |
Context used for code reconstructing.
typedef struct SmackerAudioContext SmackerAudioContext |
typedef struct SmackVContext SmackVContext |
enum SmkBlockTypes |
static av_cold int decode_end | ( | AVCodecContext * | avctx | ) | [static] |
static int decode_frame | ( | AVCodecContext * | avctx, |
void * | data, | ||
int * | data_size, | ||
AVPacket * | avpkt | ||
) | [static] |
static int decode_header_trees | ( | SmackVContext * | smk | ) | [static] |
Definition at line 288 of file smacker.c.
Referenced by decode_init().
static av_cold int decode_init | ( | AVCodecContext * | avctx | ) | [static] |
static av_always_inline void last_reset | ( | int * | recode, |
int * | last | ||
) | [static] |
Definition at line 339 of file smacker.c.
Referenced by decode_frame().
static int smacker_decode_bigtree | ( | GetBitContext * | gb, |
HuffContext * | hc, | ||
DBCtx * | ctx | ||
) | [static] |
Decode header tree.
Definition at line 129 of file smacker.c.
Referenced by smacker_decode_header_tree().
static int smacker_decode_header_tree | ( | SmackVContext * | smk, |
GetBitContext * | gb, | ||
int ** | recodes, | ||
int * | last, | ||
int | size | ||
) | [static] |
Store large tree as FFmpeg's vlc codes.
Definition at line 178 of file smacker.c.
Referenced by decode_header_trees().
static int smacker_decode_tree | ( | GetBitContext * | gb, |
HuffContext * | hc, | ||
uint32_t | prefix, | ||
int | length | ||
) | [static] |
Decode local frame tree.
Definition at line 97 of file smacker.c.
Referenced by smacker_decode_header_tree(), and smka_decode_frame().
static av_always_inline int smk_get_code | ( | GetBitContext * | gb, |
int * | recode, | ||
int * | last | ||
) | [static] |
Definition at line 344 of file smacker.c.
Referenced by decode_frame().
static int smka_decode_frame | ( | AVCodecContext * | avctx, |
void * | data, | ||
int * | got_frame_ptr, | ||
AVPacket * | avpkt | ||
) | [static] |
static av_cold int smka_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
const int block_runs[64] [static] |
{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 128, 256, 512, 1024, 2048 }
Definition at line 78 of file smacker.c.
Referenced by decode_frame().
{ .name = "smackaud", .type = AVMEDIA_TYPE_AUDIO, .id = CODEC_ID_SMACKAUDIO, .priv_data_size = sizeof(SmackerAudioContext), .init = smka_decode_init, .decode = smka_decode_frame, .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Smacker audio"), }
{ .name = "smackvid", .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_SMACKVIDEO, .priv_data_size = sizeof(SmackVContext), .init = decode_init, .close = decode_end, .decode = decode_frame, .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Smacker video"), }