FFmpeg
Loading...
Searching...
No Matches
roqaudioenc.c File Reference
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "encode.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 FFCodec ff_roq_dpcm_encoder
 

Macro Definition Documentation

◆ ROQ_FRAME_SIZE

#define ROQ_FRAME_SIZE   735

Definition at line 31 of file roqaudioenc.c.

Referenced by roq_dpcm_encode_init().

◆ ROQ_HEADER_SIZE

#define ROQ_HEADER_SIZE   8

Definition at line 32 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 34 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 46 of file roqaudioenc.c.

◆ roq_dpcm_encode_init()

static av_cold int roq_dpcm_encode_init ( AVCodecContext * avctx)
static

Definition at line 55 of file roqaudioenc.c.

◆ dpcm_predict()

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

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

Variable Documentation

◆ ff_roq_dpcm_encoder

const FFCodec ff_roq_dpcm_encoder
Initial value:
= {
.p.name = "roq_dpcm",
CODEC_LONG_NAME("id RoQ DPCM"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
.priv_data_size = sizeof(ROQDPCMContext),
}
#define FF_CODEC_ENCODE_CB(func)
#define CODEC_LONG_NAME(str)
#define CODEC_SAMPLEFMTS(...)
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#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:79
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
@ AV_CODEC_ID_ROQ_DPCM
Definition codec_id.h:442
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition samplefmt.h:58
static av_cold int roq_dpcm_encode_close(AVCodecContext *avctx)
Definition roqaudioenc.c:46
static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
Definition roqaudioenc.c:55
static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)

Definition at line 191 of file roqaudioenc.c.