Mercurial > libavcodec.hg
comparison error_resilience.c @ 11292:411ab09ada91 libavcodec
Get rid of mb2b8_xy and b8_stride, change arrays organized based on b8_stride to
ones based on mb_stride in h264.
about 20 cpu cycles faster overall per MB
| author | michael |
|---|---|
| date | Thu, 25 Feb 2010 23:44:42 +0000 |
| parents | f864e7927dff |
| children | c9f240e43ef9 |
comparison
equal
deleted
inserted
replaced
| 11291:1527e25ec9d4 | 11292:411ab09ada91 |
|---|---|
| 690 | 690 |
| 691 if(s->current_picture.motion_val[0] == NULL){ | 691 if(s->current_picture.motion_val[0] == NULL){ |
| 692 av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n"); | 692 av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n"); |
| 693 | 693 |
| 694 for(i=0; i<2; i++){ | 694 for(i=0; i<2; i++){ |
| 695 pic->ref_index[i]= av_mallocz(size * sizeof(uint8_t)); | 695 pic->ref_index[i]= av_mallocz(s->mb_stride * s->mb_height * 4 * sizeof(uint8_t)); |
| 696 pic->motion_val_base[i]= av_mallocz((size+4) * 2 * sizeof(uint16_t)); | 696 pic->motion_val_base[i]= av_mallocz((size+4) * 2 * sizeof(uint16_t)); |
| 697 pic->motion_val[i]= pic->motion_val_base[i]+4; | 697 pic->motion_val[i]= pic->motion_val_base[i]+4; |
| 698 } | 698 } |
| 699 pic->motion_subsample_log2= 3; | 699 pic->motion_subsample_log2= 3; |
| 700 s->current_picture= *s->current_picture_ptr; | 700 s->current_picture= *s->current_picture_ptr; |
