CPC G06T 3/4023 (2013.01) [G06T 5/50 (2013.01)] | 10 Claims |
1. A method for computing, comprising:
determining a first pixel block in a cache, wherein the first pixel block is composed of a 2m row×2n column pixel matrix and comprises original pixel data and pixel data related to the original pixel data, where m and n are positive integers, at least part of the pixel data related to the original pixel data is used for padding related to the original pixel data, and the original pixel data comprises pixel data from an (n+1)th column to a 2nth column in an (m+1)th row to a 2mth row in the 2m row×2n column pixel matrix; and
reading the first pixel block, having a padding configuration related to the original pixel data, from the cache, comprising:
determining p rows from 2m rows of the 2m row×2n column pixel matrix based on a coordinate in a vertical direction indicated by the padding configuration to obtain a p row ×2n column pixel matrix;
determining q columns from 2n columns of the determined p row×2n column pixel matrix based on a coordinate in a horizontal direction indicated by the padding configuration to obtain a p row×q column pixel matrix, where p and q are positive integers;
performing an insert-zero operation on the p row×q column pixel matrix to expand the p row×q column pixel matrix to a 2p row×2q column pixel matrix.
|