libavcodec/diracdec.c File Reference

Dirac Decoder. More...

#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
#include "bytestream.h"
#include "internal.h"
#include "golomb.h"
#include "dirac_arith.h"
#include "mpeg12data.h"
#include "dirac_dwt.h"
#include "dirac.h"
#include "diracdsp.h"
#include "videodsp.h"
Include dependency graph for libavcodec/diracdec.c:

Go to the source code of this file.

Data Structures

struct  DiracFrame
 
struct  DiracBlock
 
struct  SubBand
 
struct  Plane
 
struct  DiracContext
 
struct  lowdelay_slice
 

Macros

#define MAX_DWT_LEVELS   5
 The spec limits the number of wavelet decompositions to 4 for both level 1 (VC-2) and 128 (long-gop default). More...
 
#define MAX_REFERENCE_FRAMES   8
 The spec limits this to 3 for frame coding, but in practice can be as high as 6. More...
 
#define MAX_DELAY   5 /* limit for main profile for frame coding (TODO: field coding) */
 
#define MAX_FRAMES   (MAX_REFERENCE_FRAMES + MAX_DELAY + 1)
 
#define MAX_QUANT   68 /* max quant for VC-2 */
 
#define MAX_BLOCKSIZE   32 /* maximum xblen/yblen we support */
 
#define DIRAC_REF_MASK_REF1   1
 DiracBlock->ref flags, if set then the block does MC from the given ref. More...
 
#define DIRAC_REF_MASK_REF2   2
 
#define DIRAC_REF_MASK_GLOBAL   4
 
#define DELAYED_PIC_REF   4
 Value of Picture.reference when Picture is not a reference picture, but is held for delayed output. More...
 
#define ff_emulated_edge_mc   ff_emulated_edge_mc_8 /* Fix: change the calls to this function regarding bit depth */
 
#define CALC_PADDING(size, depth)   (((size + (1 << depth) - 1) >> depth) << depth)
 
#define DIVRNDUP(a, b)   (((a) + (b) - 1) / (b))
 
#define SIGN_CTX(x)   (CTX_SIGN_ZERO + ((x) > 0) - ((x) < 0))
 
#define CHECKEDREAD(dst, cond, errmsg)
 
#define ROLLOFF(i)
 
#define DATA_UNIT_HEADER_SIZE   13
 Dirac Specification -> 9.6 Parse Info Header Syntax. More...
 

Typedefs

typedef struct SubBand SubBand
 
typedef struct Plane Plane
 
typedef struct DiracContext DiracContext
 

Enumerations

enum  dirac_parse_code { pc_seq_header = 0x00, pc_eos = 0x10, pc_aux_data = 0x20, pc_padding = 0x30 }
 Dirac Specification -> Parse code values. More...
 
enum  dirac_subband { subband_ll = 0, subband_hl = 1, subband_lh = 2, subband_hh = 3 }
 

Functions

static int divide3 (int x)
 
static DiracFrameremove_frame (DiracFrame *framelist[], int picnum)
 
static int add_frame (DiracFrame *framelist[], int maxframes, DiracFrame *frame)
 
static int alloc_sequence_buffers (DiracContext *s)
 
static void free_sequence_buffers (DiracContext *s)
 
static av_cold int dirac_decode_init (AVCodecContext *avctx)
 
static void dirac_decode_flush (AVCodecContext *avctx)
 
static av_cold int dirac_decode_end (AVCodecContext *avctx)
 
static void coeff_unpack_arith (DiracArith *c, int qfactor, int qoffset, SubBand *b, IDWTELEM *buf, int x, int y)
 
static int coeff_unpack_golomb (GetBitContext *gb, int qfactor, int qoffset)
 
static void codeblock (DiracContext *s, SubBand *b, GetBitContext *gb, DiracArith *c, int left, int right, int top, int bottom, int blockcnt_one, int is_arith)
 Decode the coeffs in the rectangle defined by left, right, top, bottom [DIRAC_STD] 13.4.3.2 Codeblock unpacking loop. More...
 
static void intra_dc_prediction (SubBand *b)
 Dirac Specification -> 13.3 intra_dc_prediction(band) More...
 
static av_always_inline void decode_subband_internal (DiracContext *s, SubBand *b, int is_arith)
 Dirac Specification -> 13.4.2 Non-skipped subbands. More...
 
static int decode_subband_arith (AVCodecContext *avctx, void *b)
 
static int decode_subband_golomb (AVCodecContext *avctx, void *arg)
 
static void decode_component (DiracContext *s, int comp)
 Dirac Specification -> [DIRAC_STD] 13.4.1 core_transform_data() More...
 
static void lowdelay_subband (DiracContext *s, GetBitContext *gb, int quant, int slice_x, int slice_y, int bits_end, SubBand *b1, SubBand *b2)
 
static int decode_lowdelay_slice (AVCodecContext *avctx, void *arg)
 Dirac Specification -> 13.5.2 Slices. More...
 
static void decode_lowdelay (DiracContext *s)
 Dirac Specification -> 13.5.1 low_delay_transform_data() More...
 
static void init_planes (DiracContext *s)
 
static int dirac_unpack_prediction_parameters (DiracContext *s)
 Unpack the motion compensation parameters Dirac Specification -> 11.2 Picture prediction data. More...
 
static int dirac_unpack_idwt_params (DiracContext *s)
 Dirac Specification -> 11.3 Wavelet transform data. More...
 
static int pred_sbsplit (uint8_t *sbsplit, int stride, int x, int y)
 
static int pred_block_mode (DiracBlock *block, int stride, int x, int y, int refmask)
 
static void pred_block_dc (DiracBlock *block, int stride, int x, int y)
 
static void pred_mv (DiracBlock *block, int stride, int x, int y, int ref)
 
static void global_mv (DiracContext *s, DiracBlock *block, int x, int y, int ref)
 
static void decode_block_params (DiracContext *s, DiracArith arith[8], DiracBlock *block, int stride, int x, int y)
 
static void propagate_block_data (DiracBlock *block, int stride, int size)
 Copies the current block to the other blocks covered by the current superblock split mode. More...
 
static int dirac_unpack_block_motion_data (DiracContext *s)
 Dirac Specification -> More...
 
static int weight (int i, int blen, int offset)
 
static void init_obmc_weight_row (Plane *p, uint8_t *obmc_weight, int stride, int left, int right, int wy)
 
static void init_obmc_weight (Plane *p, uint8_t *obmc_weight, int stride, int left, int right, int top, int bottom)
 
static void init_obmc_weights (DiracContext *s, Plane *p, int by)
 
static int mc_subpel (DiracContext *s, DiracBlock *block, const uint8_t *src[5], int x, int y, int ref, int plane)
 For block x,y, determine which of the hpel planes to do bilinear interpolation from and set src[] to the location in each hpel plane to MC from. More...
 
static void add_dc (uint16_t *dst, int dc, int stride, uint8_t *obmc_weight, int xblen, int yblen)
 
static void block_mc (DiracContext *s, DiracBlock *block, uint16_t *mctmp, uint8_t *obmc_weight, int plane, int dstx, int dsty)
 
static void mc_row (DiracContext *s, DiracBlock *block, uint16_t *mctmp, int plane, int dsty)
 
static void select_dsp_funcs (DiracContext *s, int width, int height, int xblen, int yblen)
 
static void interpolate_refplane (DiracContext *s, DiracFrame *ref, int plane, int width, int height)
 
static int dirac_decode_frame_internal (DiracContext *s)
 Dirac Specification -> 13.0 Transform data syntax. More...
 
static int dirac_decode_picture_header (DiracContext *s)
 Dirac Specification -> 11.1.1 Picture Header. More...
 
static int get_delayed_pic (DiracContext *s, AVFrame *picture, int *got_frame)
 
static int dirac_decode_data_unit (AVCodecContext *avctx, const uint8_t *buf, int size)
 
static int dirac_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
 

Variables

static const uint8_t default_qmat [][4][4]
 
static const int qscale_tab [MAX_QUANT+1]
 
static const int qoffset_intra_tab [MAX_QUANT+1]
 
static const int qoffset_inter_tab [MAX_QUANT+1]
 
static const uint8_t epel_weights [4][4][4]
 
AVCodec ff_dirac_decoder
 

Detailed Description

Dirac Decoder.

Author
Marco Gerards marco.nosp@m.@gnu.nosp@m..org, David Conrad, Jordi Ortiz nenjo.nosp@m.rdi@.nosp@m.gmail.nosp@m..com

Definition in file libavcodec/diracdec.c.

Macro Definition Documentation

#define CALC_PADDING (   size,
  depth 
)    (((size + (1 << depth) - 1) >> depth) << depth)

Definition at line 77 of file libavcodec/diracdec.c.

Referenced by alloc_sequence_buffers(), and init_planes().

#define CHECKEDREAD (   dst,
  cond,
  errmsg 
)
Value:
if (cond) { \
av_log(s->avctx, AV_LOG_ERROR, errmsg); \
return -1; \
}\
dst = tmp;
const char * s
Definition: avisynth_c.h:668
static unsigned svq3_get_ue_golomb(GetBitContext *gb)
Definition: golomb.h:114
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
void av_log(void *avcl, int level, const char *fmt,...)
Definition: log.c:246
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:148
else dst[i][x+y *dst_stride[i]]
Definition: vf_mcdeint.c:160
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return it should return

Referenced by dirac_unpack_idwt_params().

#define DATA_UNIT_HEADER_SIZE   13

Dirac Specification -> 9.6 Parse Info Header Syntax.

parse_info() 4 byte start code + byte parse code + 4 byte size + 4 byte previous size

Definition at line 1742 of file libavcodec/diracdec.c.

Referenced by dirac_decode_data_unit(), and dirac_decode_frame().

#define DELAYED_PIC_REF   4

Value of Picture.reference when Picture is not a reference picture, but is held for delayed output.

Definition at line 73 of file libavcodec/diracdec.c.

Referenced by decode_frame(), decode_postinit(), decode_slice_header(), dirac_decode_frame(), dirac_decode_picture_header(), get_delayed_pic(), pic_is_unused(), and unreference_pic().

#define DIRAC_REF_MASK_GLOBAL   4

Definition at line 67 of file libavcodec/diracdec.c.

Referenced by decode_block_params(), and pred_mv().

#define DIRAC_REF_MASK_REF1   1

DiracBlock->ref flags, if set then the block does MC from the given ref.

Definition at line 65 of file libavcodec/diracdec.c.

Referenced by decode_block_params().

#define DIRAC_REF_MASK_REF2   2

Definition at line 66 of file libavcodec/diracdec.c.

Referenced by decode_block_params().

#define DIVRNDUP (   a,
  b 
)    (((a) + (b) - 1) / (b))

Definition at line 80 of file libavcodec/diracdec.c.

Referenced by alloc_sequence_buffers(), and dirac_unpack_block_motion_data().

#define ff_emulated_edge_mc   ff_emulated_edge_mc_8 /* Fix: change the calls to this function regarding bit depth */

Definition at line 75 of file libavcodec/diracdec.c.

Referenced by mc_subpel().

#define MAX_BLOCKSIZE   32 /* maximum xblen/yblen we support */
#define MAX_DELAY   5 /* limit for main profile for frame coding (TODO: field coding) */

Definition at line 57 of file libavcodec/diracdec.c.

Referenced by dirac_decode_frame().

#define MAX_DWT_LEVELS   5

The spec limits the number of wavelet decompositions to 4 for both level 1 (VC-2) and 128 (long-gop default).

5 decompositions is the maximum before >16-bit buffers are needed. Schroedinger allows this for DD 9,7 and 13,7 wavelets only, limiting the others to 4 decompositions (or 3 for the fidelity filter).

We use this instead of MAX_DECOMPOSITIONS to save some memory.

Definition at line 51 of file libavcodec/diracdec.c.

Referenced by alloc_sequence_buffers(), decode_component(), and dirac_unpack_idwt_params().

#define MAX_QUANT   68 /* max quant for VC-2 */

Definition at line 59 of file libavcodec/diracdec.c.

Referenced by codeblock(), and lowdelay_subband().

#define MAX_REFERENCE_FRAMES   8

The spec limits this to 3 for frame coding, but in practice can be as high as 6.

Definition at line 56 of file libavcodec/diracdec.c.

Referenced by dirac_decode_picture_header().

#define ROLLOFF (   i)
Value:
offset == 1 ? ((i) ? 5 : 3) : \
(1 + (6*(i) + offset - 1) / (2*offset - 1))
static const uint8_t offset[127][2]
Definition: vf_spp.c:70
synthesis window for stochastic i

Referenced by weight().

#define SIGN_CTX (   x)    (CTX_SIGN_ZERO + ((x) > 0) - ((x) < 0))

Definition at line 424 of file libavcodec/diracdec.c.

Referenced by coeff_unpack_arith().

Typedef Documentation

typedef struct DiracContext DiracContext
typedef struct Plane Plane
typedef struct SubBand SubBand

Enumeration Type Documentation

Dirac Specification -> Parse code values.

9.6.1 Table 9.1

Enumerator
pc_seq_header 
pc_eos 
pc_aux_data 
pc_padding 

Definition at line 225 of file libavcodec/diracdec.c.

Enumerator
subband_ll 
subband_hl 
subband_lh 
subband_hh 

Definition at line 232 of file libavcodec/diracdec.c.

Function Documentation

static void add_dc ( uint16_t *  dst,
int  dc,
int  stride,
uint8_t obmc_weight,
int  xblen,
int  yblen 
)
static

Definition at line 1426 of file libavcodec/diracdec.c.

Referenced by block_mc().

static int add_frame ( DiracFrame framelist[],
int  maxframes,
DiracFrame frame 
)
static

Definition at line 306 of file libavcodec/diracdec.c.

Referenced by dirac_decode_frame(), and dirac_decode_picture_header().

static int alloc_sequence_buffers ( DiracContext s)
static

Definition at line 317 of file libavcodec/diracdec.c.

Referenced by dirac_decode_data_unit().

static void block_mc ( DiracContext s,
DiracBlock block,
uint16_t *  mctmp,
uint8_t obmc_weight,
int  plane,
int  dstx,
int  dsty 
)
static

Definition at line 1442 of file libavcodec/diracdec.c.

Referenced by mc_row().

static void codeblock ( DiracContext s,
SubBand b,
GetBitContext gb,
DiracArith c,
int  left,
int  right,
int  top,
int  bottom,
int  blockcnt_one,
int  is_arith 
)
inlinestatic

Decode the coeffs in the rectangle defined by left, right, top, bottom [DIRAC_STD] 13.4.3.2 Codeblock unpacking loop.

codeblock()

Definition at line 475 of file libavcodec/diracdec.c.

Referenced by decode_subband_internal().

static void coeff_unpack_arith ( DiracArith c,
int  qfactor,
int  qoffset,
SubBand b,
IDWTELEM buf,
int  x,
int  y 
)
inlinestatic

Definition at line 426 of file libavcodec/diracdec.c.

Referenced by codeblock().

static int coeff_unpack_golomb ( GetBitContext gb,
int  qfactor,
int  qoffset 
)
inlinestatic

Definition at line 458 of file libavcodec/diracdec.c.

Referenced by codeblock(), and lowdelay_subband().

static void decode_block_params ( DiracContext s,
DiracArith  arith[8],
DiracBlock block,
int  stride,
int  x,
int  y 
)
static

Definition at line 1133 of file libavcodec/diracdec.c.

Referenced by dirac_unpack_block_motion_data().

static void decode_component ( DiracContext s,
int  comp 
)
static

Dirac Specification -> [DIRAC_STD] 13.4.1 core_transform_data()

Definition at line 610 of file libavcodec/diracdec.c.

Referenced by dirac_decode_frame_internal().

static void decode_lowdelay ( DiracContext s)
static

Dirac Specification -> 13.5.1 low_delay_transform_data()

Definition at line 737 of file libavcodec/diracdec.c.

Referenced by dirac_decode_frame_internal().

static int decode_lowdelay_slice ( AVCodecContext avctx,
void arg 
)
static

Dirac Specification -> 13.5.2 Slices.

slice(sx,sy)

Definition at line 695 of file libavcodec/diracdec.c.

Referenced by decode_lowdelay().

static int decode_subband_arith ( AVCodecContext avctx,
void b 
)
static

Definition at line 591 of file libavcodec/diracdec.c.

Referenced by decode_component().

static int decode_subband_golomb ( AVCodecContext avctx,
void arg 
)
static

Definition at line 598 of file libavcodec/diracdec.c.

Referenced by decode_component().

static av_always_inline void decode_subband_internal ( DiracContext s,
SubBand b,
int  is_arith 
)
static

Dirac Specification -> 13.4.2 Non-skipped subbands.

subband_coeffs()

Definition at line 558 of file libavcodec/diracdec.c.

Referenced by decode_subband_arith(), and decode_subband_golomb().

static int dirac_decode_data_unit ( AVCodecContext avctx,
const uint8_t buf,
int  size 
)
static

Definition at line 1746 of file libavcodec/diracdec.c.

Referenced by dirac_decode_frame().

static av_cold int dirac_decode_end ( AVCodecContext avctx)
static

Definition at line 418 of file libavcodec/diracdec.c.

static void dirac_decode_flush ( AVCodecContext avctx)
static

Definition at line 410 of file libavcodec/diracdec.c.

Referenced by dirac_decode_end().

static int dirac_decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame,
AVPacket pkt 
)
static

Definition at line 1832 of file libavcodec/diracdec.c.

static int dirac_decode_frame_internal ( DiracContext s)
static

Dirac Specification -> 13.0 Transform data syntax.

transform_data()

Definition at line 1550 of file libavcodec/diracdec.c.

Referenced by dirac_decode_data_unit().

static av_cold int dirac_decode_init ( AVCodecContext avctx)
static

Definition at line 393 of file libavcodec/diracdec.c.

static int dirac_decode_picture_header ( DiracContext s)
static

Dirac Specification -> 11.1.1 Picture Header.

picture_header()

Definition at line 1635 of file libavcodec/diracdec.c.

Referenced by dirac_decode_data_unit().

static int dirac_unpack_block_motion_data ( DiracContext s)
static

Dirac Specification ->

  1. Block motion data syntax

Definition at line 1192 of file libavcodec/diracdec.c.

Referenced by dirac_decode_picture_header().

static int dirac_unpack_idwt_params ( DiracContext s)
static

Dirac Specification -> 11.3 Wavelet transform data.

wavelet_transform()

Definition at line 940 of file libavcodec/diracdec.c.

Referenced by dirac_decode_picture_header().

static int dirac_unpack_prediction_parameters ( DiracContext s)
static

Unpack the motion compensation parameters Dirac Specification -> 11.2 Picture prediction data.

picture_prediction()

Definition at line 828 of file libavcodec/diracdec.c.

Referenced by dirac_decode_picture_header().

static int divide3 ( int  x)
inlinestatic

Definition at line 283 of file libavcodec/diracdec.c.

Referenced by intra_dc_prediction(), and pred_block_dc().

static void free_sequence_buffers ( DiracContext s)
static

Definition at line 362 of file libavcodec/diracdec.c.

Referenced by dirac_decode_data_unit(), and dirac_decode_flush().

static int get_delayed_pic ( DiracContext s,
AVFrame picture,
int *  got_frame 
)
static

Definition at line 1711 of file libavcodec/diracdec.c.

Referenced by dirac_decode_frame().

static void global_mv ( DiracContext s,
DiracBlock block,
int  x,
int  y,
int  ref 
)
static

Definition at line 1117 of file libavcodec/diracdec.c.

Referenced by decode_block_params().

static void init_obmc_weight ( Plane p,
uint8_t obmc_weight,
int  stride,
int  left,
int  right,
int  top,
int  bottom 
)
static

Definition at line 1273 of file libavcodec/diracdec.c.

Referenced by init_obmc_weights().

static void init_obmc_weight_row ( Plane p,
uint8_t obmc_weight,
int  stride,
int  left,
int  right,
int  wy 
)
static

Definition at line 1259 of file libavcodec/diracdec.c.

Referenced by init_obmc_weight().

static void init_obmc_weights ( DiracContext s,
Plane p,
int  by 
)
static

Definition at line 1292 of file libavcodec/diracdec.c.

Referenced by dirac_decode_frame_internal().

static void init_planes ( DiracContext s)
static

Definition at line 775 of file libavcodec/diracdec.c.

Referenced by dirac_decode_picture_header().

static void interpolate_refplane ( DiracContext s,
DiracFrame ref,
int  plane,
int  width,
int  height 
)
static

Definition at line 1514 of file libavcodec/diracdec.c.

Referenced by dirac_decode_frame_internal().

static void intra_dc_prediction ( SubBand b)
inlinestatic

Dirac Specification -> 13.3 intra_dc_prediction(band)

Definition at line 534 of file libavcodec/diracdec.c.

Referenced by decode_lowdelay(), and decode_subband_internal().

static void lowdelay_subband ( DiracContext s,
GetBitContext gb,
int  quant,
int  slice_x,
int  slice_y,
int  bits_end,
SubBand b1,
SubBand b2 
)
static

Definition at line 646 of file libavcodec/diracdec.c.

Referenced by decode_lowdelay_slice().

static void mc_row ( DiracContext s,
DiracBlock block,
uint16_t *  mctmp,
int  plane,
int  dsty 
)
static

Definition at line 1478 of file libavcodec/diracdec.c.

Referenced by dirac_decode_frame_internal().

static int mc_subpel ( DiracContext s,
DiracBlock block,
const uint8_t src[5],
int  x,
int  y,
int  ref,
int  plane 
)
static

For block x,y, determine which of the hpel planes to do bilinear interpolation from and set src[] to the location in each hpel plane to MC from.

Returns
the index of the put_dirac_pixels_tab function to use 0 for 1 plane (fpel,hpel), 1 for 2 planes (qpel), 2 for 4 planes (qpel), and 3 for epel

Definition at line 1332 of file libavcodec/diracdec.c.

Referenced by block_mc().

static void pred_block_dc ( DiracBlock block,
int  stride,
int  x,
int  y 
)
inlinestatic

Definition at line 1048 of file libavcodec/diracdec.c.

Referenced by decode_block_params().

static int pred_block_mode ( DiracBlock block,
int  stride,
int  x,
int  y,
int  refmask 
)
inlinestatic

Definition at line 1032 of file libavcodec/diracdec.c.

Referenced by decode_block_params().

static void pred_mv ( DiracBlock block,
int  stride,
int  x,
int  y,
int  ref 
)
inlinestatic
static int pred_sbsplit ( uint8_t sbsplit,
int  stride,
int  x,
int  y 
)
inlinestatic

Definition at line 1018 of file libavcodec/diracdec.c.

Referenced by dirac_unpack_block_motion_data().

static void propagate_block_data ( DiracBlock block,
int  stride,
int  size 
)
static

Copies the current block to the other blocks covered by the current superblock split mode.

Definition at line 1173 of file libavcodec/diracdec.c.

Referenced by dirac_unpack_block_motion_data().

static DiracFrame* remove_frame ( DiracFrame framelist[],
int  picnum 
)
static

Definition at line 288 of file libavcodec/diracdec.c.

Referenced by dirac_decode_frame(), and dirac_decode_picture_header().

static void select_dsp_funcs ( DiracContext s,
int  width,
int  height,
int  xblen,
int  yblen 
)
static

Definition at line 1494 of file libavcodec/diracdec.c.

Referenced by dirac_decode_frame_internal().

static int weight ( int  i,
int  blen,
int  offset 
)
static

Variable Documentation

const uint8_t default_qmat[][4][4]
static
Initial value:
= {
{ { 5, 3, 3, 0}, { 0, 4, 4, 1}, { 0, 5, 5, 2}, { 0, 6, 6, 3} },
{ { 4, 2, 2, 0}, { 0, 4, 4, 2}, { 0, 5, 5, 3}, { 0, 7, 7, 5} },
{ { 5, 3, 3, 0}, { 0, 4, 4, 1}, { 0, 5, 5, 2}, { 0, 6, 6, 3} },
{ { 8, 4, 4, 0}, { 0, 4, 4, 0}, { 0, 4, 4, 0}, { 0, 4, 4, 0} },
{ { 8, 4, 4, 0}, { 0, 4, 4, 0}, { 0, 4, 4, 0}, { 0, 4, 4, 0} },
{ { 0, 4, 4, 8}, { 0, 8, 8, 12}, { 0, 13, 13, 17}, { 0, 17, 17, 21} },
{ { 3, 1, 1, 0}, { 0, 4, 4, 2}, { 0, 6, 6, 5}, { 0, 9, 9, 7} },
}

Definition at line 239 of file libavcodec/diracdec.c.

Referenced by dirac_unpack_idwt_params().

const uint8_t epel_weights[4][4][4]
static
Initial value:
= {
{{ 16, 0, 0, 0 },
{ 12, 4, 0, 0 },
{ 8, 8, 0, 0 },
{ 4, 12, 0, 0 }},
{{ 12, 0, 4, 0 },
{ 9, 3, 3, 1 },
{ 6, 6, 2, 2 },
{ 3, 9, 1, 3 }},
{{ 8, 0, 8, 0 },
{ 6, 2, 6, 2 },
{ 4, 4, 4, 4 },
{ 2, 6, 2, 6 }},
{{ 4, 0, 12, 0 },
{ 3, 1, 9, 3 },
{ 2, 2, 6, 6 },
{ 1, 3, 3, 9 }}
}

Definition at line 1305 of file libavcodec/diracdec.c.

Referenced by mc_subpel().

AVCodec ff_dirac_decoder
Initial value:
= {
.name = "dirac",
.priv_data_size = sizeof(DiracContext),
.capabilities = CODEC_CAP_DELAY,
.long_name = NULL_IF_CONFIG_SMALL("BBC Dirac VC-2"),
}
static av_cold int dirac_decode_end(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void dirac_decode_flush(AVCodecContext *avctx)
static av_cold int dirac_decode_init(AVCodecContext *avctx)
static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
#define CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static void flush(AVCodecContext *avctx)
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
struct DiracContext DiracContext
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868

Definition at line 1927 of file libavcodec/diracdec.c.

const int qoffset_inter_tab[MAX_QUANT+1]
static
Initial value:
= {
1, 2, 2, 3, 3, 4, 4, 5,
6, 7, 9, 10, 12, 14, 17, 20,
24, 29, 34, 41, 48, 57, 68, 81,
96, 114, 136, 162, 192, 228, 272, 323,
384, 457, 543, 646, 768, 913, 1086, 1292,
1536, 1827, 2172, 2583, 3072, 3653, 4344, 5166,
6144, 7307, 8689, 10333, 12288, 14613, 17378, 20666,
24576, 29226
}

Definition at line 271 of file libavcodec/diracdec.c.

Referenced by codeblock().

const int qoffset_intra_tab[MAX_QUANT+1]
static
Initial value:
= {
1, 2, 3, 4, 4, 5, 6, 7,
8, 10, 12, 14, 16, 19, 23, 27,
32, 38, 46, 54, 64, 76, 91, 108,
128, 152, 181, 216, 256, 305, 362, 431,
512, 609, 724, 861, 1024, 1218, 1448, 1722,
2048, 2436, 2897, 3445, 4096, 4871, 5793, 6889,
8192, 9742, 11585, 13777, 16384, 19484, 23171, 27555,
32768, 38968
}

Definition at line 260 of file libavcodec/diracdec.c.

Referenced by codeblock(), and lowdelay_subband().

const int qscale_tab[MAX_QUANT+1]
static
Initial value:
= {
4, 5, 6, 7, 8, 10, 11, 13,
16, 19, 23, 27, 32, 38, 45, 54,
64, 76, 91, 108, 128, 152, 181, 215,
256, 304, 362, 431, 512, 609, 724, 861,
1024, 1218, 1448, 1722, 2048, 2435, 2896, 3444,
4096, 4871, 5793, 6889, 8192, 9742, 11585, 13777,
16384, 19484, 23170, 27554, 32768, 38968, 46341, 55109,
65536, 77936
}

Definition at line 249 of file libavcodec/diracdec.c.

Referenced by codeblock(), and lowdelay_subband().