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

Dirac Decoder. More...

#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"
#include "internal.h"
#include "golomb.h"
#include "dirac_arith.h"
#include "mpeg12data.h"
#include "libavcodec/mpegvideo.h"
#include "mpegvideoencdsp.h"
#include "dirac_dwt.h"
#include "dirac.h"
#include "diractab.h"
#include "diracdsp.h"
#include "videodsp.h"

Go to the source code of this file.

Data Structures

struct  DiracFrame
 
struct  DiracBlock
 
struct  SubBand
 
struct  Plane
 
struct  DiracContext
 
struct  DiracSlice
 

Macros

#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   255 /* 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 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 UNPACK_ARITH(n, type)
 
#define INTRA_DC_PRED(n, type)
 Dirac Specification -> 13.3 intra_dc_prediction(band) More...
 
#define PARSE_VALUES(type, x, gb, ebits, buf1, buf2)
 
#define CHECKEDREAD(dst, cond, errmsg)
 
#define ROLLOFF(i)
 
#define DATA_UNIT_HEADER_SIZE   13
 Dirac Specification -> 9.6 Parse Info Header Syntax. More...
 

Enumerations

enum  dirac_subband {
  subband_ll = 0, subband_hl = 1, subband_lh = 2, subband_hh = 3,
  subband_nb
}
 

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 int alloc_buffers (DiracContext *s, int stride)
 
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 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 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 decode_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 int decode_hq_slice (AVCodecContext *avctx, void *arg)
 VC-2 Specification -> 13.5.3 hq_slice(sx,sy) More...
 
static int 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 int 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 get_buffer_with_edge (AVCodecContext *avctx, AVFrame *f, int flags)
 
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 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 diracdec.c.

Macro Definition Documentation

#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 47 of file diracdec.c.

Referenced by dirac_decode_picture_header().

#define MAX_DELAY   5 /* limit for main profile for frame coding (TODO: field coding) */

Definition at line 48 of file diracdec.c.

Referenced by dirac_decode_frame().

#define MAX_FRAMES   (MAX_REFERENCE_FRAMES + MAX_DELAY + 1)
#define MAX_QUANT   255 /* max quant for VC-2 */

Definition at line 50 of file diracdec.c.

#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.

Definition at line 56 of file diracdec.c.

Referenced by decode_block_params().

#define DIRAC_REF_MASK_REF2   2

Definition at line 57 of file diracdec.c.

Referenced by decode_block_params().

#define DIRAC_REF_MASK_GLOBAL   4

Definition at line 58 of file diracdec.c.

Referenced by decode_block_params(), and pred_mv().

#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 64 of file diracdec.c.

Referenced by decode_postinit(), dirac_decode_frame(), dirac_decode_picture_header(), ff_h264_decode_slice_header(), get_delayed_pic(), h264_decode_frame(), pic_is_unused(), and unreference_pic().

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

Definition at line 66 of file diracdec.c.

Referenced by alloc_sequence_buffers(), and init_planes().

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

Definition at line 69 of file diracdec.c.

Referenced by alloc_sequence_buffers(), and dirac_unpack_block_motion_data().

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

Definition at line 409 of file diracdec.c.

#define UNPACK_ARITH (   n,
  type 
)
Value:
static inline void coeff_unpack_arith_##n(DiracArith *c, int qfactor, int qoffset, \
SubBand *b, type *buf, int x, int y) \
{ \
int coeff, sign, sign_pred = 0, pred_ctx = CTX_ZPZN_F1; \
const int mstride = -(b->stride >> (1+b->pshift)); \
if (b->parent) { \
const type *pbuf = (type *)b->parent->ibuf; \
const int stride = b->parent->stride >> (1+b->parent->pshift); \
pred_ctx += !!pbuf[stride * (y>>1) + (x>>1)] << 1; \
} \
if (b->orientation == subband_hl) \
sign_pred = buf[mstride]; \
if (x) { \
pred_ctx += !(buf[-1] | buf[mstride] | buf[-1 + mstride]); \
if (b->orientation == subband_lh) \
sign_pred = buf[-1]; \
} else { \
pred_ctx += !buf[mstride]; \
} \
if (coeff) { \
coeff = (coeff * qfactor + qoffset) >> 2; \
sign = dirac_get_arith_bit(c, SIGN_CTX(sign_pred)); \
coeff = (coeff ^ -sign) + sign; \
} \
*buf = coeff; \
} \
#define SIGN_CTX(x)
Definition: diracdec.c:409
const char * b
Definition: vf_curves.c:109
static int dirac_get_arith_uint(DiracArith *c, int follow_ctx, int data_ctx)
Definition: dirac_arith.h:170
Definition: cfhd.h:43
int n
Definition: avisynth_c.h:547
void * buf
Definition: avisynth_c.h:553
GLint GLenum type
Definition: opengl_enc.c:105
static int dirac_get_arith_bit(DiracArith *c, int ctx)
Definition: dirac_arith.h:129
GLint GLenum GLboolean GLsizei stride
Definition: opengl_enc.c:105
if(ret< 0)
Definition: vf_mcdeint.c:282
static double c[64]
static const double coeff[2][5]
Definition: vf_owdenoise.c:71

Definition at line 461 of file diracdec.c.

#define INTRA_DC_PRED (   n,
  type 
)
Value:
static inline void intra_dc_prediction_##n(SubBand *b) \
{ \
type *buf = (type*)b->ibuf; \
int x, y; \
\
for (x = 1; x < b->width; x++) \
buf[x] += buf[x-1]; \
buf += (b->stride >> (1+b->pshift)); \
for (y = 1; y < b->height; y++) { \
buf[0] += buf[-(b->stride >> (1+b->pshift))]; \
for (x = 1; x < b->width; x++) { \
int pred = buf[x - 1] + buf[x - (b->stride >> (1+b->pshift))] + buf[x - (b->stride >> (1+b->pshift))-1]; \
buf[x] += divide3(pred); \
} \
buf += (b->stride >> (1+b->pshift)); \
} \
} \
static int divide3(int x)
Definition: diracdec.c:232
const char * b
Definition: vf_curves.c:109
Definition: cfhd.h:43
int n
Definition: avisynth_c.h:547
static const float pred[4]
Definition: siprdata.h:259
void * buf
Definition: avisynth_c.h:553
GLint GLenum type
Definition: opengl_enc.c:105
for(j=16;j >0;--j)

Dirac Specification -> 13.3 intra_dc_prediction(band)

Definition at line 574 of file diracdec.c.

#define PARSE_VALUES (   type,
  x,
  gb,
  ebits,
  buf1,
  buf2 
)
Value:
type *buf = (type *)buf1; \
buf[x] = coeff_unpack_golomb(gb, qfactor, qoffset); \
if (get_bits_count(gb) >= ebits) \
if (buf2) { \
buf = (type *)buf2; \
buf[x] = coeff_unpack_golomb(gb, qfactor, qoffset); \
if (get_bits_count(gb) >= ebits) \
} \
static int coeff_unpack_golomb(GetBitContext *gb, int qfactor, int qoffset)
Definition: diracdec.c:411
static int get_bits_count(const GetBitContext *s)
Definition: get_bits.h:212
return
void * buf
Definition: avisynth_c.h:553
GLint GLenum type
Definition: opengl_enc.c:105
if(ret< 0)
Definition: vf_mcdeint.c:282

Definition at line 693 of file diracdec.c.

Referenced by decode_subband().

#define CHECKEDREAD (   dst,
  cond,
  errmsg 
)
Value:
if (cond) { \
av_log(s->avctx, AV_LOG_ERROR, errmsg); \
}\
dst = tmp;
const char * s
Definition: avisynth_c.h:631
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
static unsigned svq3_get_ue_golomb(GetBitContext *gb)
Definition: golomb.h:115
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
return
if(ret< 0)
Definition: vf_mcdeint.c:282

Referenced by dirac_unpack_idwt_params().

#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:92

Referenced by weight().

#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 1959 of file diracdec.c.

Referenced by dirac_decode_data_unit(), and dirac_decode_frame().

Enumeration Type Documentation

Enumerator
subband_ll 
subband_hl 
subband_lh 
subband_hh 
subband_nb 

Definition at line 223 of file diracdec.c.

Function Documentation

static int divide3 ( int  x)
inlinestatic

Definition at line 232 of file diracdec.c.

Referenced by pred_block_dc().

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

Definition at line 237 of file diracdec.c.

Referenced by dirac_decode_frame(), and dirac_decode_picture_header().

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

Definition at line 255 of file diracdec.c.

Referenced by dirac_decode_frame(), and dirac_decode_picture_header().

static int alloc_sequence_buffers ( DiracContext s)
static

Definition at line 266 of file diracdec.c.

Referenced by dirac_decode_data_unit().

static int alloc_buffers ( DiracContext s,
int  stride 
)
static

Definition at line 304 of file diracdec.c.

Referenced by dirac_decode_data_unit().

static void free_sequence_buffers ( DiracContext s)
static

Definition at line 333 of file diracdec.c.

Referenced by dirac_decode_data_unit(), and dirac_decode_flush().

static av_cold int dirac_decode_init ( AVCodecContext avctx)
static

Definition at line 365 of file diracdec.c.

static void dirac_decode_flush ( AVCodecContext avctx)
static

Definition at line 389 of file diracdec.c.

Referenced by dirac_decode_end().

static av_cold int dirac_decode_end ( AVCodecContext avctx)
static

Definition at line 397 of file diracdec.c.

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

Definition at line 411 of file diracdec.c.

Referenced by codeblock().

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 497 of file diracdec.c.

Referenced by decode_subband_internal().

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 602 of file diracdec.c.

Referenced by decode_subband_arith(), and decode_subband_golomb().

static int decode_subband_arith ( AVCodecContext avctx,
void b 
)
static

Definition at line 640 of file diracdec.c.

Referenced by decode_component().

static int decode_subband_golomb ( AVCodecContext avctx,
void arg 
)
static

Definition at line 647 of file diracdec.c.

Referenced by decode_component().

static void decode_component ( DiracContext s,
int  comp 
)
static

Dirac Specification -> [DIRAC_STD] 13.4.1 core_transform_data()

Definition at line 659 of file diracdec.c.

Referenced by dirac_decode_frame_internal().

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

Definition at line 705 of file diracdec.c.

Referenced by decode_hq_slice(), and decode_lowdelay_slice().

static int decode_lowdelay_slice ( AVCodecContext avctx,
void arg 
)
static

Dirac Specification -> 13.5.2 Slices.

slice(sx,sy)

Definition at line 766 of file diracdec.c.

Referenced by decode_lowdelay().

static int decode_hq_slice ( AVCodecContext avctx,
void arg 
)
static

VC-2 Specification -> 13.5.3 hq_slice(sx,sy)

Definition at line 808 of file diracdec.c.

Referenced by decode_lowdelay().

static int decode_lowdelay ( DiracContext s)
static

Dirac Specification -> 13.5.1 low_delay_transform_data()

Definition at line 848 of file diracdec.c.

Referenced by dirac_decode_frame_internal().

static void init_planes ( DiracContext s)
static

Definition at line 928 of file 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 982 of file 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 1101 of file diracdec.c.

Referenced by dirac_decode_picture_header().

static int pred_sbsplit ( uint8_t sbsplit,
int  stride,
int  x,
int  y 
)
inlinestatic

Definition at line 1184 of file diracdec.c.

Referenced by dirac_unpack_block_motion_data().

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

Definition at line 1198 of file diracdec.c.

Referenced by decode_block_params().

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

Definition at line 1214 of file diracdec.c.

Referenced by decode_block_params().

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

Definition at line 1283 of file diracdec.c.

Referenced by decode_block_params().

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

Definition at line 1299 of file 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 1339 of file diracdec.c.

Referenced by dirac_unpack_block_motion_data().

static int dirac_unpack_block_motion_data ( DiracContext s)
static

Dirac Specification ->

  1. Block motion data syntax

Definition at line 1358 of file diracdec.c.

Referenced by dirac_decode_picture_header().

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

Definition at line 1413 of file diracdec.c.

Referenced by apply_delogo(), check_decorrelate_stereo(), dv_init_enc_block(), encode_mb_internal(), ff_h264_weight_pixels16_8_mmi(), ff_h264_weight_pixels4_8_mmi(), ff_h264_weight_pixels8_8_mmi(), ff_lpc_calc_coefs(), ff_lpc_calc_ref_coefs_f(), find_form_factor(), guess_dc(), hevc_biwgt_copy_12w_msa(), hevc_biwgt_copy_16multx4mult_msa(), hevc_biwgt_copy_4w_msa(), hevc_biwgt_copy_6w_msa(), hevc_biwgt_copy_8w_msa(), hevc_hv_biwgt_4t_4multx8mult_msa(), hevc_hv_biwgt_4t_4x2_msa(), hevc_hv_biwgt_4t_4x4_msa(), hevc_hv_biwgt_4t_6w_msa(), hevc_hv_biwgt_4t_8multx4mult_msa(), hevc_hv_biwgt_4t_8x2_msa(), hevc_hv_biwgt_4t_8x6_msa(), hevc_hz_biwgt_4t_12w_msa(), hevc_hz_biwgt_4t_16w_msa(), hevc_hz_biwgt_4t_24w_msa(), hevc_hz_biwgt_4t_32w_msa(), hevc_hz_biwgt_4t_4x2_msa(), hevc_hz_biwgt_4t_4x4_msa(), hevc_hz_biwgt_4t_4x8multiple_msa(), hevc_hz_biwgt_4t_6w_msa(), hevc_hz_biwgt_4t_8x2_msa(), hevc_hz_biwgt_4t_8x4multiple_msa(), hevc_hz_biwgt_4t_8x6_msa(), hevc_hz_biwgt_8t_16w_msa(), hevc_hz_biwgt_8t_24w_msa(), hevc_hz_biwgt_8t_32w_msa(), hevc_hz_biwgt_8t_48w_msa(), hevc_hz_biwgt_8t_4w_msa(), hevc_hz_biwgt_8t_64w_msa(), hevc_hz_biwgt_8t_8w_msa(), hevc_vt_biwgt_4t_12w_msa(), hevc_vt_biwgt_4t_16w_msa(), hevc_vt_biwgt_4t_24w_msa(), hevc_vt_biwgt_4t_32w_msa(), hevc_vt_biwgt_4t_4x2_msa(), hevc_vt_biwgt_4t_4x4_msa(), hevc_vt_biwgt_4t_4x8multiple_msa(), hevc_vt_biwgt_4t_6w_msa(), hevc_vt_biwgt_4t_8x2_msa(), hevc_vt_biwgt_4t_8x4multiple_msa(), hevc_vt_biwgt_4t_8x6_msa(), hevc_vt_biwgt_8t_12w_msa(), hevc_vt_biwgt_8t_16multx2mult_msa(), hevc_vt_biwgt_8t_4w_msa(), hevc_vt_biwgt_8t_8w_msa(), init_obmc_weight(), init_obmc_weight_row(), interpolate_lpc(), lsp_quantize(), mc_block(), silk_decode_lpc(), and try_8x8basis_TMPL().

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

Definition at line 1425 of file diracdec.c.

Referenced by init_obmc_weight().

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 1439 of file diracdec.c.

Referenced by init_obmc_weights().

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

Definition at line 1458 of file 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 1498 of file diracdec.c.

Referenced by block_mc().

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

Definition at line 1593 of file diracdec.c.

Referenced by block_mc().

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 1609 of file diracdec.c.

Referenced by mc_row().

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

Definition at line 1645 of file diracdec.c.

Referenced by dirac_decode_frame_internal().

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

Definition at line 1661 of file diracdec.c.

Referenced by dirac_decode_frame_internal().

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

Definition at line 1681 of file diracdec.c.

Referenced by dirac_decode_frame_internal().

static int dirac_decode_frame_internal ( DiracContext s)
static

Dirac Specification -> 13.0 Transform data syntax.

transform_data()

Definition at line 1722 of file diracdec.c.

Referenced by dirac_decode_data_unit().

static int get_buffer_with_edge ( AVCodecContext avctx,
AVFrame f,
int  flags 
)
static

Definition at line 1815 of file diracdec.c.

Referenced by dirac_decode_data_unit(), and dirac_decode_picture_header().

static int dirac_decode_picture_header ( DiracContext s)
static

Dirac Specification -> 11.1.1 Picture Header.

picture_header()

Definition at line 1842 of file diracdec.c.

Referenced by dirac_decode_data_unit().

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

Definition at line 1928 of file diracdec.c.

Referenced by dirac_decode_frame().

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

Definition at line 1963 of file diracdec.c.

Referenced by dirac_decode_frame().

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

Definition at line 2098 of file diracdec.c.

Variable Documentation

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 1471 of file diracdec.c.

Referenced by mc_subpel().

AVCodec ff_dirac_decoder
Initial value:
= {
.name = "dirac",
.long_name = NULL_IF_CONFIG_SMALL("BBC Dirac VC-2"),
.priv_data_size = sizeof(DiracContext),
.close = dirac_decode_end,
}
static av_cold int dirac_decode_end(AVCodecContext *avctx)
Definition: diracdec.c:397
static void flush(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void dirac_decode_flush(AVCodecContext *avctx)
Definition: diracdec.c:389
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:881
static av_cold int dirac_decode_init(AVCodecContext *avctx)
Definition: diracdec.c:365
static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
Definition: diracdec.c:2098
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: avcodec.h:923
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:572
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:856

Definition at line 2194 of file diracdec.c.