int width, uint32_t *unused)
{
int i, j;
- for (i=0; i<width/8; i++) {
+ width = (width + 7) >> 3;
+ for (i = 0; i < width; i++) {
int d= ~src[i];
for(j=0; j<8; j++)
dst[8*i+j]= ((d>>(7-j))&1)*255;
int width, uint32_t *unused)
{
int i, j;
- for (i=0; i<width/8; i++) {
+ width = (width + 7) >> 3;
+ for (i = 0; i < width; i++) {
int d= src[i];
for(j=0; j<8; j++)
dst[8*i+j]= ((d>>(7-j))&1)*255;
int i;
unsigned acc = 0;
- for (i = 0; i < dstW - 1; i += 2) {
+ for (i = 0; i < dstW; i += 2) {
int j;
int Y1 = 1 << 18;
int Y2 = 1 << 18;
output_pixel(*dest++, acc);
}
}
+
+ if (i & 6) {
+ output_pixel(*dest, acc);
+ }
}
static av_always_inline void
int yalpha1 = 4095 - yalpha;
int i;
- for (i = 0; i < dstW - 7; i += 8) {
+ for (i = 0; i < dstW; i += 8) {
int Y, acc = 0;
Y = (buf0[i + 0] * yalpha1 + buf1[i + 0] * yalpha) >> 19;
const uint8_t * const d128 = dither_8x8_220[y & 7];
int i;
- for (i = 0; i < dstW - 7; i += 8) {
+ for (i = 0; i < dstW; i += 8) {
int acc = 0;
accumulate_bit(acc, (buf0[i + 0] >> 7) + d128[0]);