comparison h264.c @ 5425:1fdfea5024a7 libavcodec

fix cabac decoding with some Blue-Ray sources Patch by Andreas ªÓman %andreas A olebyn P nu% Original thread: Date: Jul 7, 2007 1:23 AM Subject: [FFmpeg-devel] Corrupted blocks and seeking issues in H264 disc sources
author gpoirier
date Mon, 30 Jul 2007 21:19:36 +0000
parents 389366aa3458
children 4f2e3ef72b32
comparison
equal deleted inserted replaced
5424:07844149dfa9 5425:1fdfea5024a7
6074 h->sub_mb_type[i]= b_sub_mb_type_info[ h->sub_mb_type[i] ].type; 6074 h->sub_mb_type[i]= b_sub_mb_type_info[ h->sub_mb_type[i] ].type;
6075 } 6075 }
6076 if( IS_DIRECT(h->sub_mb_type[0] | h->sub_mb_type[1] | 6076 if( IS_DIRECT(h->sub_mb_type[0] | h->sub_mb_type[1] |
6077 h->sub_mb_type[2] | h->sub_mb_type[3]) ) { 6077 h->sub_mb_type[2] | h->sub_mb_type[3]) ) {
6078 pred_direct_motion(h, &mb_type); 6078 pred_direct_motion(h, &mb_type);
6079 h->ref_cache[0][scan8[4]] =
6080 h->ref_cache[1][scan8[4]] =
6081 h->ref_cache[0][scan8[12]] =
6082 h->ref_cache[1][scan8[12]] = PART_NOT_AVAILABLE;
6079 if( h->ref_count[0] > 1 || h->ref_count[1] > 1 ) { 6083 if( h->ref_count[0] > 1 || h->ref_count[1] > 1 ) {
6080 for( i = 0; i < 4; i++ ) 6084 for( i = 0; i < 4; i++ )
6081 if( IS_DIRECT(h->sub_mb_type[i]) ) 6085 if( IS_DIRECT(h->sub_mb_type[i]) )
6082 fill_rectangle( &h->direct_cache[scan8[4*i]], 2, 2, 8, 1, 1 ); 6086 fill_rectangle( &h->direct_cache[scan8[4*i]], 2, 2, 8, 1, 1 );
6083 } 6087 }
6109 if(dct8x8_allowed) 6113 if(dct8x8_allowed)
6110 dct8x8_allowed = get_dct8x8_allowed(h); 6114 dct8x8_allowed = get_dct8x8_allowed(h);
6111 6115
6112 for(list=0; list<h->list_count; list++){ 6116 for(list=0; list<h->list_count; list++){
6113 for(i=0; i<4; i++){ 6117 for(i=0; i<4; i++){
6118 h->ref_cache[list][ scan8[4*i] ]=h->ref_cache[list][ scan8[4*i]+1 ];
6114 if(IS_DIRECT(h->sub_mb_type[i])){ 6119 if(IS_DIRECT(h->sub_mb_type[i])){
6115 fill_rectangle(h->mvd_cache[list][scan8[4*i]], 2, 2, 8, 0, 4); 6120 fill_rectangle(h->mvd_cache[list][scan8[4*i]], 2, 2, 8, 0, 4);
6116 continue; 6121 continue;
6117 } 6122 }
6118 h->ref_cache[list][ scan8[4*i] ]=h->ref_cache[list][ scan8[4*i]+1 ];
6119 6123
6120 if(IS_DIR(h->sub_mb_type[i], 0, list) && !IS_DIRECT(h->sub_mb_type[i])){ 6124 if(IS_DIR(h->sub_mb_type[i], 0, list) && !IS_DIRECT(h->sub_mb_type[i])){
6121 const int sub_mb_type= h->sub_mb_type[i]; 6125 const int sub_mb_type= h->sub_mb_type[i];
6122 const int block_width= (sub_mb_type & (MB_TYPE_16x16|MB_TYPE_16x8)) ? 2 : 1; 6126 const int block_width= (sub_mb_type & (MB_TYPE_16x16|MB_TYPE_16x8)) ? 2 : 1;
6123 for(j=0; j<sub_partition_count[i]; j++){ 6127 for(j=0; j<sub_partition_count[i]; j++){