FFmpeg
Data Structures | Macros | Functions | Variables
roqaudioenc.c File Reference
#include "avcodec.h"
#include "bytestream.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

AVCodec ff_roq_dpcm_encoder
 

Macro Definition Documentation

◆ ROQ_FRAME_SIZE

#define ROQ_FRAME_SIZE   735

Definition at line 29 of file roqaudioenc.c.

◆ ROQ_HEADER_SIZE

#define ROQ_HEADER_SIZE   8

Definition at line 30 of file roqaudioenc.c.

◆ MAX_DPCM

#define MAX_DPCM   (127*127)

Definition at line 32 of file roqaudioenc.c.

Function Documentation

◆ roq_dpcm_encode_close()

static av_cold int roq_dpcm_encode_close ( AVCodecContext avctx)
static

Definition at line 44 of file roqaudioenc.c.

Referenced by roq_dpcm_encode_init().

◆ roq_dpcm_encode_init()

static av_cold int roq_dpcm_encode_init ( AVCodecContext avctx)
static

Definition at line 53 of file roqaudioenc.c.

◆ dpcm_predict()

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

Definition at line 86 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 126 of file roqaudioenc.c.

Variable Documentation

◆ ff_roq_dpcm_encoder

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

Definition at line 192 of file roqaudioenc.c.

init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:686
ROQDPCMContext
Definition: roqaudioenc.c:35
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AV_CODEC_ID_ROQ_DPCM
@ AV_CODEC_ID_ROQ_DPCM
Definition: avcodec.h:555
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:188
roq_dpcm_encode_init
static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
Definition: roqaudioenc.c:53
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:126
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: avcodec.h:1006
roq_dpcm_encode_close
static av_cold int roq_dpcm_encode_close(AVCodecContext *avctx)
Definition: roqaudioenc.c:44