FFmpeg
Loading...
Searching...
No Matches
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.

Referenced by mpegh3dadec_init().

◆ CH_LAYOUT_7POINT2POINT3

#define CH_LAYOUT_7POINT2POINT3
Value:
#define AV_CH_LAYOUT_5POINT1POINT2
#define AV_CH_SIDE_SURROUND_RIGHT
#define AV_CH_SIDE_SURROUND_LEFT
#define AV_CH_TOP_BACK_CENTER
#define AV_CH_LOW_FREQUENCY_2

Referenced by channel_layout_to_cicp().

◆ CH_LAYOUT_5POINT1POINT6

#define CH_LAYOUT_5POINT1POINT6
Value:
#define AV_CH_LAYOUT_5POINT1POINT4_BACK
#define AV_CH_TOP_FRONT_CENTER
#define AV_CH_TOP_CENTER

Referenced by channel_layout_to_cicp().

◆ CH_LAYOUT_7POINT1POINT6

#define CH_LAYOUT_7POINT1POINT6

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",
}
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
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
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition codec.h:94
@ AV_CODEC_ID_MPEGH_3D_AUDIO
Definition codec_id.h:544
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
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)
static av_cold int mpegh3dadec_close(AVCodecContext *avctx)
Definition libmpeghdec.c:55

Definition at line 217 of file libmpeghdec.c.