FFmpeg
Loading...
Searching...
No Matches
ttaenc.c File Reference
#include "ttadata.h"
#include "ttaencdsp.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "encode.h"
#include "put_bits.h"
#include "libavutil/crc.h"
#include "libavutil/mem.h"

Go to the source code of this file.

Data Structures

struct  TTAEncContext
 

Macros

#define BITSTREAM_WRITER_LE
 
#define PRED(x, k)
 

Functions

static av_cold int tta_encode_init (AVCodecContext *avctx)
 
static int32_t get_sample (const AVFrame *frame, int sample, enum AVSampleFormat format)
 
static int tta_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 
static av_cold int tta_encode_close (AVCodecContext *avctx)
 

Variables

const FFCodec ff_tta_encoder
 

Macro Definition Documentation

◆ BITSTREAM_WRITER_LE

#define BITSTREAM_WRITER_LE

Definition at line 21 of file ttaenc.c.

◆ PRED

#define PRED ( x,
k )
Value:
(int32_t)((((uint64_t)(x) << (k)) - (x)) >> (k))
int32_t

Referenced by tta_encode_frame().

Function Documentation

◆ tta_encode_init()

static av_cold int tta_encode_init ( AVCodecContext * avctx)
static

Definition at line 38 of file ttaenc.c.

◆ get_sample()

static int32_t get_sample ( const AVFrame * frame,
int sample,
enum AVSampleFormat format )
static

Definition at line 69 of file ttaenc.c.

Referenced by tta_encode_frame().

◆ tta_encode_frame()

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

Definition at line 87 of file ttaenc.c.

◆ tta_encode_close()

static av_cold int tta_encode_close ( AVCodecContext * avctx)
static

Definition at line 196 of file ttaenc.c.

Variable Documentation

◆ ff_tta_encoder

const FFCodec ff_tta_encoder
Initial value:
= {
.p.name = "tta",
CODEC_LONG_NAME("TTA (True Audio)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_TTA,
.priv_data_size = sizeof(TTAEncContext),
}
static av_cold void close(AVCodecParserContext *s)
Definition apv_parser.c:197
#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_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition codec.h:147
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
#define AV_CODEC_CAP_SMALL_LAST_FRAME
Codec can be fed a final frame with a smaller size.
Definition codec.h:84
@ AV_CODEC_ID_TTA
Definition codec_id.h:475
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
@ AV_SAMPLE_FMT_S32
signed 32 bits
Definition samplefmt.h:59
@ AV_SAMPLE_FMT_U8
unsigned 8 bits
Definition samplefmt.h:57
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition samplefmt.h:58
static av_cold int tta_encode_init(AVCodecContext *avctx)
Definition ttaenc.c:38
static int tta_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition ttaenc.c:87
static av_cold int tta_encode_close(AVCodecContext *avctx)
Definition ttaenc.c:196

Definition at line 203 of file ttaenc.c.