Revision 6d7e6b26 libavcodec/h264.h

View differences:

libavcodec/h264.h
834 834
                }
835 835

  
836 836
                ref = &s->current_picture.ref_index[list][h->mb2b8_xy[mb_xy]];
837
                if(for_deblock){
838
                    int (*ref2frm)[64] = h->ref2frm[ h->slice_num&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2);
839
                    *(uint32_t*)&h->ref_cache[list][scan8[ 0]] =
840
                    *(uint32_t*)&h->ref_cache[list][scan8[ 2]] = (pack16to32(ref2frm[list][ref[0]],ref2frm[list][ref[1]])&0x00FF00FF)*0x0101;
841
                    ref += h->b8_stride;
842
                    *(uint32_t*)&h->ref_cache[list][scan8[ 8]] =
843
                    *(uint32_t*)&h->ref_cache[list][scan8[10]] = (pack16to32(ref2frm[list][ref[0]],ref2frm[list][ref[1]])&0x00FF00FF)*0x0101;
844
                }else{
837 845
                *(uint32_t*)&h->ref_cache[list][scan8[ 0]] =
838 846
                *(uint32_t*)&h->ref_cache[list][scan8[ 2]] = (pack16to32(ref[0],ref[1])&0x00FF00FF)*0x0101;
839 847
                ref += h->b8_stride;
840 848
                *(uint32_t*)&h->ref_cache[list][scan8[ 8]] =
841 849
                *(uint32_t*)&h->ref_cache[list][scan8[10]] = (pack16to32(ref[0],ref[1])&0x00FF00FF)*0x0101;
850
                }
842 851

  
843 852
                b_xy = 4*s->mb_x + 4*s->mb_y*h->b_stride;
844 853
                for(y=0; y<4; y++){
......
1029 1038
                *(uint32_t*)h->mv_cache[list][scan8[0] + 1 - 1*8]= *(uint32_t*)s->current_picture.motion_val[list][b_xy + 1];
1030 1039
                *(uint32_t*)h->mv_cache[list][scan8[0] + 2 - 1*8]= *(uint32_t*)s->current_picture.motion_val[list][b_xy + 2];
1031 1040
                *(uint32_t*)h->mv_cache[list][scan8[0] + 3 - 1*8]= *(uint32_t*)s->current_picture.motion_val[list][b_xy + 3];
1041
                if(for_deblock){
1042
                    int (*ref2frm)[64] = h->ref2frm[ h->slice_table[top_xy]&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2);
1043
                    h->ref_cache[list][scan8[0] + 0 - 1*8]=
1044
                    h->ref_cache[list][scan8[0] + 1 - 1*8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 0]];
1045
                    h->ref_cache[list][scan8[0] + 2 - 1*8]=
1046
                    h->ref_cache[list][scan8[0] + 3 - 1*8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + 1]];
1047
                }else{
1032 1048
                h->ref_cache[list][scan8[0] + 0 - 1*8]=
1033 1049
                h->ref_cache[list][scan8[0] + 1 - 1*8]= s->current_picture.ref_index[list][b8_xy + 0];
1034 1050
                h->ref_cache[list][scan8[0] + 2 - 1*8]=
1035 1051
                h->ref_cache[list][scan8[0] + 3 - 1*8]= s->current_picture.ref_index[list][b8_xy + 1];
1052
                }
1036 1053
            }else{
1037 1054
                *(uint32_t*)h->mv_cache [list][scan8[0] + 0 - 1*8]=
1038 1055
                *(uint32_t*)h->mv_cache [list][scan8[0] + 1 - 1*8]=
1039 1056
                *(uint32_t*)h->mv_cache [list][scan8[0] + 2 - 1*8]=
1040 1057
                *(uint32_t*)h->mv_cache [list][scan8[0] + 3 - 1*8]= 0;
1041
                *(uint32_t*)&h->ref_cache[list][scan8[0] + 0 - 1*8]= ((top_type ? LIST_NOT_USED : PART_NOT_AVAILABLE)&0xFF)*0x01010101;
1058
                *(uint32_t*)&h->ref_cache[list][scan8[0] + 0 - 1*8]= (((for_deblock||top_type) ? LIST_NOT_USED : PART_NOT_AVAILABLE)&0xFF)*0x01010101;
1042 1059
            }
1043 1060

  
1044 1061
            for(i=0; i<2; i++){
......
1048 1065
                    const int b8_xy= h->mb2b8_xy[left_xy[i]] + 1;
1049 1066
                    *(uint32_t*)h->mv_cache[list][cache_idx  ]= *(uint32_t*)s->current_picture.motion_val[list][b_xy + h->b_stride*left_block[0+i*2]];
1050 1067
                    *(uint32_t*)h->mv_cache[list][cache_idx+8]= *(uint32_t*)s->current_picture.motion_val[list][b_xy + h->b_stride*left_block[1+i*2]];
1068
                    if(for_deblock){
1069
                        int (*ref2frm)[64] = h->ref2frm[ h->slice_table[left_xy[i]]&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2);
1070
                        h->ref_cache[list][cache_idx  ]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + h->b8_stride*(left_block[0+i*2]>>1)]];
1071
                        h->ref_cache[list][cache_idx+8]= ref2frm[list][s->current_picture.ref_index[list][b8_xy + h->b8_stride*(left_block[1+i*2]>>1)]];
1072
                    }else{
1051 1073
                    h->ref_cache[list][cache_idx  ]= s->current_picture.ref_index[list][b8_xy + h->b8_stride*(left_block[0+i*2]>>1)];
1052 1074
                    h->ref_cache[list][cache_idx+8]= s->current_picture.ref_index[list][b8_xy + h->b8_stride*(left_block[1+i*2]>>1)];
1075
                    }
1053 1076
                }else{
1054 1077
                    *(uint32_t*)h->mv_cache [list][cache_idx  ]=
1055 1078
                    *(uint32_t*)h->mv_cache [list][cache_idx+8]= 0;
1056 1079
                    h->ref_cache[list][cache_idx  ]=
1057
                    h->ref_cache[list][cache_idx+8]= left_type[i] ? LIST_NOT_USED : PART_NOT_AVAILABLE;
1080
                    h->ref_cache[list][cache_idx+8]= (for_deblock||left_type[i]) ? LIST_NOT_USED : PART_NOT_AVAILABLE;
1058 1081
                }
1059 1082
            }
1060 1083

  

Also available in: Unified diff