FFmpeg
Data Structures | Functions | Variables
hq_hqa.c File Reference
#include <stdint.h>
#include "libavutil/attributes.h"
#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "bytestream.h"
#include "canopus.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "hq_hqadata.h"
#include "hq_hqadsp.h"
#include "vlc.h"

Go to the source code of this file.

Data Structures

struct  HQContext
 

Functions

static void put_blocks (HQContext *c, AVFrame *pic, int plane, int x, int y, int ilace, int16_t *block0, int16_t *block1)
 
static int hq_decode_block (HQContext *c, GetBitContext *gb, int16_t block[64], int qsel, int is_chroma, int is_hqa)
 
static int hq_decode_mb (HQContext *c, AVFrame *pic, GetBitContext *gb, int x, int y)
 
static int hq_decode_frame (HQContext *ctx, AVFrame *pic, GetByteContext *gbc, int prof_num, size_t data_size)
 
static int hqa_decode_mb (HQContext *c, AVFrame *pic, int qgroup, GetBitContext *gb, int x, int y)
 
static int hqa_decode_slice (HQContext *ctx, AVFrame *pic, GetBitContext *gb, int quant, int slice_no, int w, int h)
 
static int hqa_decode_frame (HQContext *ctx, AVFrame *pic, GetByteContext *gbc, size_t data_size)
 
static int hq_hqa_decode_frame (AVCodecContext *avctx, AVFrame *pic, int *got_frame, AVPacket *avpkt)
 
static av_cold void hq_init_vlcs (void)
 
static av_cold int hq_hqa_decode_init (AVCodecContext *avctx)
 

Variables

static VLCElem hq_ac_vlc [1184]
 
static VLCElem hqa_cbp_vlc [32]
 
const FFCodec ff_hq_hqa_decoder
 

Function Documentation

◆ put_blocks()

static void put_blocks ( HQContext c,
AVFrame pic,
int  plane,
int  x,
int  y,
int  ilace,
int16_t *  block0,
int16_t *  block1 
)
inlinestatic

Definition at line 63 of file hq_hqa.c.

Referenced by hq_decode_mb(), and hqa_decode_mb().

◆ hq_decode_block()

static int hq_decode_block ( HQContext c,
GetBitContext gb,
int16_t  block[64],
int  qsel,
int  is_chroma,
int  is_hqa 
)
static

Definition at line 75 of file hq_hqa.c.

Referenced by hq_decode_mb(), and hqa_decode_mb().

◆ hq_decode_mb()

static int hq_decode_mb ( HQContext c,
AVFrame pic,
GetBitContext gb,
int  x,
int  y 
)
static

Definition at line 106 of file hq_hqa.c.

Referenced by hq_decode_frame().

◆ hq_decode_frame()

static int hq_decode_frame ( HQContext ctx,
AVFrame pic,
GetByteContext gbc,
int  prof_num,
size_t  data_size 
)
static

Definition at line 129 of file hq_hqa.c.

Referenced by hq_hqa_decode_frame().

◆ hqa_decode_mb()

static int hqa_decode_mb ( HQContext c,
AVFrame pic,
int  qgroup,
GetBitContext gb,
int  x,
int  y 
)
static

Definition at line 191 of file hq_hqa.c.

Referenced by hqa_decode_slice().

◆ hqa_decode_slice()

static int hqa_decode_slice ( HQContext ctx,
AVFrame pic,
GetBitContext gb,
int  quant,
int  slice_no,
int  w,
int  h 
)
static

Definition at line 234 of file hq_hqa.c.

Referenced by hqa_decode_frame().

◆ hqa_decode_frame()

static int hqa_decode_frame ( HQContext ctx,
AVFrame pic,
GetByteContext gbc,
size_t  data_size 
)
static

Definition at line 255 of file hq_hqa.c.

Referenced by hq_hqa_decode_frame().

◆ hq_hqa_decode_frame()

static int hq_hqa_decode_frame ( AVCodecContext avctx,
AVFrame pic,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 316 of file hq_hqa.c.

◆ hq_init_vlcs()

static av_cold void hq_init_vlcs ( void  )
static

Definition at line 377 of file hq_hqa.c.

Referenced by hq_hqa_decode_init().

◆ hq_hqa_decode_init()

static av_cold int hq_hqa_decode_init ( AVCodecContext avctx)
static

Definition at line 386 of file hq_hqa.c.

Variable Documentation

◆ hq_ac_vlc

VLCElem hq_ac_vlc[1184]
static

Definition at line 60 of file hq_hqa.c.

Referenced by hq_decode_block(), and hq_init_vlcs().

◆ hqa_cbp_vlc

VLCElem hqa_cbp_vlc[32]
static

Definition at line 61 of file hq_hqa.c.

Referenced by hq_init_vlcs(), and hqa_decode_mb().

◆ ff_hq_hqa_decoder

const FFCodec ff_hq_hqa_decoder
Initial value:
= {
.p.name = "hq_hqa",
CODEC_LONG_NAME("Canopus HQ/HQA"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(HQContext),
.p.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 399 of file hq_hqa.c.

hq_hqa_decode_frame
static int hq_hqa_decode_frame(AVCodecContext *avctx, AVFrame *pic, int *got_frame, AVPacket *avpkt)
Definition: hq_hqa.c:316
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
HQContext
Definition: hq_hqa.c:53
AV_CODEC_ID_HQ_HQA
@ AV_CODEC_ID_HQ_HQA
Definition: codec_id.h:240
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
hq_hqa_decode_init
static av_cold int hq_hqa_decode_init(AVCodecContext *avctx)
Definition: hq_hqa.c:386