Research Article

ViPar: High-Level Design Space Exploration for Parallel Video Processing Architectures

Algorithm 2

Specification file for video downscaler (4:1) for input VGA image.
(1)## Header ##
(2)#include “ap_int.h”
(3)#define IMG_WIDTH 640
(4)#define IMG_HEIGHT 480
(5)#define IMG_SIZE 307200
(6)#define IMG_WIDTH_2 320
(7)#define IMG_HEIGHT_2 240
(8)#define IMG_SIZE_4 76800
(9)#define WIN_HEIGHT 2
(10)#define STRIP_SIZE_PARA32_8 5120
(11)#define IMG_WIDTH_2_PARA32_8 1280
(12)## ENDOF_Header ##
(13)
(14)## System_Properties ##
(15)input_image.width = 640
(16)input_image.height = 480
(17)output_image.width = 320
(18)output_image.height = 240
(19)Parallelism_Level = 32
(20)## ENDOF_System_Properties ##
(21)
(22)## Top_Level_Function ##
(23)Name = VideoDownScaler_parallel32
(24)Num_of_inputs = 1
(25)Input_0.name = data_img[STRIP_SIZE_PARA32_8]
(26)Input_0.type = unsigned long long int
(27)Input_0.num_of_scanlines = 64
(28)Input_0.num_of_merging_elements = 8
(29)Num_of_outputs = 1
(30)Output_0.name = img_result[IMG_WIDTH_2_PARA32_8]
(31)Output_0.type = unsigned long long int
(32)Output_0.num_of_scanlines = 32
(33)Output_0.num_of_merging_elements = 8
(34)Interface = AXI‒Stream
(35)## ENDOF_Top_Level_Function ##
(36)
(37)## Processing_Element ##
(38)Name = VideoDownScaler
(39)Num_of_inputs = 1
(40)Input_0.name = image[IMG_WIDTH][WIN_HEIGHT]
(41)Input_0.type = unsigned char
(42)Input_0.src = data_img[STRIP_SIZE_PARA32_8]
(43)Input_0.store_scanlines_from = 0
(44)Input_0.store_scanlines_to = 1
(45)Input_0.shift_step = 2
(46)Num_of_outputs = 1
(47)Output_0.name = image_result[IMG_WIDTH_2]
(48)Output_0.type = unsigned char
(49)Output_0.sink = img_result[IMG_WIDTH_2_PARA32_8]
(50)Output_0.store_scanlines_from = 0
(51)Output_0.store_scanlines_to = 0
(52)Output_0.shift_step = 1
(53)## ENDOF_Processing_Element ##