FFmpeg
Data Structures | Macros | Functions | Variables
libmpeghdec.c File Reference
#include <string.h>
#include <mpeghdec/mpeghdecoder.h>
#include "libavutil/channel_layout.h"
#include "libavutil/frame.h"
#include "libavutil/mem.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  MPEGH3DADecContext
 

Macros

#define MAX_LOST_FRAMES   2
 
#define PER_CHANNEL_OUTBUF_SIZE   (3072 * (MAX_LOST_FRAMES + 1))
 
#define CH_LAYOUT_7POINT2POINT3
 
#define CH_LAYOUT_5POINT1POINT6
 
#define CH_LAYOUT_7POINT1POINT6
 

Functions

static av_cold int mpegh3dadec_close (AVCodecContext *avctx)
 
static av_cold int channel_layout_to_cicp (const AVChannelLayout *layout)
 
static av_cold int mpegh3dadec_init (AVCodecContext *avctx)
 
static int mpegh3dadec_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
 
static av_cold void mpegh3dadec_flush (AVCodecContext *avctx)
 

Variables

const FFCodec ff_libmpeghdec_decoder
 

Macro Definition Documentation

◆ MAX_LOST_FRAMES

#define MAX_LOST_FRAMES   2

Definition at line 42 of file libmpeghdec.c.

◆ PER_CHANNEL_OUTBUF_SIZE

#define PER_CHANNEL_OUTBUF_SIZE   (3072 * (MAX_LOST_FRAMES + 1))

Definition at line 44 of file libmpeghdec.c.

◆ CH_LAYOUT_7POINT2POINT3

#define CH_LAYOUT_7POINT2POINT3
Value:
AV_CH_SIDE_SURROUND_RIGHT | AV_CH_TOP_BACK_CENTER | \
AV_CH_LOW_FREQUENCY_2

◆ CH_LAYOUT_5POINT1POINT6

#define CH_LAYOUT_5POINT1POINT6
Value:
AV_CH_TOP_FRONT_CENTER | AV_CH_TOP_CENTER

◆ CH_LAYOUT_7POINT1POINT6

#define CH_LAYOUT_7POINT1POINT6
Value:
AV_CH_TOP_FRONT_CENTER | AV_CH_TOP_CENTER

Function Documentation

◆ mpegh3dadec_close()

static av_cold int mpegh3dadec_close ( AVCodecContext avctx)
static

Definition at line 55 of file libmpeghdec.c.

◆ channel_layout_to_cicp()

static av_cold int channel_layout_to_cicp ( const AVChannelLayout layout)
static

Definition at line 69 of file libmpeghdec.c.

Referenced by mpegh3dadec_init().

◆ mpegh3dadec_init()

static av_cold int mpegh3dadec_init ( AVCodecContext avctx)
static

Definition at line 104 of file libmpeghdec.c.

◆ mpegh3dadec_decode_frame()

static int mpegh3dadec_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int *  got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 147 of file libmpeghdec.c.

◆ mpegh3dadec_flush()

static av_cold void mpegh3dadec_flush ( AVCodecContext avctx)
static

Definition at line 206 of file libmpeghdec.c.

Variable Documentation

◆ ff_libmpeghdec_decoder

const FFCodec ff_libmpeghdec_decoder
Initial value:
= {
.p.name = "libmpeghdec",
CODEC_LONG_NAME("libmpeghdec (MPEG-H 3D Audio)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.priv_data_size = sizeof(MPEGH3DADecContext),
.p.wrapper_name = "libmpeghdec",
}

Definition at line 217 of file libmpeghdec.c.

FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:42
mpegh3dadec_decode_frame
static int mpegh3dadec_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Definition: libmpeghdec.c:147
AV_CODEC_ID_MPEGH_3D_AUDIO
@ AV_CODEC_ID_MPEGH_3D_AUDIO
Definition: codec_id.h:550
AV_CH_TOP_BACK_CENTER
#define AV_CH_TOP_BACK_CENTER
Definition: channel_layout.h:191
AV_CH_LAYOUT_5POINT1POINT4_BACK
#define AV_CH_LAYOUT_5POINT1POINT4_BACK
Definition: channel_layout.h:247
AV_CH_LAYOUT_7POINT1POINT4_BACK
#define AV_CH_LAYOUT_7POINT1POINT4_BACK
Definition: channel_layout.h:249
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:346
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:201
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:331
mpegh3dadec_close
static av_cold int mpegh3dadec_close(AVCodecContext *avctx)
Definition: libmpeghdec.c:55
AV_CH_TOP_CENTER
#define AV_CH_TOP_CENTER
Definition: channel_layout.h:186
MPEGH3DADecContext
Definition: libmpeghdec.c:46
mpegh3dadec_init
static av_cold int mpegh3dadec_init(AVCodecContext *avctx)
Definition: libmpeghdec.c:104
AV_CODEC_CAP_CHANNEL_CONF
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: codec.h:91
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
AV_CH_LAYOUT_5POINT1POINT2
#define AV_CH_LAYOUT_5POINT1POINT2
Definition: channel_layout.h:243
mpegh3dadec_flush
static av_cold void mpegh3dadec_flush(AVCodecContext *avctx)
Definition: libmpeghdec.c:206
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: codec.h:76
AV_CH_SIDE_SURROUND_LEFT
#define AV_CH_SIDE_SURROUND_LEFT
Definition: channel_layout.h:205