Go to the documentation of this file.
59 #define SKIP_PREFIX 0x8400
60 #define SKIPS_MAX 0x03FF
61 #define MKRGB555(in, off) (((in)[off] << 10) | ((in)[(off) + 1] << 5) | ((in)[(off) + 2]))
63 static const int remap[16] = { 0, 1, 4, 5, 2, 3, 6, 7, 8, 9, 12, 13, 10, 11, 14, 15 };
66 const AVFrame *pict,
int *got_packet)
75 int i, j, k,
x, y,
ret;
91 for(y = 0; y < avctx->
height; y += 4){
92 for(
x = 0;
x < avctx->
width;
x += 4){
94 int bestscore = INT_MAX;
98 for(j = 0; j < 4; j++){
99 for(
i = 0;
i < 4;
i++){
101 for(k = 0; k < 3; k++){
102 c->block[(
i + j*4)*3 + k] =
103 c->block2[
remap[
i + j*4]*3 + k] = (
val >> (10-k*5)) & 0x1F;
109 for(j = 0; j < 4; j++){
110 for(
i = 0;
i < 4*3;
i++){
111 int t = prevptr[
x*3 +
i - j*3*avctx->
width] -
c->block[
i + j*4*3];
123 for(j = 0; j < 4; j++){
124 for(
i = 0;
i < 4;
i++){
125 for(k = 0; k < 3; k++){
126 int t =
c->avg[k] -
c->block[(
i+j*4)*3+k];
133 if(score < bestscore){
143 for(
i = 0;
i < 3;
i++)
145 for(
i = 0;
i < 16;
i++)
148 for(j = 0; j < 4; j++){
149 for(
i = 0;
i < 4;
i++){
150 for(k = 0; k < 3; k++){
151 int t =
c->codebook[
c->output[
i+j*4]*3 + k] -
c->block[
i*3+k+j*4*3];
158 if(score < bestscore){
164 for(
i = 0;
i < 4;
i++){
170 for(
i = 0;
i < 3;
i++)
172 for(
i = 12;
i < 16;
i++)
175 for(j = 0; j < 4; j++){
176 for(
i = 0;
i < 4;
i++){
177 for(k = 0; k < 3; k++){
178 int t =
c->codebook2[(
c->output2[
remap[
i+j*4]] + (
i&2) + (j&2)*2)*3+k] -
c->block[
i*3+k + j*4*3];
185 if(score < bestscore){
201 bytestream_put_le16(&dst,
MKRGB555(
c->avg,0) | 0x8000);
202 for(j = 0; j < 4; j++)
203 for(
i = 0;
i < 4;
i++)
204 for(k = 0; k < 3; k++)
205 prevptr[
x*3 +
i*3 + k - j*3*avctx->
width] =
c->avg[k];
208 for(j = 0; j < 4; j++){
209 for(
i = 0;
i < 4;
i++){
210 flags |= (
c->output[
i + j*4]^1) << (
i + j*4);
211 for(k = 0; k < 3; k++)
212 prevptr[
x*3 +
i*3 + k - j*3*avctx->
width] =
c->codebook[
c->output[
i + j*4]*3 + k];
215 bytestream_put_le16(&dst,
flags);
216 bytestream_put_le16(&dst,
MKRGB555(
c->codebook, 0));
217 bytestream_put_le16(&dst,
MKRGB555(
c->codebook, 3));
220 for(j = 0; j < 4; j++){
221 for(
i = 0;
i < 4;
i++){
223 for(k = 0; k < 3; k++)
224 prevptr[
x*3 +
i*3 + k - j*3*avctx->
width] =
c->codebook2[(
c->output2[
remap[
i+j*4]] + (
i&2) + (j&2)*2)*3 + k];
227 bytestream_put_le16(&dst,
flags);
228 bytestream_put_le16(&dst,
MKRGB555(
c->codebook2, 0) | 0x8000);
229 for(
i = 3;
i < 24;
i += 3)
230 bytestream_put_le16(&dst,
MKRGB555(
c->codebook2,
i));
235 prevptr -= avctx->
width * 3 * 4;
240 bytestream_put_byte(&dst, 0);
241 bytestream_put_byte(&dst, 0);
AVPixelFormat
Pixel format.
int keyint_min
minimum GOP size
static av_cold int init(AVCodecContext *avctx)
#define FFSWAP(type, a, b)
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)
This structure describes decoded (raw) audio or video data.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about quality
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
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 double val(void *priv, double ch)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static enum AVPixelFormat pix_fmts[]
#define AV_INPUT_BUFFER_MIN_SIZE
int avpriv_init_elbg(int *points, int dim, int numpoints, int *codebook, int numCB, int max_steps, int *closest_cb, AVLFG *rand_state)
Initialize the **codebook vector for the elbg algorithm.
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
Context structure for the Lagged Fibonacci PRNG.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const int remap[16]
int flags
A combination of AV_PKT_FLAG values.
static av_cold int encode_end(AVCodecContext *avctx)
Uninit encoder.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
#define i(width, name, range_min, range_max)
AVCodec ff_msvideo1_encoder
#define AV_PIX_FMT_RGB555
const char * name
Name of the codec implementation.
static av_cold int encode_init(AVCodecContext *avctx)
init encoder
main external API structure.
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
#define MKRGB555(in, off)
This structure stores compressed data.
int width
picture width / height.
#define flags(name, subs,...)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of the image can be address...
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int64_t min_size)
Check AVPacket size and/or allocate data.
int avpriv_do_elbg(int *points, int dim, int numpoints, int *codebook, int numCB, int max_steps, int *closest_cb, AVLFG *rand_state)
Implementation of the Enhanced LBG Algorithm Based on the paper "Neural Networks 14:1219-1237" that c...