Closed Nancy-Chauhan closed 5 years ago
Thanks Nancy for the pull-request.
I see what you want to do. Have you been able to test on the hardware? The first change i would recommand, is to make your cropping configurable. You are using static cropping bounds and should create CSR registers for that to make it dynamically configurable.
For Scaling, i would recommand in a first time only supporting cropping with h/v resolution that are h/v full resolution divided an integer. For example, hres_crop = hres/N, vres_crop = vres/M.
This way you'll just have to copy your pixel N times (for h) and for v you'll need to have a line buffer that you'll reuse M times.
You could later add something more complex if this first version already works.
Then, you'll need to optimize DRAM reads. Since here we are reading all datas from DRAM and just using the one useful for cropping. That would better to only read what is needed.
Hoping that gives you some directions.
Closing since no update.
There are two aspects of the problem: