diff options
Diffstat (limited to 'apps/recorder/resize.c')
-rw-r--r-- | apps/recorder/resize.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/recorder/resize.c b/apps/recorder/resize.c index a68a5f2e9f..dd1f3edf88 100644 --- a/apps/recorder/resize.c +++ b/apps/recorder/resize.c | |||
@@ -775,7 +775,7 @@ static void output_row_32_native(uint32_t row, void * row_in, | |||
775 | if (ctx->bm->alpha_offset > 0) | 775 | if (ctx->bm->alpha_offset > 0) |
776 | bm_alpha = ctx->bm->data + ctx->bm->alpha_offset; | 776 | bm_alpha = ctx->bm->data + ctx->bm->alpha_offset; |
777 | if (bm_alpha) | 777 | if (bm_alpha) |
778 | bm_alpha += ctx->bm->width*row/2; | 778 | bm_alpha += ALIGN_UP(ctx->bm->width, 2)*row/2; |
779 | 779 | ||
780 | for (col = 0; col < ctx->bm->width; col++) { | 780 | for (col = 0; col < ctx->bm->width; col++) { |
781 | if (ctx->dither) | 781 | if (ctx->dither) |
@@ -791,7 +791,7 @@ static void output_row_32_native(uint32_t row, void * row_in, | |||
791 | dest += STRIDE_MAIN(1, ctx->bm->height); | 791 | dest += STRIDE_MAIN(1, ctx->bm->height); |
792 | if (bm_alpha) { | 792 | if (bm_alpha) { |
793 | /* pack alpha channel for 2 pixels into 1 byte */ | 793 | /* pack alpha channel for 2 pixels into 1 byte */ |
794 | unsigned alpha = 255-SC_OUT(q0.a, ctx); | 794 | unsigned alpha = SC_OUT(q0.a, ctx); |
795 | if (col%2) | 795 | if (col%2) |
796 | *bm_alpha++ |= alpha&0xf0; | 796 | *bm_alpha++ |= alpha&0xf0; |
797 | else | 797 | else |