Exemplo n.º 1
0
static void vp8_block(void *_ctx,const unsigned char *_data,int _stride,
 int _bi,int _bj){
  intra_stats_ctx *ctx;
  int              mode;
  unsigned char    pred[B_SZ*B_SZ];
  ctx=(intra_stats_ctx *)_ctx;
  mode=vp8_select_mode(_data,_stride,NULL);
  memset(pred,0,B_SZ*B_SZ);
  vp8_intra_predict(pred,B_SZ,_data,_stride,mode);
#if MASK_BLOCKS
  if(!ctx->img.mask[ctx->img.nxblocks*_bj+_bi]){
    int j;
    int i;
    for(j=0;j<B_SZ;j++){
      for(i=0;i<B_SZ;i++){
        pred[j*B_SZ+i]=_data[_stride*j+i];
      }
    }
  }
#endif
#if WRITE_IMAGES
  vp8_files_block(ctx,_data,_stride,_bi,_bj,mode,pred);
#endif
  ctx->img.mode[ctx->img.nxblocks*_bj+_bi]=mode;
#if MASK_BLOCKS
  if(!ctx->img.mask[ctx->img.nxblocks*_bj+_bi]){
    return;
  }
#endif
  vp8_stats_block(ctx,_data,_stride,_bi,_bj,mode,pred);
}
Exemplo n.º 2
0
static void vp8_block(void *_ctx,const unsigned char *_data,int _stride,
 int _bi,int _bj){
  intra_stats_ctx *ctx;
  int              mode;
  unsigned char    pred[B_SZ*B_SZ];
  ctx=(intra_stats_ctx *)_ctx;
  mode=vp8_select_mode(_data,_stride,NULL);
  memset(pred,0,B_SZ*B_SZ);
  vp8_intra_predict(pred,B_SZ,_data,_stride,mode);
  vp8_stats_block(ctx,_data,_stride,_bi,_bj,mode,pred);
#if WRITE_IMAGES
  vp8_files_block(ctx,_data,_stride,_bi,_bj,mode,pred);
#endif
  ctx->img.mode[ctx->img.nxblocks*_bj+_bi]=mode;
}