<commit_before>#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "alpha.h"
#include "blur.h"

void blur(unsigned char *img, int width, int height, int distX, int distY, int quality)
{
	for (int i = 0; i < quality; ++i) {
		blurX(img, width, height, distX);
		blurY(img, width, height, distY);
	}

	preMultiplyAlphaUndo(img, width, height);
}

void blurX(unsigned char *img, int width, int height, int distance)
{
	if (distance < 1) {
		return;
	}

	unsigned char *src = img;

	int dist2 = distance << 1;
	int dist4 = dist2 << 1;<commit_msg>call premultiplyAlpha before blur<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "alpha.h"
#include "blur.h"

void blur(unsigned char *img, int width, int height, int distX, int distY, int quality)
{
	preMultiplyAlpha(img, width, height);
	for (int i = 0; i < quality; ++i) {
		blurX(img, width, height, distX);
		blurY(img, width, height, distY);
	}

	preMultiplyAlphaUndo(img, width, height);
}

void blurX(unsigned char *img, int width, int height, int distance)
{
	if (distance < 1) {
		return;
	}

	unsigned char *src = img;

	int dist2 = distance << 1;
	int dist4 = dist2 << 1;
{'fraction_non_alphanumeric': 0.1472340425531915, 'fraction_numerical': 0.011914893617021277, 'mean_word_length': 4.345454545454546, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3847212', 'n_tokens_mistral': 472, 'n_tokens_neox': 433, 'n_words': 141}