Revision 2cab6401

View differences:

doc/faq.texi
429 429

  
430 430
See @url{http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3}
431 431

  
432
@section I have a file in memory / a API different from *open/*read/ libc how do i use it with libavformat?
432
@section I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?
433 433

  
434 434
You have to implement a URLProtocol, see libavformat/file.c in FFmpeg
435 435
and libmpdemux/demux_lavf.c in MPlayer sources.
libavcodec/dsputil.h
99 99

  
100 100
!warning These alignments might not match reality, (missing attribute((align))
101 101
stuff somewhere possible).
102
I (Michael) did not check them, these are just the alignments which i think
102
I (Michael) did not check them, these are just the alignments which I think
103 103
could be reached easily ...
104 104

  
105 105
!future video codecs might need functions with less strict alignment
libavcodec/flicvideo.c
483 483
        switch (chunk_type) {
484 484
        case FLI_256_COLOR:
485 485
        case FLI_COLOR:
486
            /* For some reason, it seems that non-paletised flics do include one of these */
487
            /* chunks in their first frame.  Why i do not know, it seems rather extraneous */
486
            /* For some reason, it seems that non-palettized flics do
487
             * include one of these chunks in their first frame.
488
             * Why I do not know, it seems rather extraneous. */
488 489
/*            av_log(avctx, AV_LOG_ERROR, "Unexpected Palette chunk %d in non-paletised FLC\n",chunk_type);*/
489 490
            stream_ptr = stream_ptr + chunk_size - 6;
490 491
            break;
libavcodec/h264.c
91 91
    if(for_deblock && (h->slice_num == 1 || h->slice_table[mb_xy] == h->slice_table[top_xy]) && !FRAME_MBAFF)
92 92
        return;
93 93

  
94
    //wow what a mess, why didn't they simplify the interlacing&intra stuff, i can't imagine that these complex rules are worth it
94
    /* Wow, what a mess, why didn't they simplify the interlacing & intra
95
     * stuff, I can't imagine that these complex rules are worth it. */
95 96

  
96 97
    topleft_xy = top_xy - 1;
97 98
    topright_xy= top_xy + 1;
......
1589 1590
    return h->pps.chroma_qp_table[t][qscale & 0xff];
1590 1591
}
1591 1592

  
1592
//FIXME need to check that this does not overflow signed 32 bit for low qp, i am not sure, it's very close
1593
//FIXME need to check that this does not overflow signed 32 bit for low qp, I am not sure, it's very close
1593 1594
//FIXME check that gcc inlines this (and optimizes intra & separate_dc stuff away)
1594 1595
static inline int quantize_c(DCTELEM *block, uint8_t *scantable, int qscale, int intra, int separate_dc){
1595 1596
    int i;
libavcodec/h264.h
349 349
    GetBitContext *inter_gb_ptr;
350 350

  
351 351
    DECLARE_ALIGNED_16(DCTELEM, mb[16*24]);
352
    DCTELEM mb_padding[256];        ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either check that i is not to large or ensure that there is some unused stuff after mb
352
    DCTELEM mb_padding[256];        ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either check that i is not too large or ensure that there is some unused stuff after mb
353 353

  
354 354
    /**
355 355
     * Cabac
libavcodec/utils.c
539 539
{"normal", NULL, 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_NORMAL, INT_MIN, INT_MAX, V|E, "strict"},
540 540
{"inofficial", "allow inofficial extensions", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_INOFFICIAL, INT_MIN, INT_MAX, V|E, "strict"},
541 541
{"experimental", "allow non standardized experimental things", 0, FF_OPT_TYPE_CONST, FF_COMPLIANCE_EXPERIMENTAL, INT_MIN, INT_MAX, V|E, "strict"},
542
{"b_qoffset", "qp offset between p and b frames", OFFSET(b_quant_offset), FF_OPT_TYPE_FLOAT, 1.25, FLT_MIN, FLT_MAX, V|E},
542
{"b_qoffset", "qp offset between P and B frames", OFFSET(b_quant_offset), FF_OPT_TYPE_FLOAT, 1.25, FLT_MIN, FLT_MAX, V|E},
543 543
{"er", "set error resilience strategy", OFFSET(error_resilience), FF_OPT_TYPE_INT, FF_ER_CAREFUL, INT_MIN, INT_MAX, A|V|D, "er"},
544 544
{"careful", NULL, 0, FF_OPT_TYPE_CONST, FF_ER_CAREFUL, INT_MIN, INT_MAX, V|D, "er"},
545 545
{"compliant", NULL, 0, FF_OPT_TYPE_CONST, FF_ER_COMPLIANT, INT_MIN, INT_MAX, V|D, "er"},
......
560 560
{"minrate", "set min video bitrate tolerance (in bits/s)", OFFSET(rc_min_rate), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
561 561
{"bufsize", "set ratecontrol buffer size (in bits)", OFFSET(rc_buffer_size), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, A|V|E},
562 562
{"rc_buf_aggressivity", "currently useless", OFFSET(rc_buffer_aggressivity), FF_OPT_TYPE_FLOAT, 1.0, FLT_MIN, FLT_MAX, V|E},
563
{"i_qfactor", "qp factor between p and i frames", OFFSET(i_quant_factor), FF_OPT_TYPE_FLOAT, -0.8, -FLT_MAX, FLT_MAX, V|E},
564
{"i_qoffset", "qp offset between p and i frames", OFFSET(i_quant_offset), FF_OPT_TYPE_FLOAT, 0.0, -FLT_MAX, FLT_MAX, V|E},
563
{"i_qfactor", "qp factor between P and I frames", OFFSET(i_quant_factor), FF_OPT_TYPE_FLOAT, -0.8, -FLT_MAX, FLT_MAX, V|E},
564
{"i_qoffset", "qp offset between P and I frames", OFFSET(i_quant_offset), FF_OPT_TYPE_FLOAT, 0.0, -FLT_MAX, FLT_MAX, V|E},
565 565
{"rc_init_cplx", "initial complexity for 1-pass encoding", OFFSET(rc_initial_cplx), FF_OPT_TYPE_FLOAT, DEFAULT, -FLT_MAX, FLT_MAX, V|E},
566 566
{"dct", "DCT algorithm", OFFSET(dct_algo), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, V|E, "dct"},
567 567
{"auto", "autoselect a good one (default)", 0, FF_OPT_TYPE_CONST, FF_DCT_AUTO, INT_MIN, INT_MAX, V|E, "dct"},
libavcodec/xvmcvideo.c
275 275

  
276 276
    for(i=0; i<blocks_per_mb; i++){
277 277
        if(s->block_last_index[i] >= 0){
278
            // i do not have unsigned_intra MOCO to test, hope it is OK
278
            // I do not have unsigned_intra MOCO to test, hope it is OK
279 279
            if( (s->mb_intra) && ( render->idct || (!render->idct && !render->unsigned_intra)) )
280 280
                s->pblocks[i][0]-=1<<10;
281 281
            if(!render->idct){
libavformat/nutdec.c
854 854
                                                next_node[0]->back_ptr, next_node[1]->back_ptr, flags, &ts, nut_read_timestamp);
855 855
            if(pos2>=0)
856 856
                pos= pos2;
857
            //FIXME dir but i think it does not matter
857
            //FIXME dir but I think it does not matter
858 858
        }
859 859
        dummy.pos= pos;
860 860
        sp= av_tree_find(nut->syncpoints, &dummy, ff_nut_sp_pos_cmp, NULL);
libavutil/mem.c
72 72
        Because some CPUs need alignment, for example SSE2 on P4, & most RISC CPUs
73 73
        it will just trigger an exception and the unaligned load will be done in the
74 74
        exception handler or it will just segfault (SSE2 on P4)
75
        Why not larger? because i did not see a difference in benchmarks ...
75
        Why not larger? Because I did not see a difference in benchmarks ...
76 76
     */
77 77
     /* benchmarks with p3
78 78
        memalign(64)+1          3071,3051,3032
libpostproc/postprocess.c
47 47
MedianDeinterlace#      E       Ec      Ec
48 48
TempDeNoiser#           E               e       e       Ec
49 49

  
50
* i do not have a 3DNow! CPU -> it is untested, but no one said it does not work so it seems to work
50
* I do not have a 3DNow! CPU -> it is untested, but no one said it does not work so it seems to work
51 51
# more or less selfinvented filters so the exactness is not too meaningful
52 52
E = Exact implementation
53 53
e = allmost exact implementation (slightly different rounding,...)
libpostproc/postprocess_altivec_template.c
110 110
    (vector signed short)vec_mergeh((vector signed char)zero,           \
111 111
                                    (vector signed char)v_srcA##i)
112 112

  
113
    // special casing the aligned case is worthwhile, as all call from
114
    // the (transposed) horizontable deblocks will be aligned, i naddition
115
    // to the naturraly aligned vertical deblocks.
113
    /* Special-casing the aligned case is worthwhile, as all calls from
114
     * the (transposed) horizontable deblocks will be aligned, in addition
115
     * to the naturally aligned vertical deblocks. */
116 116
    if (properStride && srcAlign) {
117 117
      LOAD_LINE_ALIGNED(0);
118 118
      LOAD_LINE_ALIGNED(1);
......
230 230
    (vector signed short)vec_mergeh((vector signed char)zero,           \
231 231
                                    (vector signed char)vbT##i)
232 232

  
233
    // special casing the aligned case is worthwhile, as all call from
234
    // the (transposed) horizontable deblocks will be aligned, in addition
235
    // to the naturraly aligned vertical deblocks.
233
    /* Special-casing the aligned case is worthwhile, as all calls from
234
     * the (transposed) horizontable deblocks will be aligned, in addition
235
     * to the naturally aligned vertical deblocks. */
236 236
    if (properStride && srcAlign) {
237 237
      LOAD_LINE_ALIGNED(0);
238 238
      LOAD_LINE_ALIGNED(1);
......
348 348
    vec_perm(vf##i, vbT##i, permHH);                            \
349 349
  vec_st(vg##i, i * stride, src2)
350 350

  
351
  // special casing the aligned case is worthwhile, as all call from
352
  // the (transposed) horizontable deblocks will be aligned, in addition
353
  // to the naturraly aligned vertical deblocks.
351
  /* Special-casing the aligned case is worthwhile, as all calls from
352
   * the (transposed) horizontable deblocks will be aligned, in addition
353
   * to the naturally aligned vertical deblocks. */
354 354
  if (properStride && srcAlign) {
355 355
    PACK_AND_STORE_ALIGNED(1);
356 356
    PACK_AND_STORE_ALIGNED(2);

Also available in: Unified diff