Go to the documentation of this file.
54 int level, uni_code, uni_len;
77 uni_code ^= (1<<uni_len)-1;
80 uni_code<<=
size; uni_code|=l;
83 uni_code<<=1; uni_code|=1;
93 uni_code ^= (1<<uni_len)-1;
96 uni_code<<=
size; uni_code|=l;
99 uni_code<<=1; uni_code|=1;
111 switch(
s->msmpeg4_version){
118 if(
s->workaround_bugs){
131 #if CONFIG_VC1_DECODER
141 if(
s->msmpeg4_version>=4){
157 xy =
s->block_index[n];
163 a =
s->coded_block[xy - 1 ];
164 b =
s->coded_block[xy - 1 -
wrap];
165 c =
s->coded_block[xy -
wrap];
174 *coded_block_ptr = &
s->coded_block[xy];
183 for(y=0; y<block_size; y++){
185 for(
x=0;
x<block_size;
x++){
189 return FASTDIV((sum + (scale>>1)), scale);
194 int16_t **dc_val_ptr,
int *dir_ptr)
201 scale =
s->y_dc_scale;
203 scale =
s->c_dc_scale;
206 wrap =
s->block_wrap[n];
207 dc_val=
s->dc_val[0] +
s->block_index[n];
213 b = dc_val[ - 1 -
wrap];
216 if(
s->first_slice_line && (n&2)==0 &&
s->msmpeg4_version<4){
224 #if ARCH_X86 && HAVE_7REGS && HAVE_EBX_AVAILABLE
226 "movl %3, %%eax \n\t"
227 "shrl $1, %%eax \n\t"
228 "addl %%eax, %2 \n\t"
229 "addl %%eax, %1 \n\t"
230 "addl %0, %%eax \n\t"
232 "movl %%edx, %0 \n\t"
233 "movl %1, %%eax \n\t"
235 "movl %%edx, %1 \n\t"
236 "movl %2, %%eax \n\t"
238 "movl %%edx, %2 \n\t"
239 :
"+b" (
a),
"+c" (
b),
"+D" (
c)
246 a = (
a + (8 >> 1)) / 8;
247 b = (
b + (8 >> 1)) / 8;
248 c = (
c + (8 >> 1)) / 8;
257 if(
s->msmpeg4_version>3){
258 if(
s->inter_intra_pred){
277 int bs = 8 >>
s->avctx->lowres;
280 dest=
s->current_picture.f->data[0] + (((n >> 1) + 2*
s->mb_y) * bs*
wrap ) + ((n & 1) + 2*
s->mb_x) * bs;
283 dest=
s->current_picture.f->data[n - 3] + (
s->mb_y * bs *
wrap) +
s->mb_x * bs;
285 if(
s->mb_x==0)
a= (1024 + (scale>>1))/scale;
286 else a=
get_dc(dest-bs,
wrap, scale*8>>(2*
s->avctx->lowres), bs);
287 if(
s->mb_y==0)
c= (1024 + (scale>>1))/scale;
290 if (
s->h263_aic_dir==0) {
293 }
else if (
s->h263_aic_dir==1) {
301 }
else if (
s->h263_aic_dir==2) {
334 *dc_val_ptr = &dc_val[0];
av_cold void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable)
const uint8_t ff_mpeg1_dc_scale_table[128]
const uint8_t ff_wmv1_scantable[WMV1_SCANTABLE_COUNT][64]
av_cold void ff_msmpeg4_common_init(MpegEncContext *s)
const uint32_t ff_inverse[257]
const uint8_t ff_mpeg4_DCtab_chrom[13][2]
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
const uint8_t ff_wmv3_dc_scale_table[32]
const uint8_t ff_mpeg4_DCtab_lum[13][2]
uint32_t ff_v2_dc_lum_table[512][2]
static int get_dc(uint8_t *src, int stride, int scale, int block_size)
uint32_t ff_v2_dc_chroma_table[512][2]
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
const uint8_t ff_mpeg4_y_dc_scale_table[32]
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
int ff_msmpeg4_pred_dc(MpegEncContext *s, int n, int16_t **dc_val_ptr, int *dir_ptr)
static const float pred[4]
const uint8_t ff_old_ff_y_dc_scale_table[32]
const uint8_t ff_mpeg4_c_dc_scale_table[32]
const uint8_t ff_wmv1_y_dc_scale_table[32]
static av_cold void init_h263_dc_for_msmpeg4(void)
const uint8_t ff_wmv1_c_dc_scale_table[32]
int ff_msmpeg4_coded_block_pred(MpegEncContext *s, int n, uint8_t **coded_block_ptr)