FFmpeg
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/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "avcodec.h"
#include "encode.h"
#include "internal.h"
#include "libopenh264.h"

Go to the source code of this file.

Data Structures

struct  SVCContext
 

Macros

#define SM_SIZELIMITED_SLICE   SM_DYN_SLICE
 
#define TARGET_BITRATE_DEFAULT   2*1000*1000
 
#define OFFSET(x)   offsetof(SVCContext, x)
 
#define VE   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 
#define DEPRECATED   AV_OPT_FLAG_DEPRECATED
 
#define PROFILE(name, value)   name, NULL, 0, AV_OPT_TYPE_CONST, { .i64 = value }, 0, 0, VE, "profile"
 

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 {
      class_name = "libopenh264enc"
 
      item_name = av_default_item_name
 
      option = options
 
      version = LIBAVUTIL_VERSION_INT
 
}; 
 
static const AVCodecDefault svc_enc_defaults []
 
const AVCodec ff_libopenh264_encoder
 

Macro Definition Documentation

◆ SM_SIZELIMITED_SLICE

#define SM_SIZELIMITED_SLICE   SM_DYN_SLICE

Definition at line 38 of file libopenh264enc.c.

◆ TARGET_BITRATE_DEFAULT

#define TARGET_BITRATE_DEFAULT   2*1000*1000

Definition at line 41 of file libopenh264enc.c.

◆ OFFSET

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

Definition at line 61 of file libopenh264enc.c.

◆ VE

Definition at line 62 of file libopenh264enc.c.

◆ DEPRECATED

#define DEPRECATED   AV_OPT_FLAG_DEPRECATED

Definition at line 63 of file libopenh264enc.c.

◆ PROFILE

#define PROFILE (   name,
  value 
)    name, NULL, 0, AV_OPT_TYPE_CONST, { .i64 = value }, 0, 0, VE, "profile"

Function Documentation

◆ svc_encode_close()

static av_cold int svc_encode_close ( AVCodecContext avctx)
static

Definition at line 119 of file libopenh264enc.c.

◆ svc_encode_init()

static av_cold int svc_encode_init ( AVCodecContext avctx)
static

Definition at line 130 of file libopenh264enc.c.

◆ svc_encode_frame()

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

Definition at line 360 of file libopenh264enc.c.

Variable Documentation

◆ options

const AVOption options[]
static

Definition at line 64 of file libopenh264enc.c.

◆ class_name

class_name = "libopenh264enc"
private

Definition at line 113 of file libopenh264enc.c.

◆ item_name

item_name = av_default_item_name
private

Definition at line 114 of file libopenh264enc.c.

◆ option

option = options
private

Definition at line 115 of file libopenh264enc.c.

◆ version

version = LIBAVUTIL_VERSION_INT
private

Definition at line 116 of file libopenh264enc.c.

◆ @82

const { ... }

◆ svc_enc_defaults

const AVCodecDefault svc_enc_defaults[]
static
Initial value:
= {
{ "b", "0" },
{ "g", "-1" },
{ "qmin", "-1" },
{ "qmax", "-1" },
{ NULL },
}

Definition at line 423 of file libopenh264enc.c.

◆ ff_libopenh264_encoder

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,
.defaults = svc_enc_defaults,
.priv_class = &class,
.wrapper_name = "libopenh264",
}

Definition at line 431 of file libopenh264enc.c.

SVCContext
Definition: libopenh264dec.c:36
FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
init
static int init
Definition: av_tx.c:47
AV_CODEC_CAP_OTHER_THREADS
#define AV_CODEC_CAP_OTHER_THREADS
Codec supports multithreading through a method other than slice- or frame-level multithreading.
Definition: codec.h:127
svc_encode_frame
static int svc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet)
Definition: libopenh264enc.c:360
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:296
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:66
AV_CODEC_ID_H264
@ AV_CODEC_ID_H264
Definition: codec_id.h:77
NULL
#define NULL
Definition: coverity.c:32
FF_CODEC_CAP_AUTO_THREADS
#define FF_CODEC_CAP_AUTO_THREADS
Codec handles avctx->thread_count == 0 (auto) internally.
Definition: internal.h:81
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
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
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: internal.h:50
svc_encode_init
static av_cold int svc_encode_init(AVCodecContext *avctx)
Definition: libopenh264enc.c:130
svc_encode_close
static av_cold int svc_encode_close(AVCodecContext *avctx)
Definition: libopenh264enc.c:119
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
svc_enc_defaults
static const AVCodecDefault svc_enc_defaults[]
Definition: libopenh264enc.c:423
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201