<commit_before>
"Camera pipeline."

import sys; sys.path += ['..', '.']
builtin_min = min
from halide import *

int_t = Int(32)
float_t = Float(32)

OUT_DIMS = (2560, 1920, 3)

def filter_func(result_type=UInt(8), schedule=0, use_uniforms=False):
    x, y, tx, ty, c = Var('x'), Var('y'), Var('tx'), Var('ty'), Var('c')
    counter_interleave_x = [0]
    counter_interleave_y = [0]
    
    def hot_pixel_suppression(input):
        a = max(max(input[x-2, y], input[x+2, y]),
                max(input[x, y-2], input[x, y+2]))
        b = min(min(input[x-2, y], input[x+2, y]),
                min(input[x, y-2], input[x, y+2]))
        
        denoised = Func('denoised')
        denoised[x, y] = clamp(input[x, y], b, a)

        return denoised

    def interleave_x(a, b):<commit_msg>Make camera_pipe run over cropped window of input<commit_after>
"Camera pipeline."

import sys; sys.path += ['..', '.']
builtin_min = min
from halide import *

int_t = Int(32)
float_t = Float(32)

OUT_DIMS = (1264, 1920, 3)

def filter_func(result_type=UInt(8), schedule=0, use_uniforms=False):
    x, y, tx, ty, c = Var('x'), Var('y'), Var('tx'), Var('ty'), Var('c')
    counter_interleave_x = [0]
    counter_interleave_y = [0]
    
    def hot_pixel_suppression(input):
        a = max(max(input[x-2, y], input[x+2, y]),
                max(input[x, y-2], input[x, y+2]))
        b = min(min(input[x-2, y], input[x+2, y]),
                min(input[x, y-2], input[x, y+2]))
        
        denoised = Func('denoised')
        denoised[x, y] = clamp(input[x, y], b, a)

        return denoised

    def interleave_x(a, b):
{'fraction_non_alphanumeric': 0.1895910780669145, 'fraction_numerical': 0.030978934324659233, 'mean_word_length': 2.8636363636363638, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5198475', 'n_tokens_mistral': 665, 'n_tokens_neox': 642, 'n_words': 146}