27 #ifndef AVCODEC_LIBWEBPENC_COMMON_H 28 #define AVCODEC_LIBWEBPENC_COMMON_H 30 #include <webp/encode.h> 45 int conversion_warning;
52 int ff_libwebp_error_to_averror(
int err);
58 WebPPicture **pic_ptr);
60 #define OFFSET(x) offsetof(LibWebPContextCommon, x) 61 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM 63 {
"lossless",
"Use lossless mode", OFFSET(lossless), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
64 {
"preset",
"Configuration preset", OFFSET(preset), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, WEBP_PRESET_TEXT, VE,
"preset" },
65 {
"none",
"do not use a preset", 0, AV_OPT_TYPE_CONST, { .i64 = -1 }, 0, 0, VE,
"preset" },
66 {
"default",
"default preset", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_DEFAULT }, 0, 0, VE,
"preset" },
67 {
"picture",
"digital picture, like portrait, inner shot", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_PICTURE }, 0, 0, VE,
"preset" },
68 {
"photo",
"outdoor photograph, with natural lighting", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_PHOTO }, 0, 0, VE,
"preset" },
69 {
"drawing",
"hand or line drawing, with high-contrast details", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_DRAWING }, 0, 0, VE,
"preset" },
70 {
"icon",
"small-sized colorful images", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_ICON }, 0, 0, VE,
"preset" },
71 {
"text",
"text-like", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_TEXT }, 0, 0, VE,
"preset" },
72 {
"cr_threshold",
"Conditional replenishment threshold", OFFSET(cr_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
73 {
"cr_size" ,
"Conditional replenishment block size", OFFSET(cr_size) , AV_OPT_TYPE_INT, { .i64 = 16 }, 0, 256, VE },
74 {
"quality" ,
"Quality", OFFSET(quality), AV_OPT_TYPE_FLOAT, { .dbl = 75 }, 0, 100, VE },
79 {
"compression_level",
"4" },
80 {
"global_quality",
"-1" },
This structure describes decoded (raw) audio or video data.
Definition: frame.h:218
AVOption.
Definition: opt.h:246
Definition: internal.h:223
reference-counted frame API
Definition: libwebpenc_common.h:39
Libavcodec external API header.
main external API structure.
Definition: avcodec.h:1518
Describe the class of an AVClass context structure.
Definition: log.h:67
common internal api header.
common internal and external API header