Revision 755bfeab libavcodec/h264.c

View differences:

libavcodec/h264.c
1602 1602
    return chroma_qp[av_clip(qscale + chroma_qp_index_offset, 0, 51)];
1603 1603
}
1604 1604

  
1605
//FIXME need to check that this doesnt overflow signed 32 bit for low qp, i am not sure, it's very close
1605
//FIXME need to check that this does not overflow signed 32 bit for low qp, i am not sure, it's very close
1606 1606
//FIXME check that gcc inlines this (and optimizes intra & separate_dc stuff away)
1607 1607
static inline int quantize_c(DCTELEM *block, uint8_t *scantable, int qscale, int intra, int separate_dc){
1608 1608
    int i;
......
4816 4816
    if(IS_INTRA_PCM(mb_type)){
4817 4817
        unsigned int x, y;
4818 4818

  
4819
        // we assume these blocks are very rare so we dont optimize it
4819
        // We assume these blocks are very rare so we do not optimize it.
4820 4820
        align_get_bits(&s->gb);
4821 4821

  
4822 4822
        // The pixels are stored in the same order as levels in h->mb array.
......
5957 5957
        const uint8_t *ptr;
5958 5958
        unsigned int x, y;
5959 5959

  
5960
        // We assume these blocks are very rare so we dont optimize it.
5960
        // We assume these blocks are very rare so we do not optimize it.
5961 5961
        // FIXME The two following lines get the bitstream position in the cabac
5962 5962
        // decode, I think it should be done by a function in cabac.h (or cabac.c).
5963 5963
        ptr= h->cabac.bytestream;
......
7721 7721

  
7722 7722
        buf_index += consumed;
7723 7723

  
7724
        if(  (s->hurry_up == 1 && h->nal_ref_idc  == 0) //FIXME dont discard SEI id
7724
        if(  (s->hurry_up == 1 && h->nal_ref_idc  == 0) //FIXME do not discard SEI id
7725 7725
           ||(avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc  == 0))
7726 7726
            continue;
7727 7727

  
......
7818 7818

  
7819 7819
        return pos;
7820 7820
    }else{
7821
        if(pos==0) pos=1; //avoid infinite loops (i doubt thats needed but ...)
7821
        if(pos==0) pos=1; //avoid infinite loops (i doubt that is needed but ...)
7822 7822
        if(pos+10>buf_size) pos=buf_size; // oops ;)
7823 7823

  
7824 7824
        return pos;
......
8084 8084
        START_TIMER
8085 8085
        j= get_ue_golomb(&gb);
8086 8086
        if(j != i){
8087
            printf("missmatch! at %d (%d should be %d) bits:%6X\n", i, j, i, s);
8087
            printf("mismatch! at %d (%d should be %d) bits:%6X\n", i, j, i, s);
8088 8088
//            return -1;
8089 8089
        }
8090 8090
        STOP_TIMER("get_ue_golomb");
......
8109 8109
        START_TIMER
8110 8110
        j= get_se_golomb(&gb);
8111 8111
        if(j != i - COUNT/2){
8112
            printf("missmatch! at %d (%d should be %d) bits:%6X\n", i, j, i, s);
8112
            printf("mismatch! at %d (%d should be %d) bits:%6X\n", i, j, i, s);
8113 8113
//            return -1;
8114 8114
        }
8115 8115
        STOP_TIMER("get_se_golomb");
......
8213 8213
        }
8214 8214

  
8215 8215
        if(memcmp(bitstream, out, COUNT)){
8216
            printf("missmatch\n");
8216
            printf("mismatch\n");
8217 8217
            return -1;
8218 8218
        }
8219 8219
    }

Also available in: Unified diff