Lines Matching refs:bitmap
35 uint8_t bitmap[XFACE_PIXELS]; ///< image used internally for decoding member
40 static int all_same(char *bitmap, int w, int h) in all_same() argument
45 val = *bitmap; in all_same()
47 row = bitmap; in all_same()
52 bitmap += XFACE_WIDTH; in all_same()
57 static int all_black(char *bitmap, int w, int h) in all_black() argument
62 return (all_black(bitmap, w, h) && all_black(bitmap + w, w, h) && in all_black()
63 all_black(bitmap + XFACE_WIDTH * h, w, h) && in all_black()
64 all_black(bitmap + XFACE_WIDTH * h + w, w, h)); in all_black()
67 return *bitmap || *(bitmap + 1) || in all_black()
68 *(bitmap + XFACE_WIDTH) || *(bitmap + XFACE_WIDTH + 1); in all_black()
72 static int all_white(char *bitmap, int w, int h) in all_white() argument
74 return *bitmap == 0 && all_same(bitmap, w, h); in all_white()
90 static void push_greys(ProbRangesQueue *pq, char *bitmap, int w, int h) in push_greys() argument
95 push_greys(pq, bitmap, w, h); in push_greys()
96 push_greys(pq, bitmap + w, w, h); in push_greys()
97 push_greys(pq, bitmap + XFACE_WIDTH * h, w, h); in push_greys()
98 push_greys(pq, bitmap + XFACE_WIDTH * h + w, w, h); in push_greys()
101 *bitmap + in push_greys()
102 2 * *(bitmap + 1) + in push_greys()
103 4 * *(bitmap + XFACE_WIDTH) + in push_greys()
104 8 * *(bitmap + XFACE_WIDTH + 1); in push_greys()
109 static void encode_block(char *bitmap, int w, int h, int level, ProbRangesQueue *pq) in encode_block() argument
111 if (all_white(bitmap, w, h)) { in encode_block()
113 } else if (all_black(bitmap, w, h)) { in encode_block()
115 push_greys(pq, bitmap, w, h); in encode_block()
121 encode_block(bitmap, w, h, level, pq); in encode_block()
122 encode_block(bitmap + w, w, h, level, pq); in encode_block()
123 encode_block(bitmap + h * XFACE_WIDTH, w, h, level, pq); in encode_block()
124 encode_block(bitmap + w + h * XFACE_WIDTH, w, h, level, pq); in encode_block()
165 xface->bitmap[i++] = (buf[j]>>(7-k))&1; in xface_encode_frame()
173 memcpy(bitmap_copy, xface->bitmap, XFACE_PIXELS); in xface_encode_frame()
174 ff_xface_generate_face(xface->bitmap, bitmap_copy); in xface_encode_frame()
176 encode_block(xface->bitmap, 16, 16, 0, &pq); in xface_encode_frame()
177 encode_block(xface->bitmap + 16, 16, 16, 0, &pq); in xface_encode_frame()
178 encode_block(xface->bitmap + 32, 16, 16, 0, &pq); in xface_encode_frame()
179 encode_block(xface->bitmap + XFACE_WIDTH * 16, 16, 16, 0, &pq); in xface_encode_frame()
180 encode_block(xface->bitmap + XFACE_WIDTH * 16 + 16, 16, 16, 0, &pq); in xface_encode_frame()
181 encode_block(xface->bitmap + XFACE_WIDTH * 16 + 32, 16, 16, 0, &pq); in xface_encode_frame()
182 encode_block(xface->bitmap + XFACE_WIDTH * 32, 16, 16, 0, &pq); in xface_encode_frame()
183 encode_block(xface->bitmap + XFACE_WIDTH * 32 + 16, 16, 16, 0, &pq); in xface_encode_frame()
184 encode_block(xface->bitmap + XFACE_WIDTH * 32 + 32, 16, 16, 0, &pq); in xface_encode_frame()