summaryrefslogtreecommitdiff
path: root/libavcodec/libwebpenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-06-09 01:33:39 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-08 20:10:17 +0200
commit19d8077e3172dfac6efd5995903b2ae22cc52744 (patch)
treefadea771d8d1b63b56ccd58fd3fbc88fa9bd635b /libavcodec/libwebpenc.c
parent425d272507edbcce458df0064abefd4b02098dfa (diff)
downloadffmpeg-19d8077e3172dfac6efd5995903b2ae22cc52744.tar.gz
avcodec/libwebpenc: Deduplicate options, AVClass, pix_fmts
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/libwebpenc.c')
-rw-r--r--libavcodec/libwebpenc.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/libavcodec/libwebpenc.c b/libavcodec/libwebpenc.c
index 97adacb6b2..afaf80047b 100644
--- a/libavcodec/libwebpenc.c
+++ b/libavcodec/libwebpenc.c
@@ -87,29 +87,18 @@ static int libwebp_encode_close(AVCodecContext *avctx)
return 0;
}
-static const AVClass class = {
- .class_name = "libwebp",
- .item_name = av_default_item_name,
- .option = options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
const AVCodec ff_libwebp_encoder = {
.name = "libwebp",
.long_name = NULL_IF_CONFIG_SMALL("libwebp WebP image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_WEBP,
.capabilities = AV_CODEC_CAP_DR1,
+ .pix_fmts = ff_libwebpenc_pix_fmts,
+ .priv_class = &ff_libwebpenc_class,
.priv_data_size = sizeof(LibWebPContext),
+ .defaults = ff_libwebp_defaults,
.init = libwebp_encode_init,
.encode2 = libwebp_encode_frame,
.close = libwebp_encode_close,
- .pix_fmts = (const enum AVPixelFormat[]) {
- AV_PIX_FMT_RGB32,
- AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P,
- AV_PIX_FMT_NONE
- },
- .priv_class = &class,
- .defaults = libwebp_defaults,
.wrapper_name = "libwebp",
};