Go to the documentation of this file.
55 int *n_datum,
int is_big,
int shift)
62 *lbuf =
read32(ptr, is_big);
73 int *n_datum,
int is_big,
int shift)
78 *lbuf =
read32(ptr, is_big);
82 *lbuf = *lbuf << 10 | *lbuf >>
shift & 0x3FFFFF;
88 int *n_datum,
int is_big)
93 *lbuf =
read32(ptr, is_big);
98 case 7:
return *lbuf & 0xFFF;
99 case 6:
return (*lbuf >> 12) & 0xFFF;
101 uint32_t
c = *lbuf >> 24;
102 *lbuf =
read32(ptr, is_big);
106 case 4:
return (*lbuf >> 4) & 0xFFF;
107 case 3:
return (*lbuf >> 16) & 0xFFF;
109 uint32_t
c = *lbuf >> 28;
110 *lbuf =
read32(ptr, is_big);
114 case 1:
return (*lbuf >> 8) & 0xFFF;
115 default:
return *lbuf >> 20;
125 int buf_size = avpkt->
size;
128 uint32_t header_version,
version = 0;
130 char input_device[33];
133 int magic_num, endian;
135 int w,
h, bits_per_color, descriptor,
elements, packing;
136 int encoding, need_align = 0;
138 unsigned int rgbBuffer = 0;
141 if (avpkt->
size <= 1634) {
151 if (magic_num ==
AV_RL32(
"SDPX")) {
153 }
else if (magic_num ==
AV_RB32(
"SDPX")) {
166 header_version =
read32(&buf, 0);
167 if (header_version ==
MKTAG(
'V',
'1',
'.',
'0'))
169 if (header_version ==
MKTAG(
'V',
'2',
'.',
'0'))
176 buf = avpkt->
data + 660;
178 if (
ret != 0xFFFFFFFF) {
181 "not properly decode.\n");
185 buf = avpkt->
data + 0x304;
199 bits_per_color = buf[0];
201 packing =
read16(&buf, endian);
202 encoding =
read16(&buf, endian);
220 buf = avpkt->
data + 1724;
224 if (q.
num > 0 && q.
den > 0)
229 switch (descriptor) {
250 switch (bits_per_color) {
307 switch (1000 * descriptor + 10 * bits_per_color + endian) {
390 input_device[32] =
'\0';
399 switch (bits_per_color) {
402 uint16_t *dst[4] = {(uint16_t*)ptr[0],
406 int shift =
elements > 1 ? packing == 1 ? 22 : 20 : packing == 1 ? 2 : 0;
407 for (y = 0; y < avctx->
width; y++) {
410 &n_datum, endian,
shift);
413 &n_datum, endian,
shift);
416 &n_datum, endian,
shift);
419 &n_datum, endian,
shift);
423 &n_datum, endian,
shift);
425 if (memcmp(input_device,
"Scanity", 7))
433 uint16_t *dst[4] = {(uint16_t*)ptr[0],
437 int shift = packing == 1 ? 4 : 0;
438 for (y = 0; y < avctx->
width; y++) {
478 for (y = 0; y < avctx->
width; y++) {
#define AV_LOG_WARNING
Something somehow does not look correct.
static const ElemCat * elements[ELEMENT_COUNT]
#define MKTAG(a, b, c, d)
This structure describes decoded (raw) audio or video data.
@ AV_PIX_FMT_RGBA64BE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
static uint16_t read10in32_gray(const uint8_t **ptr, uint32_t *lbuf, int *n_datum, int is_big, int shift)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
void av_image_copy_plane(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int bytewidth, int height)
Copy image plane from src to dst.
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static av_always_inline float av_int2float(uint32_t i)
Reinterpret a 32-bit integer as a float.
#define AV_PIX_FMT_GBRP10
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
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_GBRAP12
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
#define AV_PIX_FMT_GRAY10
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
Rational number (pair of numerator and denominator).
@ AV_PIX_FMT_RGB48LE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
@ AV_PIX_FMT_RGBA64LE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
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 uint16_t read12in32(const uint8_t **ptr, uint32_t *lbuf, int *n_datum, int is_big)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define AV_NUM_DATA_POINTERS
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
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
#define AV_LOG_INFO
Standard information.
static unsigned int read16(const uint8_t **ptr, int is_big)
@ AV_PIX_FMT_RGB48BE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
#define i(width, name, range_min, range_max)
static uint16_t read10in32(const uint8_t **ptr, uint32_t *lbuf, int *n_datum, int is_big, int shift)
#define AV_PIX_FMT_GBRP12
AVRational av_d2q(double d, int max)
Convert a double precision floating point number to a rational.
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
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
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
int ff_set_sar(AVCodecContext *avctx, AVRational sar)
Check that the provided sample aspect ratio is valid and set it on the codec context.
main external API structure.
AVDictionary * metadata
metadata.
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
static int shift(int a, int b)
@ AV_PIX_FMT_GRAY16LE
Y , 16bpp, little-endian.
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
This structure stores compressed data.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static unsigned int read32(const uint8_t **ptr, int is_big)
#define AV_PIX_FMT_GRAY12
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel.
#define av_fourcc2str(fourcc)