FFmpeg
Data Structures | Macros | Functions
pcm.c File Reference
#include "config.h"
#include "config_components.h"
#include "libavutil/attributes.h"
#include "libavutil/float_dsp.h"
#include "libavutil/reverse.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "encode.h"
#include "pcm_tablegen.h"

Go to the source code of this file.

Data Structures

struct  PCMDecode
 

Macros

#define INIT_ONCE(id, name)
 
#define ENCODE(type, endian, src, dst, n, shift, offset)
 Write PCM samples macro. More...
 
#define ENCODE_PLANAR(type, endian, dst, n, shift, offset)
 
#define DECODE(size, endian, src, dst, n, shift, offset)
 Read PCM samples macro. More...
 
#define DECODE_PLANAR(size, endian, src, dst, n, shift, offset)
 
#define PCM_ENCODER_0(id_, sample_fmt_, name_, long_name_)
 
#define PCM_ENCODER_1(id_, sample_fmt_, name_, long_name_)
 
#define PCM_ENCODER_2(cf, id, sample_fmt, name, long_name)   PCM_ENCODER_ ## cf(id, sample_fmt, name, long_name)
 
#define PCM_ENCODER_3(cf, id, sample_fmt, name, long_name)   PCM_ENCODER_2(cf, id, sample_fmt, name, long_name)
 
#define PCM_ENCODER(id, sample_fmt, name, long_name)   PCM_ENCODER_3(CONFIG_ ## id ## _ENCODER, id, sample_fmt, name, long_name)
 
#define PCM_DECODER_0(id, sample_fmt, name, long_name)
 
#define PCM_DECODER_1(id_, sample_fmt_, name_, long_name_)
 
#define PCM_DECODER_2(cf, id, sample_fmt, name, long_name)   PCM_DECODER_ ## cf(id, sample_fmt, name, long_name)
 
#define PCM_DECODER_3(cf, id, sample_fmt, name, long_name)   PCM_DECODER_2(cf, id, sample_fmt, name, long_name)
 
#define PCM_DECODER(id, sample_fmt, name, long_name)   PCM_DECODER_3(CONFIG_ ## id ## _DECODER, id, sample_fmt, name, long_name)
 
#define PCM_CODEC(id, sample_fmt_, name, long_name_)
 

Functions

static av_cold int pcm_encode_init (AVCodecContext *avctx)
 
static int pcm_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 
static av_cold int pcm_decode_init (AVCodecContext *avctx)
 
static int pcm_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
 
 PCM_CODEC (PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw, "PCM A-law / G.711 A-law")
 
 PCM_DECODER (PCM_F16LE, AV_SAMPLE_FMT_FLT, pcm_f16le, "PCM 16.8 floating point little-endian")
 
 PCM_DECODER (PCM_F24LE, AV_SAMPLE_FMT_FLT, pcm_f24le, "PCM 24.0 floating point little-endian")
 
 PCM_CODEC (PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be, "PCM 32-bit floating point big-endian")
 
 PCM_CODEC (PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le, "PCM 32-bit floating point little-endian")
 
 PCM_CODEC (PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be, "PCM 64-bit floating point big-endian")
 
 PCM_CODEC (PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit floating point little-endian")
 
 PCM_DECODER (PCM_LXF, AV_SAMPLE_FMT_S32P, pcm_lxf, "PCM signed 20-bit little-endian planar")
 
 PCM_CODEC (PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law / G.711 mu-law")
 
 PCM_CODEC (PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit")
 
 PCM_CODEC (PCM_S8_PLANAR, AV_SAMPLE_FMT_U8P, pcm_s8_planar, "PCM signed 8-bit planar")
 
 PCM_CODEC (PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian")
 
 PCM_CODEC (PCM_S16BE_PLANAR, AV_SAMPLE_FMT_S16P, pcm_s16be_planar, "PCM signed 16-bit big-endian planar")
 
 PCM_CODEC (PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian")
 
 PCM_CODEC (PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16P, pcm_s16le_planar, "PCM signed 16-bit little-endian planar")
 
 PCM_CODEC (PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be, "PCM signed 24-bit big-endian")
 
 PCM_CODEC (PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, "PCM D-Cinema audio signed 24-bit")
 
 PCM_CODEC (PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le, "PCM signed 24-bit little-endian")
 
 PCM_CODEC (PCM_S24LE_PLANAR, AV_SAMPLE_FMT_S32P, pcm_s24le_planar, "PCM signed 24-bit little-endian planar")
 
 PCM_CODEC (PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be, "PCM signed 32-bit big-endian")
 
 PCM_CODEC (PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le, "PCM signed 32-bit little-endian")
 
 PCM_CODEC (PCM_S32LE_PLANAR, AV_SAMPLE_FMT_S32P, pcm_s32le_planar, "PCM signed 32-bit little-endian planar")
 
 PCM_CODEC (PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8, "PCM unsigned 8-bit")
 
 PCM_CODEC (PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be, "PCM unsigned 16-bit big-endian")
 
 PCM_CODEC (PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le, "PCM unsigned 16-bit little-endian")
 
 PCM_CODEC (PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-bit big-endian")
 
 PCM_CODEC (PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian")
 
 PCM_CODEC (PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian")
 
 PCM_CODEC (PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian")
 
 PCM_CODEC (PCM_S64BE, AV_SAMPLE_FMT_S64, pcm_s64be, "PCM signed 64-bit big-endian")
 
 PCM_CODEC (PCM_S64LE, AV_SAMPLE_FMT_S64, pcm_s64le, "PCM signed 64-bit little-endian")
 
 PCM_CODEC (PCM_VIDC, AV_SAMPLE_FMT_S16, pcm_vidc, "PCM Archimedes VIDC")
 
 PCM_DECODER (PCM_SGA, AV_SAMPLE_FMT_U8, pcm_sga, "PCM SGA")
 

Detailed Description

PCM codecs

Definition in file pcm.c.

Macro Definition Documentation

◆ INIT_ONCE

#define INIT_ONCE (   id,
  name 
)
Value:
case AV_CODEC_ID_PCM_ ## id: \
if (CONFIG_PCM_ ## id ## _ENCODER) { \
static AVOnce init_static_once = AV_ONCE_INIT; \
ff_thread_once(&init_static_once, pcm_ ## name ## _tableinit); \
} \
break

◆ ENCODE

#define ENCODE (   type,
  endian,
  src,
  dst,
  n,
  shift,
  offset 
)
Value:
samples_ ## type = (const type *) src; \
for (; n > 0; n--) { \
register type v = (*samples_ ## type++ >> shift) + offset; \
bytestream_put_ ## endian(&dst, v); \
}

Write PCM samples macro.

Parameters
typeDatatype of native machine format
endianbytestream_put_xxx() suffix
srcSource pointer (variable name)
dstDestination pointer (variable name)
nTotal number of samples (variable name)
shiftBitshift (bits)
offsetSample value offset

Definition at line 77 of file pcm.c.

◆ ENCODE_PLANAR

#define ENCODE_PLANAR (   type,
  endian,
  dst,
  n,
  shift,
  offset 
)
Value:
n /= avctx->ch_layout.nb_channels; \
for (c = 0; c < avctx->ch_layout.nb_channels; c++) { \
int i; \
samples_ ## type = (const type *) frame->extended_data[c]; \
for (i = n; i > 0; i--) { \
register type v = (*samples_ ## type++ >> shift) + offset; \
bytestream_put_ ## endian(&dst, v); \
} \
}

Definition at line 84 of file pcm.c.

◆ DECODE

#define DECODE (   size,
  endian,
  src,
  dst,
  n,
  shift,
  offset 
)
Value:
for (; n > 0; n--) { \
uint ## size ## _t v = bytestream_get_ ## endian(&src); \
AV_WN ## size ## A(dst, (uint ## size ## _t)(v - offset) << shift); \
dst += size / 8; \
}

Read PCM samples macro.

Parameters
sizeData size of native machine format
endianbytestream_get_xxx() endian suffix
srcSource pointer (variable name)
dstDestination pointer (variable name)
nTotal number of samples (variable name)
shiftBitshift (bits)
offsetSample value offset

Definition at line 304 of file pcm.c.

◆ DECODE_PLANAR

#define DECODE_PLANAR (   size,
  endian,
  src,
  dst,
  n,
  shift,
  offset 
)
Value:
n /= channels; \
for (c = 0; c < avctx->ch_layout.nb_channels; c++) { \
int i; \
dst = frame->extended_data[c]; \
for (i = n; i > 0; i--) { \
uint ## size ## _t v = bytestream_get_ ## endian(&src); \
AV_WN ## size ## A(dst, (uint ## size ##_t)(v - offset) << shift); \
dst += size / 8; \
} \
}

Definition at line 311 of file pcm.c.

◆ PCM_ENCODER_0

#define PCM_ENCODER_0 (   id_,
  sample_fmt_,
  name_,
  long_name_ 
)

Definition at line 548 of file pcm.c.

◆ PCM_ENCODER_1

#define PCM_ENCODER_1 (   id_,
  sample_fmt_,
  name_,
  long_name_ 
)
Value:
const FFCodec ff_ ## name_ ## _encoder = { \
.p.name = #name_, \
CODEC_LONG_NAME(long_name_), \
.p.type = AVMEDIA_TYPE_AUDIO, \
.p.id = AV_CODEC_ID_ ## id_, \
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE, \
.init = pcm_encode_init, \
FF_CODEC_ENCODE_CB(pcm_encode_frame), \
.p.sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
AV_SAMPLE_FMT_NONE }, \
}

Definition at line 549 of file pcm.c.

◆ PCM_ENCODER_2

#define PCM_ENCODER_2 (   cf,
  id,
  sample_fmt,
  name,
  long_name 
)    PCM_ENCODER_ ## cf(id, sample_fmt, name, long_name)

Definition at line 563 of file pcm.c.

◆ PCM_ENCODER_3

#define PCM_ENCODER_3 (   cf,
  id,
  sample_fmt,
  name,
  long_name 
)    PCM_ENCODER_2(cf, id, sample_fmt, name, long_name)

Definition at line 565 of file pcm.c.

◆ PCM_ENCODER

#define PCM_ENCODER (   id,
  sample_fmt,
  name,
  long_name 
)    PCM_ENCODER_3(CONFIG_ ## id ## _ENCODER, id, sample_fmt, name, long_name)

Definition at line 567 of file pcm.c.

◆ PCM_DECODER_0

#define PCM_DECODER_0 (   id,
  sample_fmt,
  name,
  long_name 
)

Definition at line 570 of file pcm.c.

◆ PCM_DECODER_1

#define PCM_DECODER_1 (   id_,
  sample_fmt_,
  name_,
  long_name_ 
)
Value:
const FFCodec ff_ ## name_ ## _decoder = { \
.p.name = #name_, \
CODEC_LONG_NAME(long_name_), \
.p.type = AVMEDIA_TYPE_AUDIO, \
.p.id = AV_CODEC_ID_ ## id_, \
.priv_data_size = sizeof(PCMDecode), \
.p.sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_, \
AV_SAMPLE_FMT_NONE }, \
}

Definition at line 571 of file pcm.c.

◆ PCM_DECODER_2

#define PCM_DECODER_2 (   cf,
  id,
  sample_fmt,
  name,
  long_name 
)    PCM_DECODER_ ## cf(id, sample_fmt, name, long_name)

Definition at line 585 of file pcm.c.

◆ PCM_DECODER_3

#define PCM_DECODER_3 (   cf,
  id,
  sample_fmt,
  name,
  long_name 
)    PCM_DECODER_2(cf, id, sample_fmt, name, long_name)

Definition at line 587 of file pcm.c.

◆ PCM_DECODER

#define PCM_DECODER (   id,
  sample_fmt,
  name,
  long_name 
)    PCM_DECODER_3(CONFIG_ ## id ## _DECODER, id, sample_fmt, name, long_name)

Definition at line 589 of file pcm.c.

◆ PCM_CODEC

#define PCM_CODEC (   id,
  sample_fmt_,
  name,
  long_name_ 
)
Value:
PCM_ENCODER(id, sample_fmt_, name, long_name_); \
PCM_DECODER(id, sample_fmt_, name, long_name_)

Definition at line 592 of file pcm.c.

Function Documentation

◆ pcm_encode_init()

static av_cold int pcm_encode_init ( AVCodecContext avctx)
static

Definition at line 40 of file pcm.c.

◆ pcm_encode_frame()

static int pcm_encode_frame ( AVCodecContext avctx,
AVPacket avpkt,
const AVFrame frame,
int got_packet_ptr 
)
static

Definition at line 95 of file pcm.c.

◆ pcm_decode_init()

static av_cold int pcm_decode_init ( AVCodecContext avctx)
static

Definition at line 251 of file pcm.c.

◆ pcm_decode_frame()

static int pcm_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 323 of file pcm.c.

◆ PCM_CODEC() [1/29]

PCM_CODEC ( PCM_ALAW  ,
AV_SAMPLE_FMT_S16  ,
pcm_alaw  ,
"PCM A-law / G.711 A-law"   
)

◆ PCM_DECODER() [1/4]

PCM_DECODER ( PCM_F16LE  ,
AV_SAMPLE_FMT_FLT  ,
pcm_f16le  ,
"PCM 16.8 floating point little-endian"   
)

◆ PCM_DECODER() [2/4]

PCM_DECODER ( PCM_F24LE  ,
AV_SAMPLE_FMT_FLT  ,
pcm_f24le  ,
"PCM 24.0 floating point little-endian"   
)

◆ PCM_CODEC() [2/29]

PCM_CODEC ( PCM_F32BE  ,
AV_SAMPLE_FMT_FLT  ,
pcm_f32be  ,
"PCM 32-bit floating point big-endian"   
)

◆ PCM_CODEC() [3/29]

PCM_CODEC ( PCM_F32LE  ,
AV_SAMPLE_FMT_FLT  ,
pcm_f32le  ,
"PCM 32-bit floating point little-endian"   
)

◆ PCM_CODEC() [4/29]

PCM_CODEC ( PCM_F64BE  ,
AV_SAMPLE_FMT_DBL  ,
pcm_f64be  ,
"PCM 64-bit floating point big-endian"   
)

◆ PCM_CODEC() [5/29]

PCM_CODEC ( PCM_F64LE  ,
AV_SAMPLE_FMT_DBL  ,
pcm_f64le  ,
"PCM 64-bit floating point little-endian"   
)

◆ PCM_DECODER() [3/4]

PCM_DECODER ( PCM_LXF  ,
AV_SAMPLE_FMT_S32P  ,
pcm_lxf  ,
"PCM signed 20-bit little-endian planar  
)

◆ PCM_CODEC() [6/29]

PCM_CODEC ( PCM_MULAW  ,
AV_SAMPLE_FMT_S16  ,
pcm_mulaw  ,
"PCM mu-law / G.711 mu-law"   
)

◆ PCM_CODEC() [7/29]

PCM_CODEC ( PCM_S8  ,
AV_SAMPLE_FMT_U8  ,
pcm_s8  ,
"PCM signed 8-bit  
)

◆ PCM_CODEC() [8/29]

PCM_CODEC ( PCM_S8_PLANAR  ,
AV_SAMPLE_FMT_U8P  ,
pcm_s8_planar  ,
"PCM signed 8-bit planar  
)

◆ PCM_CODEC() [9/29]

PCM_CODEC ( PCM_S16BE  ,
AV_SAMPLE_FMT_S16  ,
pcm_s16be  ,
"PCM signed 16-bit big-endian"   
)

◆ PCM_CODEC() [10/29]

PCM_CODEC ( PCM_S16BE_PLANAR  ,
AV_SAMPLE_FMT_S16P  ,
pcm_s16be_planar  ,
"PCM signed 16-bit big-endian planar  
)

◆ PCM_CODEC() [11/29]

PCM_CODEC ( PCM_S16LE  ,
AV_SAMPLE_FMT_S16  ,
pcm_s16le  ,
"PCM signed 16-bit little-endian"   
)

◆ PCM_CODEC() [12/29]

PCM_CODEC ( PCM_S16LE_PLANAR  ,
AV_SAMPLE_FMT_S16P  ,
pcm_s16le_planar  ,
"PCM signed 16-bit little-endian planar  
)

◆ PCM_CODEC() [13/29]

PCM_CODEC ( PCM_S24BE  ,
AV_SAMPLE_FMT_S32  ,
pcm_s24be  ,
"PCM signed 24-bit big-endian"   
)

◆ PCM_CODEC() [14/29]

PCM_CODEC ( PCM_S24DAUD  ,
AV_SAMPLE_FMT_S16  ,
pcm_s24daud  ,
"PCM D-Cinema audio signed 24-bit  
)

◆ PCM_CODEC() [15/29]

PCM_CODEC ( PCM_S24LE  ,
AV_SAMPLE_FMT_S32  ,
pcm_s24le  ,
"PCM signed 24-bit little-endian"   
)

◆ PCM_CODEC() [16/29]

PCM_CODEC ( PCM_S24LE_PLANAR  ,
AV_SAMPLE_FMT_S32P  ,
pcm_s24le_planar  ,
"PCM signed 24-bit little-endian planar  
)

◆ PCM_CODEC() [17/29]

PCM_CODEC ( PCM_S32BE  ,
AV_SAMPLE_FMT_S32  ,
pcm_s32be  ,
"PCM signed 32-bit big-endian"   
)

◆ PCM_CODEC() [18/29]

PCM_CODEC ( PCM_S32LE  ,
AV_SAMPLE_FMT_S32  ,
pcm_s32le  ,
"PCM signed 32-bit little-endian"   
)

◆ PCM_CODEC() [19/29]

PCM_CODEC ( PCM_S32LE_PLANAR  ,
AV_SAMPLE_FMT_S32P  ,
pcm_s32le_planar  ,
"PCM signed 32-bit little-endian planar  
)

◆ PCM_CODEC() [20/29]

PCM_CODEC ( PCM_U8  ,
AV_SAMPLE_FMT_U8  ,
pcm_u8  ,
"PCM unsigned 8-bit  
)

◆ PCM_CODEC() [21/29]

PCM_CODEC ( PCM_U16BE  ,
AV_SAMPLE_FMT_S16  ,
pcm_u16be  ,
"PCM unsigned 16-bit big-endian"   
)

◆ PCM_CODEC() [22/29]

PCM_CODEC ( PCM_U16LE  ,
AV_SAMPLE_FMT_S16  ,
pcm_u16le  ,
"PCM unsigned 16-bit little-endian"   
)

◆ PCM_CODEC() [23/29]

PCM_CODEC ( PCM_U24BE  ,
AV_SAMPLE_FMT_S32  ,
pcm_u24be  ,
"PCM unsigned 24-bit big-endian"   
)

◆ PCM_CODEC() [24/29]

PCM_CODEC ( PCM_U24LE  ,
AV_SAMPLE_FMT_S32  ,
pcm_u24le  ,
"PCM unsigned 24-bit little-endian"   
)

◆ PCM_CODEC() [25/29]

PCM_CODEC ( PCM_U32BE  ,
AV_SAMPLE_FMT_S32  ,
pcm_u32be  ,
"PCM unsigned 32-bit big-endian"   
)

◆ PCM_CODEC() [26/29]

PCM_CODEC ( PCM_U32LE  ,
AV_SAMPLE_FMT_S32  ,
pcm_u32le  ,
"PCM unsigned 32-bit little-endian"   
)

◆ PCM_CODEC() [27/29]

PCM_CODEC ( PCM_S64BE  ,
AV_SAMPLE_FMT_S64  ,
pcm_s64be  ,
"PCM signed 64-bit big-endian"   
)

◆ PCM_CODEC() [28/29]

PCM_CODEC ( PCM_S64LE  ,
AV_SAMPLE_FMT_S64  ,
pcm_s64le  ,
"PCM signed 64-bit little-endian"   
)

◆ PCM_CODEC() [29/29]

PCM_CODEC ( PCM_VIDC  ,
AV_SAMPLE_FMT_S16  ,
pcm_vidc  ,
"PCM Archimedes VIDC"   
)

◆ PCM_DECODER() [4/4]

PCM_DECODER ( PCM_SGA  ,
AV_SAMPLE_FMT_U8  ,
pcm_sga  ,
"PCM SGA"   
)
A
#define A(x)
Definition: vpx_arith.h:28
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
FFCodec
Definition: codec_internal.h:127
FFCodec::p
AVCodec p
The public AVCodec.
Definition: codec_internal.h:131
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
PCM_ENCODER
#define PCM_ENCODER(id, sample_fmt, name, long_name)
Definition: pcm.c:567
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
channels
channels
Definition: aptx.h:31
frame
static AVFrame * frame
Definition: demux_decode.c:54
AV_ONCE_INIT
#define AV_ONCE_INIT
Definition: thread.h:203
AV_CODEC_CAP_VARIABLE_FRAME_SIZE
#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE
Audio encoder supports receiving a different number of samples in each call.
Definition: codec.h:128
pcm_decode_frame
static int pcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Definition: pcm.c:323
pcm_decode_init
static av_cold int pcm_decode_init(AVCodecContext *avctx)
Definition: pcm.c:251
AVOnce
#define AVOnce
Definition: thread.h:202
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
pcm_encode_frame
static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: pcm.c:95
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
shift
static int shift(int a, int b)
Definition: bonk.c:262
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
size
int size
Definition: twinvq_data.h:10344
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
AVFrame::extended_data
uint8_t ** extended_data
pointers to the data planes/channels.
Definition: frame.h:405
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
AVCodec::name
const char * name
Name of the codec implementation.
Definition: codec.h:194
PCMDecode
Definition: pcm.c:244
id
enum AVCodecID id
Definition: dts2pts.c:364
AV_CODEC_CAP_PARAM_CHANGE
#define AV_CODEC_CAP_PARAM_CHANGE
Codec supports changed parameters at any point.
Definition: codec.h:118
pcm_encode_init
static av_cold int pcm_encode_init(AVCodecContext *avctx)
Definition: pcm.c:40
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418