FFmpeg
Data Structures | Macros | Enumerations | Functions
dirac.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"

Go to the source code of this file.

Data Structures

struct  DiracVersionInfo
 
struct  AVDiracSeqHeader
 

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

Enumerations

enum  DiracParseCodes {
  DIRAC_PCODE_SEQ_HEADER = 0x00, DIRAC_PCODE_END_SEQ = 0x10, DIRAC_PCODE_AUX = 0x20, DIRAC_PCODE_PAD = 0x30,
  DIRAC_PCODE_PICTURE_CODED = 0x08, DIRAC_PCODE_PICTURE_RAW = 0x48, DIRAC_PCODE_PICTURE_LOW_DEL = 0xC8, DIRAC_PCODE_PICTURE_HQ = 0xE8,
  DIRAC_PCODE_INTER_NOREF_CO1 = 0x0A, DIRAC_PCODE_INTER_NOREF_CO2 = 0x09, DIRAC_PCODE_INTER_REF_CO1 = 0x0D, DIRAC_PCODE_INTER_REF_CO2 = 0x0E,
  DIRAC_PCODE_INTRA_REF_CO = 0x0C, DIRAC_PCODE_INTRA_REF_RAW = 0x4C, DIRAC_PCODE_INTRA_REF_PICT = 0xCC, DIRAC_PCODE_MAGIC = 0x42424344
}
 Parse code values: More...
 

Functions

int av_dirac_parse_sequence_header (AVDiracSeqHeader **dsh, const uint8_t *buf, size_t buf_size, void *log_ctx)
 Parse a Dirac sequence header. More...
 

Detailed Description

Interface to Dirac Decoder/Encoder

Author
Marco Gerards marco.nosp@m.@gnu.nosp@m..org
David Conrad
Jordi Ortiz

Definition in file dirac.h.

Macro Definition Documentation

◆ MAX_DWT_LEVELS

#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 49 of file dirac.h.

Enumeration Type Documentation

◆ DiracParseCodes

Parse code values:

Dirac Specification -> 9.6.1 Table 9.1

VC-2 Specification -> 10.4.1 Table 10.1

Enumerator
DIRAC_PCODE_SEQ_HEADER 
DIRAC_PCODE_END_SEQ 
DIRAC_PCODE_AUX 
DIRAC_PCODE_PAD 
DIRAC_PCODE_PICTURE_CODED 
DIRAC_PCODE_PICTURE_RAW 
DIRAC_PCODE_PICTURE_LOW_DEL 
DIRAC_PCODE_PICTURE_HQ 
DIRAC_PCODE_INTER_NOREF_CO1 
DIRAC_PCODE_INTER_NOREF_CO2 
DIRAC_PCODE_INTER_REF_CO1 
DIRAC_PCODE_INTER_REF_CO2 
DIRAC_PCODE_INTRA_REF_CO 
DIRAC_PCODE_INTRA_REF_RAW 
DIRAC_PCODE_INTRA_REF_PICT 
DIRAC_PCODE_MAGIC 

Definition at line 61 of file dirac.h.

Function Documentation

◆ av_dirac_parse_sequence_header()

int av_dirac_parse_sequence_header ( AVDiracSeqHeader **  dsh,
const uint8_t *  buf,
size_t  buf_size,
void *  log_ctx 
)

Parse a Dirac sequence header.

Parameters
dshthis function will allocate and fill an AVDiracSeqHeader struct and write it into this pointer. The caller must free it with av_free().
bufthe data buffer
buf_sizethe size of the data buffer in bytes
log_ctxif non-NULL, this function will log errors here
Returns
0 on success, a negative AVERROR code on failure

Definition at line 403 of file dirac.c.

Referenced by dirac_decode_data_unit(), and dirac_header().