Go to the documentation of this file.
35 #define PADDING_COLOR 0
57 int linesize,
int w,
int h)
61 for (y = 0; y <
h; y++) {
69 color = bitmap[x1++] & 3;
70 while (x1 <
w && (bitmap[x1] & 3) ==
color)
103 static const int tc_divs[3] = { 1000, 60, 60 };
105 for (
i=0;
i<3;
i++) {
106 tc[
i] = ms % tc_divs[
i];
116 uint64_t startTime =
h->pts / 1000;
117 uint64_t endTime = startTime +
h->end_display_time -
h->start_display_time;
118 int start_tc[4], end_tc[4];
125 if (bufsize < 27 + 7*2 + 4*3) {
131 if (
h->num_rects != 1)
136 if (!
h->rects[0]->data[0]) {
139 for (j = 0; j < 4; j++) {
141 rect->linesize[j] =
rect->pict.linesize[j];
148 if (!
h->rects[0]->data[0] || !
h->rects[0]->data[1]) {
154 if (
h->rects[0]->nb_colors > 4)
155 av_log(avctx,
AV_LOG_WARNING,
"No more than 4 subtitle colors supported (%d found.)\n",
h->rects[0]->nb_colors);
158 if (((uint32_t *)
h->rects[0]->data[1])[0] & 0xff000000)
159 av_log(avctx,
AV_LOG_WARNING,
"Color index 0 is not transparent. Transparency will be messed up.\n");
167 "[%02d:%02d:%02d.%03d-%02d:%02d:%02d.%03d]",
168 start_tc[3], start_tc[2], start_tc[1], start_tc[0],
169 end_tc[3], end_tc[2], end_tc[1], end_tc[0]);
178 bytestream_put_le16(&hdr,
width);
179 bytestream_put_le16(&hdr,
height);
180 bytestream_put_le16(&hdr,
h->rects[0]->x);
181 bytestream_put_le16(&hdr,
h->rects[0]->y);
182 bytestream_put_le16(&hdr,
h->rects[0]->x +
width -1);
183 bytestream_put_le16(&hdr,
h->rects[0]->y +
height -1);
190 bytestream_put_be24(&hdr, ((uint32_t *)
h->rects[0]->data[1])[
i]);
196 h->rects[0]->linesize[0] * 2,
197 h->rects[0]->w, (
h->rects[0]->h + 1) >> 1))
202 h->rects[0]->linesize[0] * 2,
203 h->rects[0]->w,
h->rects[0]->h >> 1))
207 if (
h->rects[0]->h & 1) {
#define FF_ENABLE_DEPRECATION_WARNINGS
#define AV_LOG_WARNING
Something somehow does not look correct.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define PADDING
Number of pixels to pad left and right.
#define MKTAG(a, b, c, d)
static void put_xsub_rle(PutBitContext *pb, int len, int color)
Encode a single color run.
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
static int make_tc(uint64_t ms, int *tc)
#define AVERROR_BUFFER_TOO_SMALL
Buffer too small.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int xsub_encode(AVCodecContext *avctx, unsigned char *buf, int bufsize, const AVSubtitle *h)
const uint8_t ff_log2_tab[256]
static int xsub_encode_rle(PutBitContext *pb, const uint8_t *bitmap, int linesize, int w, int h)
Encode a 4-color bitmap with XSUB rle.
void avpriv_align_put_bits(PutBitContext *s)
Pad the bitstream with zeros up to the next byte boundary.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
#define i(width, name, range_min, range_max)
static int put_bits_count(PutBitContext *s)
const char * name
Name of the codec implementation.
static av_cold int xsub_encoder_init(AVCodecContext *avctx)
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
main external API structure.
#define FF_DISABLE_DEPRECATION_WARNINGS
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').