FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
libopenh264enc.c File Reference
#include <wels/codec_api.h>
#include <wels/codec_ver.h>
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "avcodec.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  SVCContext
 

Macros

#define OPENH264_VER_AT_LEAST(maj, min)
 
#define OFFSET(x)   offsetof(SVCContext, x)
 
#define VE   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static av_cold int svc_encode_close (AVCodecContext *avctx)
 
static av_cold int svc_encode_init (AVCodecContext *avctx)
 
static int svc_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet)
 

Variables

static const AVOption options []
 
class {
      libopenh264enc
 
      av_default_item_name
 
      options
 
}; 
 
AVCodec ff_libopenh264_encoder
 

Macro Definition Documentation

#define OPENH264_VER_AT_LEAST (   maj,
  min 
)
Value:
((OPENH264_MAJOR > (maj)) || \
(OPENH264_MAJOR == (maj) && OPENH264_MINOR >= (min)))

Definition at line 42 of file libopenh264enc.c.

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

Definition at line 46 of file libopenh264enc.c.

Definition at line 47 of file libopenh264enc.c.

Function Documentation

static av_cold int svc_encode_close ( AVCodecContext avctx)
static

Definition at line 62 of file libopenh264enc.c.

Referenced by svc_encode_init().

static av_cold int svc_encode_init ( AVCodecContext avctx)
static

Definition at line 71 of file libopenh264enc.c.

static int svc_encode_frame ( AVCodecContext avctx,
AVPacket avpkt,
const AVFrame frame,
int *  got_packet 
)
static

Definition at line 162 of file libopenh264enc.c.

Variable Documentation

options
static
Initial value:
= {
{ "slice_mode", "Slice mode", OFFSET(slice_mode), AV_OPT_TYPE_INT, { .i64 = SM_AUTO_SLICE }, SM_SINGLE_SLICE, SM_RESERVED, VE, "slice_mode" },
{ "fixed", "A fixed number of slices", 0, AV_OPT_TYPE_CONST, { .i64 = SM_FIXEDSLCNUM_SLICE }, 0, 0, VE, "slice_mode" },
{ "rowmb", "One slice per row of macroblocks", 0, AV_OPT_TYPE_CONST, { .i64 = SM_ROWMB_SLICE }, 0, 0, VE, "slice_mode" },
{ "auto", "Automatic number of slices according to number of threads", 0, AV_OPT_TYPE_CONST, { .i64 = SM_AUTO_SLICE }, 0, 0, VE, "slice_mode" },
{ "loopfilter", "Enable loop filter", OFFSET(loopfilter), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, VE },
{ "profile", "Set profile restrictions", OFFSET(profile), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
{ NULL }
}

Definition at line 48 of file libopenh264enc.c.

libopenh264enc

Definition at line 59 of file libopenh264enc.c.

av_default_item_name

Definition at line 59 of file libopenh264enc.c.

Referenced by av_parse_cpu_caps(), av_parse_cpu_flags(), and vs2av_log().

const { ... }
AVCodec ff_libopenh264_encoder
Initial value:
= {
.name = "libopenh264",
.long_name = NULL_IF_CONFIG_SMALL("OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
.priv_data_size = sizeof(SVCContext),
.encode2 = svc_encode_frame,
.close = svc_encode_close,
.capabilities = CODEC_CAP_AUTO_THREADS,
.pix_fmts = (const enum PixelFormat[]){ AV_PIX_FMT_YUV420P,
.priv_class = &class,
}

Definition at line 221 of file libopenh264enc.c.