sys - video_freak

Video Freak is used to crop and scale the image.

Video Freak will take in the original VGA_DE_IN and output a new VGA_DE and VIDEO_ARX/VIDEO_ARY using the cropping parameters.

module video_freak
(
    input             CLK_VIDEO,
    input             CE_PIXEL,
    input             VGA_VS,
    input      [11:0] HDMI_WIDTH,
    input      [11:0] HDMI_HEIGHT,
    output            VGA_DE,
    output reg [12:0] VIDEO_ARX,
    output reg [12:0] VIDEO_ARY,

    input             VGA_DE_IN,
    input      [11:0] ARX,
    input      [11:0] ARY,
    input      [11:0] CROP_SIZE,
    input       [4:0] CROP_OFF, // -16...+15
    input       [2:0] SCALE     //0 - normal, 1 - V-integer, 2 - HV-Integer-, 3 - HV-Integer+, 4 - HV-Integer
);