FFmpeg
Loading...
Searching...
No Matches
libwebpenc_common.h
Go to the documentation of this file.
1/*
2 * WebP encoding support via libwebp
3 * Copyright (c) 2013 Justin Ruggles <justin.ruggles@gmail.com>
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22/**
23 * @file
24 * WebP encoder using libwebp: common structs and methods.
25 */
26
27#ifndef AVCODEC_LIBWEBPENC_COMMON_H
28#define AVCODEC_LIBWEBPENC_COMMON_H
29
30#include <webp/encode.h>
31
33#include "libavutil/frame.h"
34#include "libavutil/log.h"
35#include "libavutil/pixfmt.h"
36#include "avcodec.h"
37#include "codec_internal.h"
38
39typedef struct LibWebPContextCommon {
40 AVClass *class; // class for AVOptions
41 float quality; // lossy quality 0 - 100
42 int lossless; // use lossless encoding
43 int preset; // configuration preset
44 int chroma_warning; // chroma linesize mismatch warning has been printed
45 int conversion_warning; // pixel format conversion warning has been printed
46 WebPConfig config; // libwebp configuration
51
53
55
57 const AVFrame *frame, AVFrame **alt_frame_ptr,
58 WebPPicture **pic_ptr);
59
60extern const enum AVPixelFormat ff_libwebpenc_pix_fmts[];
61extern const AVClass ff_libwebpenc_class;
63
64#endif /* AVCODEC_LIBWEBPENC_COMMON_H */
Libavcodec external API header.
#define s(width, name)
Definition cbs_vp9.c:198
static AVFrame * frame
reference-counted frame API
Macro definitions for various function/variable attributes.
#define av_cold
Definition attributes.h:117
const AVClass ff_libwebpenc_class
enum AVPixelFormat ff_libwebpenc_pix_fmts[]
const FFCodecDefault ff_libwebp_defaults[]
int ff_libwebp_get_frame(AVCodecContext *avctx, LibWebPContextCommon *s, const AVFrame *frame, AVFrame **alt_frame_ptr, WebPPicture **pic_ptr)
av_cold int ff_libwebp_encode_init_common(AVCodecContext *avctx)
int ff_libwebp_error_to_averror(int err)
pixel format definitions
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
Describe the class of an AVClass context structure.
Definition log.h:76
main external API structure.
Definition avcodec.h:443
This structure describes decoded (raw) audio or video data.
Definition frame.h:472