tscc2.c File Reference

TechSmith Screen Codec 2 decoder. More...

#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"
#include "internal.h"
#include "tscc2data.h"
Include dependency graph for tscc2.c:

Go to the source code of this file.

Data Structures

struct  TSCC2Context
 

Macros

#define BITSTREAM_READER_LE
 
#define DEQUANT(val, q)   ((q * val + 0x80) >> 8)
 
#define DCT1D(d0, d1, d2, d3, s0, s1, s2, s3, OP)
 
#define COL_OP(a, b)   a = b
 
#define ROW_OP(a, b)   a = ((b) + 0x20) >> 6
 

Typedefs

typedef struct TSCC2Context TSCC2Context
 

Functions

static av_cold void free_vlcs (TSCC2Context *c)
 
static av_cold int init_vlcs (TSCC2Context *c)
 
static void tscc2_idct4_put (int *in, int q[3], uint8_t *dst, int stride)
 
static int tscc2_decode_mb (TSCC2Context *c, int *q, int vlc_set, uint8_t *dst, int stride, int plane)
 
static int tscc2_decode_slice (TSCC2Context *c, int mb_y, const uint8_t *buf, int buf_size)
 
static int tscc2_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int tscc2_decode_end (AVCodecContext *avctx)
 
static av_cold int tscc2_decode_init (AVCodecContext *avctx)
 

Variables

AVCodec ff_tscc2_decoder
 

Detailed Description

TechSmith Screen Codec 2 decoder.

Definition in file tscc2.c.

Macro Definition Documentation

#define BITSTREAM_READER_LE

Definition at line 27 of file tscc2.c.

#define COL_OP (   a,
  b 
)    a = b

Definition at line 98 of file tscc2.c.

Referenced by tscc2_idct4_put().

#define DCT1D (   d0,
  d1,
  d2,
  d3,
  s0,
  s1,
  s2,
  s3,
  OP 
)
Value:
OP(d0, 5 * ((s0) + (s1) + (s2)) + 2 * (s3)); \
OP(d1, 5 * ((s0) - (s2) - (s3)) + 2 * (s1)); \
OP(d2, 5 * ((s0) - (s2) + (s3)) - 2 * (s1)); \
OP(d3, 5 * ((s0) - (s1) + (s2)) - 2 * (s3)); \
#define s2
Definition: regdef.h:39
#define s0
Definition: regdef.h:37
init variable d2
#define OP(LOAD, STORE)
Definition: hpeldsp_alpha.c:55
#define s3
Definition: regdef.h:40
#define s1
Definition: regdef.h:38

Definition at line 92 of file tscc2.c.

Referenced by tscc2_idct4_put().

#define DEQUANT (   val,
 
)    ((q * val + 0x80) >> 8)

Definition at line 91 of file tscc2.c.

Referenced by tscc2_idct4_put().

#define ROW_OP (   a,
  b 
)    a = ((b) + 0x20) >> 6

Definition at line 99 of file tscc2.c.

Referenced by tscc2_idct4_put().

Typedef Documentation

typedef struct TSCC2Context TSCC2Context

Function Documentation

static av_cold void free_vlcs ( TSCC2Context c)
static

Definition at line 47 of file tscc2.c.

Referenced by init_vlcs(), tscc2_decode_end(), and tscc2_decode_init().

static av_cold int init_vlcs ( TSCC2Context c)
static

Definition at line 58 of file tscc2.c.

Referenced by tscc2_decode_init().

static av_cold int tscc2_decode_end ( AVCodecContext avctx)
static

Definition at line 331 of file tscc2.c.

Referenced by tscc2_decode_init().

static int tscc2_decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame,
AVPacket avpkt 
)
static

Definition at line 214 of file tscc2.c.

static av_cold int tscc2_decode_init ( AVCodecContext avctx)
static

Definition at line 342 of file tscc2.c.

static int tscc2_decode_mb ( TSCC2Context c,
int *  q,
int  vlc_set,
uint8_t dst,
int  stride,
int  plane 
)
static

Definition at line 124 of file tscc2.c.

Referenced by tscc2_decode_slice().

static int tscc2_decode_slice ( TSCC2Context c,
int  mb_y,
const uint8_t buf,
int  buf_size 
)
static

Definition at line 189 of file tscc2.c.

Referenced by tscc2_decode_frame().

static void tscc2_idct4_put ( int *  in,
int  q[3],
uint8_t dst,
int  stride 
)
static

Definition at line 101 of file tscc2.c.

Referenced by tscc2_decode_mb().

Variable Documentation

AVCodec ff_tscc2_decoder
Initial value:
= {
.name = "tscc2",
.priv_data_size = sizeof(TSCC2Context),
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Codec 2"),
}
struct TSCC2Context TSCC2Context
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static int tscc2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: tscc2.c:214
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold int tscc2_decode_end(AVCodecContext *avctx)
Definition: tscc2.c:331
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
static av_cold int tscc2_decode_init(AVCodecContext *avctx)
Definition: tscc2.c:342
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868

Definition at line 374 of file tscc2.c.