Go to the documentation of this file.
42 s->bits_per_component =
desc->comp[0].depth;
43 s->num_components =
desc->nb_components;
90 #define write16(p, value) write16_internal(s->big_endian, p, value)
91 #define write32(p, value) write32_internal(s->big_endian, p, value)
100 for (y = 0; y < avctx->
height; y++) {
101 for (
x = 0;
x < avctx->
width;
x++) {
125 for (y = 0; y < avctx->
height; y++) {
126 for (
x = 0;
x < avctx->
width;
x++) {
140 for (
i = 0;
i < 3;
i++)
148 const uint16_t *
src[3] = {(uint16_t*)pic->
data[0],
149 (uint16_t*)pic->
data[1],
150 (uint16_t*)pic->
data[2]};
152 pad = avctx->
width*6;
153 pad = (
FFALIGN(pad, 4) - pad) >> 1;
154 for (y = 0; y < avctx->
height; y++) {
155 for (
x = 0;
x < avctx->
width;
x++) {
166 for (
i = 0;
i < 3;
i++)
169 for (
i = 0;
i < pad;
i++)
171 for (
i = 0;
i < 3;
i++)
183 #define HEADER_SIZE 1664
184 if (
s->bits_per_component == 10)
186 else if (
s->bits_per_component == 12) {
194 len = avctx->
width *
s->num_components *
s->bits_per_component >> 3;
208 memcpy (buf + 8,
"V1.0", 4);
213 write32(buf + 660, 0xFFFFFFFF);
220 buf[800] =
s->descriptor;
223 buf[803] =
s->bits_per_component;
224 write16(buf + 804, (
s->bits_per_component == 10 ||
s->bits_per_component == 12) ?
232 switch(
s->bits_per_component) {
242 memset(dst +
len, 0, need_align);
243 dst +=
len + need_align;
AVPixelFormat
Pixel format.
static av_cold int init(AVCodecContext *avctx)
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define write16(p, value)
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 av_always_inline void write16_internal(int big_endian, void *p, int value)
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
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 flags
AV_CODEC_FLAG_*.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static av_always_inline void write32_internal(int big_endian, void *p, int value)
@ AV_PIX_FMT_GBRP12LE
planar GBR 4:4:4 36bpp, little-endian
static enum AVPixelFormat pix_fmts[]
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
#define write32(p, value)
@ AV_PIX_FMT_GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
@ 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.
static void encode_gbrp12(AVCodecContext *avctx, const AVFrame *pic, uint16_t *dst)
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define MKBETAG(a, b, c, d)
int flags
A combination of AV_PKT_FLAG values.
#define AV_LOG_INFO
Standard information.
@ 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)
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 default value
#define AV_PIX_FMT_FLAG_BE
Pixel format is big-endian.
const char * name
Name of the codec implementation.
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
@ AV_PIX_FMT_GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
main external API structure.
static void encode_gbrp10(AVCodecContext *avctx, const AVFrame *pic, uint8_t *dst)
static void encode_rgb48_10bit(AVCodecContext *avctx, const AVFrame *pic, uint8_t *dst)
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
static av_cold int encode_init(AVCodecContext *avctx)
@ AV_PIX_FMT_GRAY16LE
Y , 16bpp, little-endian.
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
int av_image_copy_to_buffer(uint8_t *dst, int dst_size, const uint8_t *const src_data[4], const int src_linesize[4], enum AVPixelFormat pix_fmt, int width, int height, int align)
Copy image data from an image into a buffer.
This structure stores compressed data.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int64_t min_size)
Check AVPacket size and/or allocate data.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel.