-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP : Crop #444
base: master
Are you sure you want to change the base?
WIP : Crop #444
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) |
wputs("change crop status (alias: 'cr')"); | ||
wputs(" crop <on/off> - Turn on/off crop feature"); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra new line here needs to be removed
crop_status(true); | ||
wprintf("crop enable\n"); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra new line
firmware/ci.c
Outdated
static void heartbeat_disable(void) | ||
{ | ||
hb_status(false); | ||
wprintf("Heartbeat disabled\n"); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra new line
firmware/ci.c
Outdated
|
||
static void crop_disable(void) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra new line
firmware/ci.c
Outdated
static void crop_disable(void) | ||
{ | ||
|
||
crop_status(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tab-alignment weird
firmware/crop.c
Outdated
framebuffer[addr+i+(processor_h_active/2)*j] = YCBCR422_BLACK; | ||
} | ||
} | ||
//right clipping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment alignment
firmware/crop.c
Outdated
} | ||
//right clipping | ||
addr = 0 + (processor_h_active/2)*top + (processor_h_active/2) - right; | ||
for (i=0; i<right; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tab alignment is weird
firmware/crop.c
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tab alignment is weird
firmware/crop.c
Outdated
//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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This loop and the loop starting at L#52 can be combined
firmware/crop.c
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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