Libav
Data Structures | Macros | Functions | Variables
libschroedingerenc.c File Reference

Dirac encoder support via libschroedinger-1.0 libraries. More...

#include <schroedinger/schro.h>
#include <schroedinger/schrodebug.h>
#include <schroedinger/schrovideoformat.h>
#include "libavutil/attributes.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
#include "libschroedinger.h"
#include "bytestream.h"

Go to the source code of this file.

Data Structures

struct  SchroEncoderParams
 libschroedinger encoder private data More...
 

Macros

#define OFFSET(x)   offsetof(SchroEncoderParams, x)
 
#define VE   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int set_chroma_format (AVCodecContext *avctx)
 Works out Schro-compatible chroma format. More...
 
static av_cold int libschroedinger_encode_init (AVCodecContext *avctx)
 
static SchroFrame * libschroedinger_frame_from_data (AVCodecContext *avctx, const AVFrame *frame)
 
static void libschroedinger_free_frame (void *data)
 
static int libschroedinger_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
 
static int libschroedinger_encode_close (AVCodecContext *avctx)
 

Variables

static const AVOption options []
 
static const AVClass libschroedinger_class
 
AVCodec ff_libschroedinger_encoder
 

Detailed Description

Dirac encoder support via libschroedinger-1.0 libraries.

More details about the Schroedinger project can be found at http://www.diracvideo.org/. The library implements Dirac Specification Version 2.2 (http://dirac.sourceforge.net/specification.html).

Definition in file libschroedingerenc.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(SchroEncoderParams, x)

Definition at line 455 of file libschroedingerenc.c.

◆ VE

Definition at line 456 of file libschroedingerenc.c.

Function Documentation

◆ set_chroma_format()

static int set_chroma_format ( AVCodecContext avctx)
static

Works out Schro-compatible chroma format.

Definition at line 83 of file libschroedingerenc.c.

Referenced by libschroedinger_encode_init().

◆ libschroedinger_encode_init()

static av_cold int libschroedinger_encode_init ( AVCodecContext avctx)
static

Definition at line 106 of file libschroedingerenc.c.

◆ libschroedinger_frame_from_data()

static SchroFrame* libschroedinger_frame_from_data ( AVCodecContext avctx,
const AVFrame frame 
)
static

Definition at line 244 of file libschroedingerenc.c.

Referenced by libschroedinger_encode_frame().

◆ libschroedinger_free_frame()

static void libschroedinger_free_frame ( void data)
static

◆ libschroedinger_encode_frame()

static int libschroedinger_encode_frame ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame frame,
int *  got_packet 
)
static

Definition at line 271 of file libschroedingerenc.c.

◆ libschroedinger_encode_close()

static int libschroedinger_encode_close ( AVCodecContext avctx)
static

Definition at line 433 of file libschroedingerenc.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "noarith", "Enable noarith", OFFSET(noarith), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, VE },
{ NULL },
}
#define VE
NULL
Definition: eval.c:55
#define OFFSET(x)

Definition at line 457 of file libschroedingerenc.c.

◆ libschroedinger_class

const AVClass libschroedinger_class
static
Initial value:
= {
.class_name = "libschroedinger",
.item_name = av_default_item_name,
.option = options,
}
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
av_default_item_name
Definition: dnxhdenc.c:55
static const AVOption options[]

Definition at line 463 of file libschroedingerenc.c.

◆ ff_libschroedinger_encoder

AVCodec ff_libschroedinger_encoder
Initial value:
= {
.name = "libschroedinger",
.long_name = NULL_IF_CONFIG_SMALL("libschroedinger Dirac 2.2"),
.priv_data_size = sizeof(SchroEncoderParams),
.priv_class = &libschroedinger_class,
.capabilities = AV_CODEC_CAP_DELAY,
.pix_fmts = (const enum AVPixelFormat[]){
},
}
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:64
libschroedinger encoder private data
#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: avcodec.h:863
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:148
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:63
static av_cold int libschroedinger_encode_init(AVCodecContext *avctx)
static int libschroedinger_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:257
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:59
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:582
static int libschroedinger_encode_close(AVCodecContext *avctx)
static const AVClass libschroedinger_class
AVPixelFormat
Pixel format.
Definition: pixfmt.h:57

Definition at line 470 of file libschroedingerenc.c.