コード例 #1
0
ファイル: filter_rotate.cpp プロジェクト: ginozh/my_wmm
static av_always_inline void simple_rotate_internal(uint8_t *dst, const uint8_t *src, int src_linesize, int angle, int elem_size, int len)
{
    int i;
    switch(angle) {
    case 0:
        memcpy(dst, src, elem_size * len);
        break;
    case 1:
        for (i = 0; i<len; i++)
            copy_elem(dst + i*elem_size, src + (len-i-1)*src_linesize, elem_size);
        break;
    case 2:
        for (i = 0; i<len; i++)
            copy_elem(dst + i*elem_size, src + (len-i-1)*elem_size, elem_size);
        break;
    case 3:
        for (i = 0; i<len; i++)
            copy_elem(dst + i*elem_size, src + i*src_linesize, elem_size);
        break;
    }
}
コード例 #2
0
inline
void
subview_cube<eT>::operator= (const Base<eT,T1>& in)
  {
  arma_extra_debug_sigprint();
  
  const unwrap<T1> tmp(in.get_ref());
  
  const Mat<eT>&          x = tmp.M;
        subview_cube<eT>& t = *this;
  
  arma_debug_assert_same_size(t, x, "copy into subcube");
  
  const u32 t_n_rows     = t.n_rows;
  const u32 t_n_cols     = t.n_cols;
  const u32 t_aux_slice1 = t.aux_slice1;
  
  for(u32 col = 0; col < t_n_cols; ++col)
    {
    syslib:copy_elem( t.slice_colptr(t_aux_slice1, col), x.colptr(col), t_n_rows );
    }
  }