Mercurial > libavcodec.hg
comparison h264.h @ 10926:42cff5346e53 libavcodec
Dont init chroma elements of non_zero_count_cache for deblock.
author | michael |
---|---|
date | Mon, 18 Jan 2010 23:30:21 +0000 |
parents | cf608664f7bf |
children | bb774f0bc2b6 |
comparison
equal
deleted
inserted
replaced
10925:cf608664f7bf | 10926:42cff5346e53 |
---|---|
957 5 L . .. . . . . | 957 5 L . .. . . . . |
958 */ | 958 */ |
959 //FIXME constraint_intra_pred & partitioning & nnz (let us hope this is just a typo in the spec) | 959 //FIXME constraint_intra_pred & partitioning & nnz (let us hope this is just a typo in the spec) |
960 if(top_type){ | 960 if(top_type){ |
961 *(uint32_t*)&h->non_zero_count_cache[4+8*0]= *(uint32_t*)&h->non_zero_count[top_xy][4+3*8]; | 961 *(uint32_t*)&h->non_zero_count_cache[4+8*0]= *(uint32_t*)&h->non_zero_count[top_xy][4+3*8]; |
962 | 962 if(!for_deblock){ |
963 h->non_zero_count_cache[1+8*0]= h->non_zero_count[top_xy][1+1*8]; | 963 h->non_zero_count_cache[1+8*0]= h->non_zero_count[top_xy][1+1*8]; |
964 h->non_zero_count_cache[2+8*0]= h->non_zero_count[top_xy][2+1*8]; | 964 h->non_zero_count_cache[2+8*0]= h->non_zero_count[top_xy][2+1*8]; |
965 | 965 |
966 h->non_zero_count_cache[1+8*3]= h->non_zero_count[top_xy][1+2*8]; | 966 h->non_zero_count_cache[1+8*3]= h->non_zero_count[top_xy][1+2*8]; |
967 h->non_zero_count_cache[2+8*3]= h->non_zero_count[top_xy][2+2*8]; | 967 h->non_zero_count_cache[2+8*3]= h->non_zero_count[top_xy][2+2*8]; |
968 | 968 } |
969 }else{ | 969 }else{ |
970 if(for_deblock){ | |
971 *(uint32_t*)&h->non_zero_count_cache[4+8*0]= 0; | |
972 }else{ | |
970 h->non_zero_count_cache[4+8*0]= | 973 h->non_zero_count_cache[4+8*0]= |
971 h->non_zero_count_cache[5+8*0]= | 974 h->non_zero_count_cache[5+8*0]= |
972 h->non_zero_count_cache[6+8*0]= | 975 h->non_zero_count_cache[6+8*0]= |
973 h->non_zero_count_cache[7+8*0]= | 976 h->non_zero_count_cache[7+8*0]= |
974 | 977 |
975 h->non_zero_count_cache[1+8*0]= | 978 h->non_zero_count_cache[1+8*0]= |
976 h->non_zero_count_cache[2+8*0]= | 979 h->non_zero_count_cache[2+8*0]= |
977 | 980 |
978 h->non_zero_count_cache[1+8*3]= | 981 h->non_zero_count_cache[1+8*3]= |
979 h->non_zero_count_cache[2+8*3]= CABAC && !IS_INTRA(mb_type) ? 0 : 64; | 982 h->non_zero_count_cache[2+8*3]= CABAC && !IS_INTRA(mb_type) ? 0 : 64; |
983 } | |
980 | 984 |
981 } | 985 } |
982 | 986 |
983 for (i=0; i<2; i++) { | 987 for (i=0; i<2; i++) { |
984 if(left_type[i]){ | 988 if(left_type[i]){ |
985 h->non_zero_count_cache[3+8*1 + 2*8*i]= h->non_zero_count[left_xy[i]][left_block[8+0+2*i]]; | 989 h->non_zero_count_cache[3+8*1 + 2*8*i]= h->non_zero_count[left_xy[i]][left_block[8+0+2*i]]; |
986 h->non_zero_count_cache[3+8*2 + 2*8*i]= h->non_zero_count[left_xy[i]][left_block[8+1+2*i]]; | 990 h->non_zero_count_cache[3+8*2 + 2*8*i]= h->non_zero_count[left_xy[i]][left_block[8+1+2*i]]; |
991 if(!for_deblock){ | |
987 h->non_zero_count_cache[0+8*1 + 8*i]= h->non_zero_count[left_xy[i]][left_block[8+4+2*i]]; | 992 h->non_zero_count_cache[0+8*1 + 8*i]= h->non_zero_count[left_xy[i]][left_block[8+4+2*i]]; |
988 h->non_zero_count_cache[0+8*4 + 8*i]= h->non_zero_count[left_xy[i]][left_block[8+5+2*i]]; | 993 h->non_zero_count_cache[0+8*4 + 8*i]= h->non_zero_count[left_xy[i]][left_block[8+5+2*i]]; |
994 } | |
989 }else{ | 995 }else{ |
996 if(for_deblock){ | |
997 h->non_zero_count_cache[3+8*1 + 2*8*i]= | |
998 h->non_zero_count_cache[3+8*2 + 2*8*i]= 0; | |
999 }else{ | |
990 h->non_zero_count_cache[3+8*1 + 2*8*i]= | 1000 h->non_zero_count_cache[3+8*1 + 2*8*i]= |
991 h->non_zero_count_cache[3+8*2 + 2*8*i]= | 1001 h->non_zero_count_cache[3+8*2 + 2*8*i]= |
992 h->non_zero_count_cache[0+8*1 + 8*i]= | 1002 h->non_zero_count_cache[0+8*1 + 8*i]= |
993 h->non_zero_count_cache[0+8*4 + 8*i]= CABAC && !IS_INTRA(mb_type) ? 0 : 64; | 1003 h->non_zero_count_cache[0+8*4 + 8*i]= CABAC && !IS_INTRA(mb_type) ? 0 : 64; |
1004 } | |
994 } | 1005 } |
995 } | 1006 } |
996 | 1007 |
997 // CAVLC 8x8dct requires NNZ values for residual decoding that differ from what the loop filter needs | 1008 // CAVLC 8x8dct requires NNZ values for residual decoding that differ from what the loop filter needs |
998 if(for_deblock && !CABAC && h->pps.transform_8x8_mode){ | 1009 if(for_deblock && !CABAC && h->pps.transform_8x8_mode){ |