FFmpeg
|
libxavs.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdint.h>
#include <float.h>
#include <xavs.h>
#include "avcodec.h"
#include "internal.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
Include dependency graph for libxavs.c:
Go to the source code of this file.
Data Structures | |
struct | XavsContext |
Macros | |
#define | END_OF_STREAM 0x001 |
#define | XAVS_PART_I8X8 0x002 /* Analyze i8x8 (requires 8x8 transform) */ |
#define | XAVS_PART_P8X8 0x010 /* Analyze p16x8, p8x16 and p8x8 */ |
#define | XAVS_PART_B8X8 0x100 /* Analyze b16x8, b*/ |
#define | OFFSET(x) offsetof(XavsContext, x) |
#define | VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Typedefs | |
typedef struct XavsContext | XavsContext |
Functions | |
static void | XAVS_log (void *p, int level, const char *fmt, va_list args) |
static int | encode_nals (AVCodecContext *ctx, AVPacket *pkt, xavs_nal_t *nals, int nnal) |
static int | XAVS_frame (AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) |
static av_cold int | XAVS_close (AVCodecContext *avctx) |
static av_cold int | XAVS_init (AVCodecContext *avctx) |
Variables | |
static const AVOption | options [] |
class { | |
class_name = "libxavs" | |
item_name = av_default_item_name | |
option = options | |
version = LIBAVUTIL_VERSION_INT | |
}; | |
static const AVCodecDefault | xavs_defaults [] |
AVCodec | ff_libxavs_encoder |
Macro Definition Documentation
#define END_OF_STREAM 0x001 |
Definition at line 35 of file libxavs.c.
Referenced by XAVS_frame().
#define OFFSET | ( | x | ) | offsetof(XavsContext, x) |
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
#define XAVS_PART_I8X8 0x002 /* Analyze i8x8 (requires 8x8 transform) */ |
#define XAVS_PART_P8X8 0x010 /* Analyze p16x8, p8x16 and p8x8 */ |
Typedef Documentation
typedef struct XavsContext XavsContext |
Function Documentation
|
static |
Definition at line 79 of file libxavs.c.
Referenced by XAVS_frame().
|
static |
|
static |
|
static |
Definition at line 64 of file libxavs.c.
Referenced by XAVS_init().
Variable Documentation
const { ... } |
AVCodec ff_libxavs_encoder |
Initial value:
= {
.name = "libxavs",
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_CAVS,
.priv_data_size = sizeof(XavsContext),
.encode2 = XAVS_frame,
.close = XAVS_close,
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS,
.long_name = NULL_IF_CONFIG_SMALL("libxavs Chinese AVS (Audio Video Standard)"),
.priv_class = &class,
.defaults = xavs_defaults,
}
Definition: pixfmt.h:67
static int XAVS_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: libxavs.c:114
struct XavsContext XavsContext
#define CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: libavcodec/avcodec.h:770
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
#define CODEC_CAP_AUTO_THREADS
Codec supports avctx->thread_count == 0 (auto).
Definition: libavcodec/avcodec.h:822
Definition: libavcodec/avcodec.h:190
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:68
Definition: avutil.h:143
|
private |
|
static |
Initial value:
= {
{ "crf", "Select the quality for constant quality mode", OFFSET(crf), AV_OPT_TYPE_FLOAT, {.dbl = -1 }, -1, FLT_MAX, VE },
{ "qp", "Constant quantization parameter rate control method",OFFSET(cqp), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, INT_MAX, VE },
{ "b-bias", "Influences how often B-frames are used", OFFSET(b_bias), AV_OPT_TYPE_INT, {.i64 = INT_MIN}, INT_MIN, INT_MAX, VE },
{ "cplxblur", "Reduce fluctuations in QP (before curve compression)", OFFSET(cplxblur), AV_OPT_TYPE_FLOAT, {.dbl = -1 }, -1, FLT_MAX, VE},
{ "direct-pred", "Direct MV prediction mode", OFFSET(direct_pred), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, INT_MAX, VE, "direct-pred" },
{ "spatial", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XAVS_DIRECT_PRED_SPATIAL }, 0, 0, VE, "direct-pred" },
{ "temporal", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = XAVS_DIRECT_PRED_TEMPORAL }, 0, 0, VE, "direct-pred" },
{ "mbtree", "Use macroblock tree ratecontrol.", OFFSET(mbtree), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, 1, VE},
{ "mixed-refs", "One reference per partition, as opposed to one reference per macroblock", OFFSET(mixed_refs), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, VE },
{ NULL },
}
Definition: opt.h:222
Definition: opt.h:229
Definition: opt.h:225
|
private |
Generated on Tue Jan 21 2025 06:52:34 for FFmpeg by 1.8.11