// xf_resize.cpp
// 2020/02/20 by marsee
// xfopencv/HLS_Use_Model/Standalone_HLS_AXI_Example/xf_ip_accel_app.cpp のコードを引用している
// https://github.com/Xilinx/xfopencv/blob/master/HLS_Use_Model/Standalone_HLS_AXI_Example/xf_ip_accel_app.cpp
#include "xf_resize_config.h"
#include "common/xf_infra.h"
void resize_accel(xf::Mat<TYPE, HEIGHT, WIDTH, NPC1> &_src, xf::Mat<TYPE, NEWHEIGHT, NEWWIDTH, NPC1> &_dst);
void xf_resize(hls::stream< ap_axiu<8,1,1,1> >& _src,hls::stream< ap_axiu<8,1,1,1> >& _dst){
#pragma HLS INTERFACE axis register both port=_src
#pragma HLS INTERFACE axis register both port=_dst
xf::Mat<TYPE, HEIGHT, WIDTH, NPC1> img_in(HEIGHT,WIDTH);
xf::Mat<TYPE, NEWHEIGHT, NEWWIDTH, NPC1> img_out(NEWHEIGHT,NEWWIDTH);
#pragma HLS stream variable=img_in.data dim=1 depth=16
#pragma HLS stream variable=img_out.data dim=1 depth=16
#pragma HLS dataflow
xf::AXIvideo2xfMat(_src, img_in);
resize_accel(img_in, img_out);
xf::xfMat2AXIvideo(img_out, _dst);
}
日 | 月 | 火 | 水 | 木 | 金 | 土 |
---|---|---|---|---|---|---|
- | - | - | - | - | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | - | - | - | - | - | - |