Example #1
0
static void MC_put_o_8_c (uint8_t *dest, const uint8_t *ref, const int stride, int height)
{ 
    uint32_t  ref_aln, ref_rs;
    ref_aln = (uint32_t)(ref-stride) & 0xfffffffc;
    ref_rs  = 4 - ((uint32_t)(ref-stride) & 3);
    dest -= stride;
    do {
        S32LDIV(xr1,ref_aln,stride,0x0);
	S32LDD(xr2,ref_aln,0x4);
	S32LDD(xr4,ref_aln,0x8);
	S32ALN(xr3,xr2,xr1,ref_rs);
	S32ALN(xr5,xr4,xr2,ref_rs);
	
	S32SDIV(xr3,dest,stride,0x0);
	S32STD(xr5,dest,0x4);
    } while (--height);
}  
Example #2
0
void ff_init_cabac_states_mxu(CABACContext *c){
    uint32_t i = 0;
    uint8_t *p_lps_range = lps_range[0]-4;
    uint8_t *p_mps_state = mps_state-4;
    uint8_t *p_lps_state = lps_state-4;
    uint8_t *p_ff_h264_mlps_state1 = &ff_h264_mlps_state[0]+124;
    uint8_t *p_ff_h264_mlps_state2 = &ff_h264_mlps_state[0]+128;//
    uint8_t *p_ff_h264_lps_range = ff_h264_lps_range-128;
    S32I2M(xr15,0x1010101);

    for(i=0; i<16; i++){
      
      /* load 32 */
      S32LDI(xr1,p_lps_range,4);
      S32LDI(xr2,p_lps_range,4);
      S32LDI(xr3,p_lps_range,4);
      S32LDI(xr4,p_lps_range,4);

      S32SFL(xr7,xr2,xr1,xr8,0);
      S32SFL(xr9,xr4,xr3,xr10,0);

      S32SFL(xr11,xr7,xr7,xr12,0);
      S32SFL(xr13,xr8,xr8,xr14,0);
      S32SFL(xr1,xr9,xr9,xr2,0);
      S32SFL(xr3,xr10,xr10,xr4,0);

      S32SDI(xr14,p_ff_h264_lps_range,128); 
      S32SDI(xr4,p_ff_h264_lps_range,4); 
      S32SDI(xr13,p_ff_h264_lps_range,124);
      S32SDI(xr3,p_ff_h264_lps_range,4); 
      S32SDI(xr12,p_ff_h264_lps_range,124);
      S32SDI(xr2,p_ff_h264_lps_range,4); 
      S32SDI(xr11,p_ff_h264_lps_range,124);
      S32SDI(xr1,p_ff_h264_lps_range,4);
      p_ff_h264_lps_range-=128*4-4;

     
      /* part2 */
      S32LDI(xr1,p_mps_state,4); 
     
      Q8ADD_AA(xr3,xr1,xr1);// 2*mps_state[i]+0
      Q8ADD_AA(xr4,xr3,xr15);//2*mps_state[i]+1  
      S32SFL(xr11,xr4,xr3,xr12,0);     
      
      S32SDI(xr12,p_ff_h264_mlps_state1,4);//  ff_h264_mlps_state[128+2*i+1]= 2*mps_state[i]+0;
      S32SDI(xr11,p_ff_h264_mlps_state1,4);
         
      /*part3 */ 
      S32LDI(xr1,p_lps_state,4);   

      Q8ADD_AA(xr3,xr1,xr1);// 2*mps_state[i]+0
      Q8ADD_AA(xr4,xr3,xr15);//2*mps_state[i]+1
    
      S32SFL(xr11,xr3,xr4,xr12,0);
         
      S32ALN(xr11,xr11,xr11,2);
      S32ALN(xr12,xr12,xr12,2);
    
      S32SDI(xr12,p_ff_h264_mlps_state2,-4);
      S32SDI(xr11,p_ff_h264_mlps_state2,-4);
     
   }
    
   ff_h264_mlps_state[127]= 1;
   ff_h264_mlps_state[126]= 0;    

}