Go to the documentation of this file.
35 #define RGBA(r, g, b, a) (((uint8_t)(r) << 0) | \
36 ((uint8_t)(g) << 8) | \
37 ((uint8_t)(b) << 16) | \
38 ((unsigned)(uint8_t)(a) << 24))
49 tmp = (color0 >> 11) * 255 + 16;
51 tmp = ((color0 & 0x07E0) >> 5) * 255 + 32;
53 tmp = (color0 & 0x001F) * 255 + 16;
56 tmp = (color1 >> 11) * 255 + 16;
58 tmp = ((color1 & 0x07E0) >> 5) * 255 + 32;
60 tmp = (color1 & 0x001F) * 255 + 16;
63 if (dxtn || color0 > color1) {
64 colors[0] =
RGBA(r0, g0,
b0,
a);
65 colors[1] =
RGBA(r1, g1,
b1,
a);
66 colors[2] =
RGBA((2 * r0 + r1) / 3,
70 colors[3] =
RGBA((2 * r1 + r0) / 3,
75 colors[0] =
RGBA(r0, g0,
b0,
a);
76 colors[1] =
RGBA(r1, g1,
b1,
a);
77 colors[2] =
RGBA((r0 + r1) / 2,
96 for (y = 0; y < 4; y++) {
97 for (
x = 0;
x < 4;
x++) {
150 for (y = 0; y < 4; y++) {
154 alpha_values[0] = ((alpha_code >> 0) & 0x0F) * 17;
155 alpha_values[1] = ((alpha_code >> 4) & 0x0F) * 17;
156 alpha_values[2] = ((alpha_code >> 8) & 0x0F) * 17;
157 alpha_values[3] = ((alpha_code >> 12) & 0x0F) * 17;
159 for (
x = 0;
x < 4;
x++) {
200 for (y = 0; y < 4; y++)
201 for (
x = 0;
x < 4;
x++)
245 for (
i = 0;
i < 8;
i++)
246 dst[
i] = (
tmp >> (
i * 3)) & 0x7;
269 for (y = 0; y < 4; y++) {
270 for (
x = 0;
x < 4;
x++) {
271 int alpha_code = alpha_indices[
x + y * 4];
275 if (alpha_code == 0) {
277 }
else if (alpha_code == 1) {
280 if (alpha0 > alpha1) {
282 (alpha_code - 1) * alpha1) / 7);
284 if (alpha_code == 6) {
286 }
else if (alpha_code == 7) {
290 (alpha_code - 1) * alpha1) / 5);
319 for (y = 0; y < 4; y++)
320 for (
x = 0;
x < 4;
x++)
355 int s = scaled ? (
b >> 3) + 1 : 1;
357 int co = (
r - 128) /
s;
358 int cg = (
g - 128) /
s;
360 src[0] = av_clip_uint8(y + co - cg);
361 src[1] = av_clip_uint8(y + cg);
362 src[2] = av_clip_uint8(y - co - cg);
363 src[3] = scaled ? 255 :
b;
383 for (y = 0; y < 4; y++)
384 for (
x = 0;
x < 4;
x++)
407 for (y = 0; y < 4; y++)
408 for (
x = 0;
x < 4;
x++)
416 const int *color_tab,
int mono,
int offset,
int pix_size)
427 for (y = 0; y < 4; y++) {
428 for (
x = 0;
x < 4;
x++) {
429 int i = indices[
x + y * 4];
431 int c = color_tab[
i];
453 r0 = ((int8_t)
block[0]) + 128;
454 r1 = ((int8_t)
block[1]) + 128;
561 for (y = 0; y < 4; y++) {
562 for (
x = 0;
x < 4;
x++) {
564 int r = c0[
x * 4 + y * 16];
565 int g =
c1[
x * 4 + y * 16];
568 int d = (255 * 255 -
r *
r -
g *
g) / 2;
627 for (y = 0; y < 4; y++) {
628 for (
x = 0;
x < 4;
x++) {
static int dxt5_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a DXT5 texture and store the resulting RGBA pixels in 'dst'.
static int dxt3_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a DXT3 texture and store the resulting RGBA pixels in 'dst'.
#define FFSWAP(type, a, b)
static int dxt4_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a DXT4 texture and store the resulting RGBA pixels in 'dst'.
static int rgtc1s_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a RGRC1 texture with signed components and store the resulting RGBA pixels in...
static av_always_inline void extract_color(uint32_t colors[4], uint16_t color0, uint16_t color1, int dxtn, int alpha)
static void decompress_indices(uint8_t *dst, const uint8_t *src)
Decompress a BC 16x3 index block stored as h g f e d c b a p o n m l k j i.
static double b1(void *priv, double x, double y)
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
static int dxn3dc_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a 3Dc texture with unsigned components and store the resulting RGBA pixels in...
static int rgtc1u_gray_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a RGTC1 texture with unsigned components to Gray 8.
static int rgtc1u_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a RGRC1 texture with unsigned components and store the resulting RGBA pixels ...
static void rgtc2_block_internal(uint8_t *dst, ptrdiff_t stride, const uint8_t *block, int sign)
static int rgtc1u_alpha_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a RGTC1 texture with unsigned components and overwrite the alpha component in...
av_cold void ff_texturedsp_init(TextureDSPContext *c)
static void dxt3_block_internal(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
static int dxt5y_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a DXT5 texture with classic YCoCg and store the resulting RGBA pixels in 'dst...
static void rgtc1_block_internal(uint8_t *dst, ptrdiff_t stride, const uint8_t *block, int sign, int mono, int offset, int pix_size)
static void rgtc_block_internal(uint8_t *dst, ptrdiff_t stride, const uint8_t *block, const int *color_tab, int mono, int offset, int pix_size)
static int rgtc2u_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a RGRC2 texture with unsigned components and store the resulting RGBA pixels ...
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
static void dxt1_block_internal(uint8_t *dst, ptrdiff_t stride, const uint8_t *block, uint8_t alpha)
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
static av_always_inline void premult2straight(uint8_t *src)
Convert a premultiplied alpha pixel to a straight alpha pixel.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
static int dxt5ys_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a DXT5 texture with scaled YCoCg and store the resulting RGBA pixels in 'dst'...
#define i(width, name, range_min, range_max)
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some it can consider them to be part of the FIFO and delay acknowledging a status change accordingly Example code
static void dxt5_block_internal(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
static int dxt1a_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a DXT1 with 1-bit alpha texture and store the resulting RGBA pixels in 'dst'.
static int rgtc2s_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a RGRC2 texture with signed components and store the resulting RGBA pixels in...
static const int16_t alpha[]
static int dxt1_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a DXT1 texture and store the resulting RGBA pixels in 'dst'.
The exact code depends on how similar the blocks are and how related they are to the block
static double b0(void *priv, double x, double y)
static int dxt2_block(uint8_t *dst, ptrdiff_t stride, const uint8_t *block)
Decompress one block of a DXT2 texture and store the resulting RGBA pixels in 'dst'.
static const ColorEntry color_table[]
static av_always_inline void ycocg2rgba(uint8_t *src, int scaled)
Convert a YCoCg buffer to RGBA.