WIP : Crop#444
Open
Nancy-Chauhan wants to merge 5 commits intotimvideos:masterfrom
Open
Conversation
Addition in Test loading the gateware $make gateware-load $make firmware-load BIOS>serialboot $make firmware-connect
|
The crop commit message should start with a capital and contain more details about what you changed and why |
|
the getting-started commit shouldn't be a part of this PR - it is already in it's own (#443) |
paddatrapper
suggested changes
Jun 12, 2018
| wputs("change crop status (alias: 'cr')"); | ||
| wputs(" crop <on/off> - Turn on/off crop feature"); | ||
| } | ||
|
|
There was a problem hiding this comment.
Extra new line here needs to be removed
| crop_status(true); | ||
| wprintf("crop enable\n"); | ||
| } | ||
|
|
| wprintf("Heartbeat disabled\n"); | ||
| } | ||
|
|
||
|
|
|
|
||
| static void crop_disable(void) | ||
| { | ||
|
|
| static void crop_disable(void) | ||
| { | ||
|
|
||
| crop_status(false); |
| framebuffer[addr+i+(processor_h_active/2)*j] = YCBCR422_BLACK; | ||
| } | ||
| } | ||
| //right clipping |
| } | ||
| //right clipping | ||
| addr = 0 + (processor_h_active/2)*top + (processor_h_active/2) - right; | ||
| for (i=0; i<right; i++) |
| addr = 0 + (processor_h_active/2)*top + (processor_h_active/2) - right; | ||
| for (i=0; i<right; i++) | ||
| { | ||
| for (j=0; j<processor_v_active - bottom; j++) |
| //Bottom clipping | ||
|
|
||
| addr = 0 + (processor_h_active/2)*(processor_v_active-bottom);// + (processor_h_active/2) - right; | ||
| for (i=0; i<processor_h_active/2; i++){ |
There was a problem hiding this comment.
This loop and the loop starting at L#52 can be combined
| addr = 0 + (processor_h_active/2)*top + (processor_h_active/2) - right; | ||
| for (i=0; i<right; i++) | ||
| { | ||
| for (j=0; j<processor_v_active - bottom; j++) |
There was a problem hiding this comment.
Invert this loop and the loop at L#70. Then these loops can be combined
|
In general - try reduce the number of loops. That way the current O(n^2) performance can be improved, leading to less processor usage. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP :This is the initial step towards adding the support for crop feature to existing HDMI2USB-litex-firmware.
This allows the clipping of top,left,bottom,right of a frame but there is an issue of flickering