FFmpeg
Data Structures | Macros | Functions | Variables
roqaudioenc.c File Reference
#include "avcodec.h"
#include "bytestream.h"
#include "encode.h"
#include "internal.h"
#include "mathops.h"

Go to the source code of this file.

Data Structures

struct  ROQDPCMContext
 

Macros

#define ROQ_FRAME_SIZE   735
 
#define ROQ_HEADER_SIZE   8
 
#define MAX_DPCM   (127*127)
 

Functions

static av_cold int roq_dpcm_encode_close (AVCodecContext *avctx)
 
static av_cold int roq_dpcm_encode_init (AVCodecContext *avctx)
 
static unsigned char dpcm_predict (short *previous, short current)
 
static int roq_dpcm_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 

Variables

const AVCodec ff_roq_dpcm_encoder
 

Macro Definition Documentation

◆ ROQ_FRAME_SIZE

#define ROQ_FRAME_SIZE   735

Definition at line 30 of file roqaudioenc.c.

◆ ROQ_HEADER_SIZE

#define ROQ_HEADER_SIZE   8

Definition at line 31 of file roqaudioenc.c.

◆ MAX_DPCM

#define MAX_DPCM   (127*127)

Definition at line 33 of file roqaudioenc.c.

Function Documentation

◆ roq_dpcm_encode_close()

static av_cold int roq_dpcm_encode_close ( AVCodecContext avctx)
static

Definition at line 45 of file roqaudioenc.c.

◆ roq_dpcm_encode_init()

static av_cold int roq_dpcm_encode_init ( AVCodecContext avctx)
static

Definition at line 54 of file roqaudioenc.c.

◆ dpcm_predict()

static unsigned char dpcm_predict ( short previous,
short  current 
)
static

Definition at line 81 of file roqaudioenc.c.

Referenced by roq_dpcm_encode_frame().

◆ roq_dpcm_encode_frame()

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

Definition at line 121 of file roqaudioenc.c.

Variable Documentation

◆ ff_roq_dpcm_encoder

const AVCodec ff_roq_dpcm_encoder
Initial value:
= {
.name = "roq_dpcm",
.long_name = NULL_IF_CONFIG_SMALL("id RoQ DPCM"),
.priv_data_size = sizeof(ROQDPCMContext),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 188 of file roqaudioenc.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:948
ROQDPCMContext
Definition: roqaudioenc.c:36
init
static int init
Definition: av_tx.c:47
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AV_CODEC_ID_ROQ_DPCM
@ AV_CODEC_ID_ROQ_DPCM
Definition: codec_id.h:414
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
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
roq_dpcm_encode_init
static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
Definition: roqaudioenc.c:54
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
roq_dpcm_encode_frame
static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: roqaudioenc.c:121
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
AV_SAMPLE_FMT_S16
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition: samplefmt.h:61
AV_CODEC_CAP_DELAY
#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: codec.h:82
roq_dpcm_encode_close
static av_cold int roq_dpcm_encode_close(AVCodecContext *avctx)
Definition: roqaudioenc.c:45