Home | History | Annotate | Download | only in enc

Lines Matching defs:SIZE

26 #define SIZE 8
27 #define SIZE2 (SIZE / 2)
28 static int is_transparent_area(const uint8_t* ptr, int stride, int size) {
30 for (y = 0; y < size; ++y) {
31 for (x = 0; x < size; ++x) {
41 static int is_transparent_argb_area(const uint32_t* ptr, int stride, int size) {
43 for (y = 0; y < size; ++y) {
44 for (x = 0; x < size; ++x) {
54 static void flatten(uint8_t* ptr, int v, int stride, int size) {
56 for (y = 0; y < size; ++y) {
57 memset(ptr, v, size);
62 static void flatten_argb(uint32_t* ptr, uint32_t v, int stride, int size) {
64 for (y = 0; y < size; ++y) {
65 for (x = 0; x < size; ++x) ptr[x] = v;
73 w = pic->width / SIZE;
74 h = pic->height / SIZE;
82 const int off = (y * pic->argb_stride + x) * SIZE;
83 if (is_transparent_argb_area(pic->argb + off, pic->argb_stride, SIZE)) {
88 flatten_argb(pic->argb + off, argb_value, pic->argb_stride, SIZE);
101 const int off_a = (y * pic->a_stride + x) * SIZE;
102 const int off_y = (y * pic->y_stride + x) * SIZE;
104 if (is_transparent_area(a_ptr + off_a, pic->a_stride, SIZE)) {
111 flatten(pic->y + off_y, values[0], pic->y_stride, SIZE);
122 #undef SIZE