FFmpeg  4.0
Data Structures | Functions | Variables
atrac3plusdec.c File Reference

Sony ATRAC3+ compatible decoder. More...

#include <stdint.h>
#include <string.h>
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "atrac.h"
#include "atrac3plus.h"

Go to the source code of this file.

Data Structures

struct  ATRAC3PContext
 

Functions

static av_cold int atrac3p_decode_close (AVCodecContext *avctx)
 
static av_cold int set_channel_params (ATRAC3PContext *ctx, AVCodecContext *avctx)
 
static av_cold int atrac3p_decode_init (AVCodecContext *avctx)
 
static void decode_residual_spectrum (ATRAC3PContext *ctx, Atrac3pChanUnitCtx *ch_unit, float out[2][ATRAC3P_FRAME_SAMPLES], int num_channels, AVCodecContext *avctx)
 
static void reconstruct_frame (ATRAC3PContext *ctx, Atrac3pChanUnitCtx *ch_unit, int num_channels, AVCodecContext *avctx)
 
static int atrac3p_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 

Variables

AVCodec ff_atrac3p_decoder
 
AVCodec ff_atrac3pal_decoder
 

Detailed Description

Sony ATRAC3+ compatible decoder.

Container formats used to store its data: RIFF WAV (.at3) and Sony OpenMG (.oma, .aa3).

Technical description of this codec can be found here: http://wiki.multimedia.cx/index.php?title=ATRAC3plus

Kudos to Benjamin Larsson and Michael Karcher for their precious technical help!

Definition in file atrac3plusdec.c.

Function Documentation

◆ atrac3p_decode_close()

static av_cold int atrac3p_decode_close ( AVCodecContext avctx)
static

Definition at line 68 of file atrac3plusdec.c.

Referenced by atrac3p_decode_init().

◆ set_channel_params()

static av_cold int set_channel_params ( ATRAC3PContext ctx,
AVCodecContext avctx 
)
static

Definition at line 81 of file atrac3plusdec.c.

Referenced by atrac3p_decode_init().

◆ atrac3p_decode_init()

static av_cold int atrac3p_decode_init ( AVCodecContext avctx)
static

Definition at line 147 of file atrac3plusdec.c.

◆ decode_residual_spectrum()

static void decode_residual_spectrum ( ATRAC3PContext ctx,
Atrac3pChanUnitCtx ch_unit,
float  out[2][ATRAC3P_FRAME_SAMPLES],
int  num_channels,
AVCodecContext avctx 
)
static

Definition at line 201 of file atrac3plusdec.c.

Referenced by atrac3p_decode_frame().

◆ reconstruct_frame()

static void reconstruct_frame ( ATRAC3PContext ctx,
Atrac3pChanUnitCtx ch_unit,
int  num_channels,
AVCodecContext avctx 
)
static

Definition at line 265 of file atrac3plusdec.c.

Referenced by atrac3p_decode_frame().

◆ atrac3p_decode_frame()

static int atrac3p_decode_frame ( AVCodecContext avctx,
void data,
int got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 330 of file atrac3plusdec.c.

Variable Documentation

◆ ff_atrac3p_decoder

AVCodec ff_atrac3p_decoder
Initial value:
= {
.name = "atrac3plus",
.long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ (Adaptive TRansform Acoustic Coding 3+)"),
.capabilities = AV_CODEC_CAP_DR1,
.priv_data_size = sizeof(ATRAC3PContext),
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold int atrac3p_decode_close(AVCodecContext *avctx)
Definition: atrac3plusdec.c:68
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold int atrac3p_decode_init(AVCodecContext *avctx)
static int atrac3p_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959

Definition at line 390 of file atrac3plusdec.c.

◆ ff_atrac3pal_decoder

AVCodec ff_atrac3pal_decoder
Initial value:
= {
.name = "atrac3plusal",
.long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ AL (Adaptive TRansform Acoustic Coding 3+ Advanced Lossless)"),
.capabilities = AV_CODEC_CAP_DR1,
.priv_data_size = sizeof(ATRAC3PContext),
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold int atrac3p_decode_close(AVCodecContext *avctx)
Definition: atrac3plusdec.c:68
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold int atrac3p_decode_init(AVCodecContext *avctx)
static int atrac3p_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959

Definition at line 402 of file atrac3plusdec.c.