Go to the documentation of this file.
32 case VP8_ENC_ERROR_OUT_OF_MEMORY:
33 case VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY:
35 case VP8_ENC_ERROR_NULL_PARAMETER:
36 case VP8_ENC_ERROR_INVALID_CONFIGURATION:
37 case VP8_ENC_ERROR_BAD_DIMENSION:
58 if (
s->preset >= WEBP_PRESET_DEFAULT) {
59 ret = WebPConfigPreset(&
s->config,
s->preset,
s->quality);
62 s->lossless =
s->config.lossless;
63 s->quality =
s->config.quality;
66 ret = WebPConfigInit(&
s->config);
70 s->config.lossless =
s->lossless;
71 s->config.quality =
s->quality;
74 ret = WebPValidateConfig(&
s->config);
80 s->lossless ?
"Lossless" :
"Lossy",
s->quality,
88 WebPPicture **pic_ptr) {
90 WebPPicture *pic =
NULL;
93 if (avctx->
width > WEBP_MAX_DIMENSION || avctx->
height > WEBP_MAX_DIMENSION) {
95 WEBP_MAX_DIMENSION, WEBP_MAX_DIMENSION);
104 ret = WebPPictureInit(pic);
109 pic->width = avctx->
width;
110 pic->height = avctx->
height;
116 if (!
s->conversion_warning) {
118 "Using libwebp for RGB-to-YUV conversion. You may want "
119 "to consider passing in YUV instead for lossy "
121 s->conversion_warning = 1;
125 pic->argb = (uint32_t *)
frame->data[0];
126 pic->argb_stride =
frame->linesize[0] / 4;
128 if (
frame->linesize[1] !=
frame->linesize[2] ||
s->cr_threshold) {
129 if (!
s->chroma_warning && !
s->cr_threshold) {
131 "Copying frame due to differing chroma linesizes.\n");
132 s->chroma_warning = 1;
135 alt_frame = *alt_frame_ptr;
151 if (
s->cr_threshold) {
164 for (y = 0; y <
frame->height; y+= bs) {
165 for (
x = 0;
x <
frame->width;
x+= bs) {
168 for (p = 0; p < 3; p++) {
174 for (y2 = ys; y2 <
FFMIN(ys + bs2,
h); y2++) {
175 for (x2 =
xs; x2 <
FFMIN(
xs + bs2,
w); x2++) {
177 -
s->ref->data[p][
frame->linesize[p] * y2 + x2];
182 skip =
sse <
s->cr_threshold &&
frame->data[3] !=
s->ref->data[3];
184 for (p = 0; p < 3; p++) {
190 for (y2 = ys; y2 <
FFMIN(ys + bs2,
h); y2++) {
191 memcpy(&
s->ref->data[p][
frame->linesize[p] * y2 +
xs],
195 for (y2 = y; y2 <
FFMIN(y+bs,
frame->height); y2++) {
196 memset(&
frame->data[3][
frame->linesize[3] * y2 +
x],
206 pic->y =
frame->data[0];
207 pic->u =
frame->data[1];
208 pic->v =
frame->data[2];
209 pic->y_stride =
frame->linesize[0];
210 pic->uv_stride =
frame->linesize[1];
212 pic->colorspace = WEBP_YUV420A;
213 pic->a =
frame->data[3];
214 pic->a_stride =
frame->linesize[3];
216 WebPCleanupTransparentArea(pic);
218 pic->colorspace = WEBP_YUV420;
226 if (!
s->conversion_warning) {
228 "Using libwebp for YUV-to-RGB conversion. You may want "
229 "to consider passing in RGB instead for lossless "
231 s->conversion_warning = 1;
234 #if (WEBP_ENCODER_ABI_VERSION <= 0x201)
239 pic->memory_ = (
void*)1;
240 ret = WebPPictureYUVAToARGB(pic);
243 "WebPPictureYUVAToARGB() failed with error: %d\n",
245 ret = libwebp_error_to_averror(pic->error_code);
#define AV_LOG_WARNING
Something somehow does not look correct.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int ff_libwebp_error_to_averror(int err)
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
av_cold int ff_libwebp_encode_init_common(AVCodecContext *avctx)
static av_cold int end(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
#define AVERROR_UNKNOWN
Unknown error, typically from an external library.
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo x
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int global_quality
Global quality for codecs which cannot change it per frame.
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
#define AV_CEIL_RSHIFT(a, b)
static int sse(MpegEncContext *s, uint8_t *src1, uint8_t *src2, int w, int h, int stride)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
#define xs(width, name, var, subs,...)
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo ug o o w
main external API structure.
int ff_libwebp_get_frame(AVCodecContext *avctx, LibWebPContextCommon *s, const AVFrame *frame, AVFrame **alt_frame_ptr, WebPPicture **pic_ptr)
static av_always_inline int diff(const uint32_t a, const uint32_t b)
int width
picture width / height.
#define FF_QP2LAMBDA
factor to convert from H.263 QP to lambda