Go to the documentation of this file.
48 int len,
int pixelstride)
50 unsigned char pixel, count;
51 unsigned char *orig = out_buf;
54 while (out_buf < out_end) {
57 pixel = bytestream2_get_byteu(&
s->g);
58 if (!(count = (
pixel & 0x7f))) {
63 if (out_end - out_buf <= pixelstride * (count - 1)) {
70 *out_buf = bytestream2_get_byte(&
s->g);
71 out_buf += pixelstride;
74 pixel = bytestream2_get_byte(&
s->g);
78 out_buf += pixelstride;
82 return (out_buf - orig) / pixelstride;
86 int len,
int pixelstride)
90 unsigned short *orig = out_buf;
91 uint16_t *out_end = out_buf +
len;
93 while (out_buf < out_end) {
96 pixel = bytestream2_get_be16u(&
s->g);
97 if (!(count = (
pixel & 0x7f)))
101 if (out_end - out_buf <= pixelstride * (count - 1)) {
110 out_buf += pixelstride;
117 out_buf += pixelstride;
121 return (out_buf - orig) / pixelstride;
134 unsigned int len =
s->height *
s->depth * 4;
137 unsigned int start_offset;
145 for (z = 0; z <
s->depth; z++) {
147 for (y = 0; y <
s->height; y++) {
148 linesize =
s->width *
s->depth;
149 dest_row -=
s->linesize;
150 start_offset = bytestream2_get_be32(&g_table);
152 if (
s->bytes_per_channel == 1)
172 unsigned int offset =
s->height *
s->width *
s->bytes_per_channel;
181 for (z = 0; z <
s->depth; z++) {
186 for (y =
s->height - 1; y >= 0; y--) {
187 out_end = out_buf + (y *
s->linesize);
188 if (
s->bytes_per_channel == 1) {
189 for (
x =
s->width;
x > 0;
x--)
190 for (z = 0; z <
s->depth; z++)
191 *out_end++ = bytestream2_get_byteu(&
gp[z]);
193 uint16_t *out16 = (uint16_t *)out_end;
194 for (
x =
s->width;
x > 0;
x--)
195 for (z = 0; z <
s->depth; z++)
203 void *
data,
int *got_frame,
219 if (bytestream2_get_be16u(&
s->g) !=
SGI_MAGIC) {
224 rle = bytestream2_get_byteu(&
s->g);
225 s->bytes_per_channel = bytestream2_get_byteu(&
s->g);
227 s->width = bytestream2_get_be16u(&
s->g);
228 s->height = bytestream2_get_be16u(&
s->g);
229 s->depth = bytestream2_get_be16u(&
s->g);
231 if (
s->bytes_per_channel != 1 &&
s->bytes_per_channel != 2) {
262 out_buf = p->
data[0];
264 out_end = out_buf + p->
linesize[0] *
s->height;
static av_cold int init(AVCodecContext *avctx)
unsigned int bytes_per_channel
This structure describes decoded (raw) audio or video data.
static av_always_inline int bytestream2_seek(GetByteContext *g, int offset, int whence)
@ 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 int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static int expand_rle_row16(SgiState *s, uint16_t *out_buf, int len, int pixelstride)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
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 key_frame
1 -> keyframe, 0-> not
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
#define SGI_MAGIC
SGI image file signature.
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
@ AV_PICTURE_TYPE_I
Intra.
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
enum AVPictureType pict_type
Picture type of the frame.
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 bytestream2_get_ne16
static int read_rle_sgi(uint8_t *out_buf, SgiState *s)
Read a run length encoded SGI image.
static int read_uncompressed_sgi(unsigned char *out_buf, SgiState *s)
Read an uncompressed SGI image.
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
@ 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...
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static int expand_rle_row8(SgiState *s, uint8_t *out_buf, int len, int pixelstride)
Expand an RLE row into a channel.
main external API structure.
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.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
The official guide to swscale for confused that consecutive non overlapping rectangles of dimension(0, slice_top) -(picture_width
#define bytestream2_get_ne16u
static av_cold int sgi_decode_init(AVCodecContext *avctx)