Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

WIP : Crop #444

wants to merge 5 commits into from

Conversation

Nancy-Chauhan
Copy link
Contributor

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

Addition in Test loading the gateware 
$make gateware-load
$make firmware-load
BIOS>serialboot
$make firmware-connect
@paddatrapper
Copy link

The crop commit message should start with a capital and contain more details about what you changed and why

@paddatrapper
Copy link

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");
}

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");
}

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");
}


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)
{

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);

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

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++)

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++)

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++){

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++)

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

@paddatrapper
Copy link

In general - try reduce the number of loops. That way the current O(n^2) performance can be improved, leading to less processor usage.

@Nancy-Chauhan Nancy-Chauhan changed the title WIP : crop WIP : Crop Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants