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

Referenced by roq_dpcm_encode_init().

◆ ROQ_HEADER_SIZE

#define ROQ_HEADER_SIZE   8

Definition at line 30 of file roqaudioenc.c.

Referenced by roq_dpcm_encode_frame(), and roq_dpcm_encode_init().

◆ MAX_DPCM

#define MAX_DPCM   (127*127)

Definition at line 32 of file roqaudioenc.c.

Referenced by dpcm_predict().

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,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#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:984
static av_cold int roq_dpcm_encode_close(AVCodecContext *avctx)
Definition: roqaudioenc.c:44
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: roqaudioenc.c:126
static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
Definition: roqaudioenc.c:53
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
signed 16 bits
Definition: samplefmt.h:61
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:701

Definition at line 192 of file roqaudioenc.c.