FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
g2meet.c File Reference

Go2Webinar decoder. More...

#include <inttypes.h>
#include <zlib.h>
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "blockdsp.h"
#include "bytestream.h"
#include "get_bits.h"
#include "idctdsp.h"
#include "internal.h"
#include "jpegtables.h"
#include "mjpeg.h"

Go to the source code of this file.

Data Structures

struct  JPGContext
 
struct  G2MContext
 

Macros

#define APPLY_ALPHA(src, new, alpha)   src = (src * (256 - alpha) + new * alpha) >> 8
 

Enumerations

enum  ChunkType {
  DISPLAY_INFO = 0xC8, TILE_DATA, CURSOR_POS, CURSOR_SHAPE,
  CHUNK_CC, CHUNK_CD, CHUNK_TYPE_DATA = 0x4424, CHUNK_TYPE_ASF_HEADER = 0x4824,
  CHUNK_TYPE_END = 0x4524, CHUNK_TYPE_STREAM_CHANGE = 0x4324
}
 
enum  Compression { COMPR_EPIC_J_B = 2, COMPR_KEMPF_J_B }
 

Functions

static av_cold int build_vlc (VLC *vlc, const uint8_t *bits_table, const uint8_t *val_table, int nb_codes, int is_ac)
 
static av_cold int jpg_init (AVCodecContext *avctx, JPGContext *c)
 
static av_cold void jpg_free_context (JPGContext *ctx)
 
static void jpg_unescape (const uint8_t *src, int src_size, uint8_t *dst, int *dst_size)
 
static int jpg_decode_block (JPGContext *c, GetBitContext *gb, int plane, int16_t *block)
 
static void yuv2rgb (uint8_t *out, int Y, int U, int V)
 
static int jpg_decode_data (JPGContext *c, int width, int height, const uint8_t *src, int src_size, uint8_t *dst, int dst_stride, const uint8_t *mask, int mask_stride, int num_mbs, int swapuv)
 
static int kempf_restore_buf (const uint8_t *src, int len, uint8_t *dst, int stride, const uint8_t *jpeg_tile, int tile_stride, int width, int height, const uint8_t *pal, int npal, int tidx)
 
static int kempf_decode_tile (G2MContext *c, int tile_x, int tile_y, const uint8_t *src, int src_size)
 
static int g2m_init_buffers (G2MContext *c)
 
static int g2m_load_cursor (AVCodecContext *avctx, G2MContext *c, GetByteContext *gb)
 
static void g2m_paint_cursor (G2MContext *c, uint8_t *dst, int stride)
 
static int g2m_decode_frame (AVCodecContext *avctx, void *data, int *got_picture_ptr, AVPacket *avpkt)
 
static av_cold int g2m_decode_init (AVCodecContext *avctx)
 
static av_cold int g2m_decode_end (AVCodecContext *avctx)
 

Variables

static const uint8_t luma_quant [64]
 
static const uint8_t chroma_quant [64]
 
AVCodec ff_g2m_decoder
 

Detailed Description

Go2Webinar decoder.

Definition in file g2meet.c.

Macro Definition Documentation

#define APPLY_ALPHA (   src,
  new,
  alpha 
)    src = (src * (256 - alpha) + new * alpha) >> 8

Definition at line 618 of file g2meet.c.

Referenced by g2m_paint_cursor().

Enumeration Type Documentation

enum ChunkType
Enumerator
DISPLAY_INFO 
TILE_DATA 
CURSOR_POS 
CURSOR_SHAPE 
CHUNK_CC 
CHUNK_CD 
CHUNK_TYPE_DATA 
CHUNK_TYPE_ASF_HEADER 
CHUNK_TYPE_END 
CHUNK_TYPE_STREAM_CHANGE 

Definition at line 41 of file g2meet.c.

Enumerator
COMPR_EPIC_J_B 
COMPR_KEMPF_J_B 

Definition at line 50 of file g2meet.c.

Function Documentation

static av_cold int build_vlc ( VLC vlc,
const uint8_t bits_table,
const uint8_t val_table,
int  nb_codes,
int  is_ac 
)
static

Definition at line 116 of file g2meet.c.

Referenced by jpg_init().

static av_cold int jpg_init ( AVCodecContext avctx,
JPGContext c 
)
static

Definition at line 137 of file g2meet.c.

Referenced by g2m_decode_init().

static av_cold void jpg_free_context ( JPGContext ctx)
static

Definition at line 166 of file g2meet.c.

Referenced by g2m_decode_end(), and g2m_decode_init().

static void jpg_unescape ( const uint8_t src,
int  src_size,
uint8_t dst,
int *  dst_size 
)
static

Definition at line 178 of file g2meet.c.

Referenced by jpg_decode_data().

static int jpg_decode_block ( JPGContext c,
GetBitContext gb,
int  plane,
int16_t *  block 
)
static

Definition at line 195 of file g2meet.c.

Referenced by jpg_decode_data().

static void yuv2rgb ( uint8_t out,
int  Y,
int  U,
int  V 
)
inlinestatic

Definition at line 232 of file g2meet.c.

Referenced by jpg_decode_data().

static int jpg_decode_data ( JPGContext c,
int  width,
int  height,
const uint8_t src,
int  src_size,
uint8_t dst,
int  dst_stride,
const uint8_t mask,
int  mask_stride,
int  num_mbs,
int  swapuv 
)
static

Definition at line 239 of file g2meet.c.

Referenced by kempf_decode_tile().

static int kempf_restore_buf ( const uint8_t src,
int  len,
uint8_t dst,
int  stride,
const uint8_t jpeg_tile,
int  tile_stride,
int  width,
int  height,
const uint8_t pal,
int  npal,
int  tidx 
)
static

Definition at line 321 of file g2meet.c.

Referenced by kempf_decode_tile().

static int kempf_decode_tile ( G2MContext c,
int  tile_x,
int  tile_y,
const uint8_t src,
int  src_size 
)
static

Definition at line 354 of file g2meet.c.

Referenced by g2m_decode_frame().

static int g2m_init_buffers ( G2MContext c)
static

Definition at line 465 of file g2meet.c.

Referenced by g2m_decode_frame().

static int g2m_load_cursor ( AVCodecContext avctx,
G2MContext c,
GetByteContext gb 
)
static

Definition at line 499 of file g2meet.c.

Referenced by g2m_decode_frame().

static void g2m_paint_cursor ( G2MContext c,
uint8_t dst,
int  stride 
)
static

Definition at line 621 of file g2meet.c.

Referenced by g2m_decode_frame().

static int g2m_decode_frame ( AVCodecContext avctx,
void data,
int *  got_picture_ptr,
AVPacket avpkt 
)
static

Definition at line 668 of file g2meet.c.

static av_cold int g2m_decode_init ( AVCodecContext avctx)
static

Definition at line 883 of file g2meet.c.

static av_cold int g2m_decode_end ( AVCodecContext avctx)
static

Definition at line 903 of file g2meet.c.

Variable Documentation

const uint8_t luma_quant[64]
static
Initial value:
= {
8, 6, 5, 8, 12, 20, 26, 31,
6, 6, 7, 10, 13, 29, 30, 28,
7, 7, 8, 12, 20, 29, 35, 28,
7, 9, 11, 15, 26, 44, 40, 31,
9, 11, 19, 28, 34, 55, 52, 39,
12, 18, 28, 32, 41, 52, 57, 46,
25, 32, 39, 44, 52, 61, 60, 51,
36, 46, 48, 49, 56, 50, 52, 50
}

Definition at line 55 of file g2meet.c.

Referenced by jpg_decode_block().

const uint8_t chroma_quant[64]
static
Initial value:
= {
9, 9, 12, 24, 50, 50, 50, 50,
9, 11, 13, 33, 50, 50, 50, 50,
12, 13, 28, 50, 50, 50, 50, 50,
24, 33, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50,
}

Definition at line 66 of file g2meet.c.

Referenced by jpg_decode_block().

AVCodec ff_g2m_decoder
Initial value:
= {
.name = "g2m",
.long_name = NULL_IF_CONFIG_SMALL("Go2Meeting"),
.priv_data_size = sizeof(G2MContext),
.close = g2m_decode_end,
.capabilities = CODEC_CAP_DR1,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:789
static av_cold int g2m_decode_init(AVCodecContext *avctx)
Definition: g2meet.c:883
static av_cold int g2m_decode_end(AVCodecContext *avctx)
Definition: g2meet.c:903
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static int g2m_decode_frame(AVCodecContext *avctx, void *data, int *got_picture_ptr, AVPacket *avpkt)
Definition: g2meet.c:668
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:522

Definition at line 919 of file g2meet.c.