Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ffmpeg-subtree/libavcodec/libxeve.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ typedef struct XeveContext {
int hash; // embed picture signature (HASH) for conformance checking in decoding
int sei_info; // embed Supplemental enhancement information while encoding

int aq_mode; // embed adaptive Quantization method
int cutree; // embed cutree for Adaptive Quantization

int color_format; // input data color format: currently only XEVE_CF_YCBCR420 is supported

AVDictionary *xeve_params;
Expand Down Expand Up @@ -218,6 +221,12 @@ static int get_conf(AVCodecContext *avctx, XEVE_CDSC *cdsc)

cdsc->param.rc_type = xectx->rc_mode;

if (xectx->aq_mode >= 0)
cdsc->param.aq_mode = xectx->aq_mode;

if (xectx->cutree >= 0)
cdsc->param.cutree = xectx->cutree;

if (xectx->rc_mode == XEVE_RC_CQP)
cdsc->param.qp = xectx->qp;
else if (xectx->rc_mode == XEVE_RC_ABR) {
Expand Down Expand Up @@ -574,6 +583,8 @@ static const AVOption libxeve_options[] = {
{ "crf", "Constant rate factor value for CRF rate control mode", OFFSET(crf), AV_OPT_TYPE_INT, { .i64 = 32 }, 10, 49, VE },
{ "hash", "Embed picture signature (HASH) for conformance checking in decoding", OFFSET(hash), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
{ "sei_info", "Embed SEI messages identifying encoder parameters and command line arguments", OFFSET(sei_info), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
{ "aq-mode", "Embed Adaptive Quantization method", OFFSET(aq_mode), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
{ "cu-tree", "Embed cu-tree for Adaptive Quantization", OFFSET(cutree), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
{ "xeve-params", "Override the xeve configuration using a :-separated list of key=value parameters", OFFSET(xeve_params), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE },
{ NULL }
};
Expand Down