Skip to content

WIP : Crop#444

Open
Nancy-Chauhan wants to merge 5 commits intotimvideos:masterfrom
Nancy-Chauhan:crop
Open

WIP : Crop#444
Nancy-Chauhan wants to merge 5 commits intotimvideos:masterfrom
Nancy-Chauhan:crop

Conversation

@Nancy-Chauhan
Copy link
Copy Markdown
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
Copy Markdown

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

@paddatrapper
Copy link
Copy Markdown

the getting-started commit shouldn't be a part of this PR - it is already in it's own (#443)

Comment thread firmware/ci.c
wputs("change crop status (alias: 'cr')");
wputs(" crop <on/off> - Turn on/off crop feature");
}

Copy link
Copy Markdown

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

Comment thread firmware/ci.c
crop_status(true);
wprintf("crop enable\n");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra new line

Comment thread firmware/ci.c Outdated
wprintf("Heartbeat disabled\n");
}


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra new line

Comment thread firmware/ci.c

static void crop_disable(void)
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra new line

Comment thread firmware/ci.c
static void crop_disable(void)
{

crop_status(false);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tab-alignment weird

Comment thread firmware/crop.c Outdated
framebuffer[addr+i+(processor_h_active/2)*j] = YCBCR422_BLACK;
}
}
//right clipping
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment alignment

Comment thread firmware/crop.c Outdated
}
//right clipping
addr = 0 + (processor_h_active/2)*top + (processor_h_active/2) - right;
for (i=0; i<right; i++)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tab alignment is weird

Comment thread 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++)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tab alignment is weird

Comment thread 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++){
Copy link
Copy Markdown

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

Comment thread 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++)
Copy link
Copy Markdown

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
Copy Markdown

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.

2 participants