Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
a961ab28
Commit
a961ab28
authored
Mar 18, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transform: remove old commented out code
parent
c4247c7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
326 deletions
+0
-326
modules/video_filter/transform.c
modules/video_filter/transform.c
+0
-326
No files found.
modules/video_filter/transform.c
View file @
a961ab28
...
...
@@ -390,329 +390,3 @@ static void Close(vlc_object_t *object)
free
(
sys
);
}
#if 0
static void FilterI422( vout_thread_t *p_vout,
const picture_t *p_pic, picture_t *p_outpic )
{
int i_index;
switch( p_vout->p_sys->i_mode )
{
case TRANSFORM_MODE_180:
case TRANSFORM_MODE_HFLIP:
case TRANSFORM_MODE_VFLIP:
/* Fall back on the default implementation */
FilterPlanar( p_vout, p_pic, p_outpic );
return;
case TRANSFORM_MODE_90:
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
int i_pitch = p_pic->p[i_index].i_pitch;
uint8_t *p_in = p_pic->p[i_index].p_pixels;
uint8_t *p_out = p_outpic->p[i_index].p_pixels;
uint8_t *p_out_end = p_out +
p_outpic->p[i_index].i_visible_lines *
p_outpic->p[i_index].i_pitch;
if( i_index == 0 )
{
for( ; p_out < p_out_end ; )
{
uint8_t *p_line_end;
p_out_end -= p_outpic->p[i_index].i_pitch
- p_outpic->p[i_index].i_visible_pitch;
p_line_end = p_in + p_pic->p[i_index].i_visible_lines *
i_pitch;
for( ; p_in < p_line_end ; )
{
p_line_end -= i_pitch;
*(--p_out_end) = *p_line_end;
}
p_in++;
}
}
else /* i_index == 1 or 2 */
{
for( ; p_out < p_out_end ; )
{
uint8_t *p_line_end, *p_out_end2;
p_out_end -= p_outpic->p[i_index].i_pitch
- p_outpic->p[i_index].i_visible_pitch;
p_out_end2 = p_out_end - p_outpic->p[i_index].i_pitch;
p_line_end = p_in + p_pic->p[i_index].i_visible_lines *
i_pitch;
for( ; p_in < p_line_end ; )
{
uint8_t p1, p2;
p_line_end -= i_pitch;
p1 = *p_line_end;
p_line_end -= i_pitch;
p2 = *p_line_end;
/* Trick for (x+y)/2 without overflow, based on
* x + y == (x ^ y) + 2 * (x & y) */
*(--p_out_end) = (p1 & p2) + ((p1 ^ p2) / 2);
*(--p_out_end2) = (p1 & p2) + ((p1 ^ p2) / 2);
}
p_out_end = p_out_end2;
p_in++;
}
}
}
break;
case TRANSFORM_MODE_270:
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
int i_pitch = p_pic->p[i_index].i_pitch;
uint8_t *p_in = p_pic->p[i_index].p_pixels;
uint8_t *p_out = p_outpic->p[i_index].p_pixels;
uint8_t *p_out_end = p_out +
p_outpic->p[i_index].i_visible_lines *
p_outpic->p[i_index].i_pitch;
if( i_index == 0 )
{
for( ; p_out < p_out_end ; )
{
uint8_t *p_in_end;
p_in_end = p_in + p_pic->p[i_index].i_visible_lines *
i_pitch;
for( ; p_in < p_in_end ; )
{
p_in_end -= i_pitch;
*p_out++ = *p_in_end;
}
p_out += p_outpic->p[i_index].i_pitch
- p_outpic->p[i_index].i_visible_pitch;
p_in++;
}
}
else /* i_index == 1 or 2 */
{
for( ; p_out < p_out_end ; )
{
uint8_t *p_in_end, *p_out2;
p_in_end = p_in + p_pic->p[i_index].i_visible_lines *
i_pitch;
p_out2 = p_out + p_outpic->p[i_index].i_pitch;
for( ; p_in < p_in_end ; )
{
uint8_t p1, p2;
p_in_end -= i_pitch;
p1 = *p_in_end;
p_in_end -= i_pitch;
p2 = *p_in_end;
/* Trick for (x+y)/2 without overflow, based on
* x + y == (x ^ y) + 2 * (x & y) */
*p_out++ = (p1 & p2) + ((p1 ^ p2) / 2);
*p_out2++ = (p1 & p2) + ((p1 ^ p2) / 2);
}
p_out2 += p_outpic->p[i_index].i_pitch
- p_outpic->p[i_index].i_visible_pitch;
p_out = p_out2;
p_in++;
}
}
}
break;
default:
break;
}
}
static void FilterYUYV( vout_thread_t *p_vout,
const picture_t *p_pic, picture_t *p_outpic )
{
int i_index;
int i_y_offset, i_u_offset, i_v_offset;
if( GetPackedYuvOffsets( p_pic->format.i_chroma, &i_y_offset,
&i_u_offset, &i_v_offset ) != VLC_SUCCESS )
return;
switch( p_vout->p_sys->i_mode )
{
case TRANSFORM_MODE_VFLIP:
/* Fall back on the default implementation */
FilterPlanar( p_vout, p_pic, p_outpic );
return;
case TRANSFORM_MODE_90:
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
int i_pitch = p_pic->p[i_index].i_pitch;
uint8_t *p_in = p_pic->p[i_index].p_pixels;
uint8_t *p_out = p_outpic->p[i_index].p_pixels;
uint8_t *p_out_end = p_out +
p_outpic->p[i_index].i_visible_lines *
p_outpic->p[i_index].i_pitch;
int i_offset = i_u_offset;
int i_offset2 = i_v_offset;
for( ; p_out < p_out_end ; )
{
uint8_t *p_line_end;
p_out_end -= p_outpic->p[i_index].i_pitch
- p_outpic->p[i_index].i_visible_pitch;
p_line_end = p_in + p_pic->p[i_index].i_visible_lines *
i_pitch;
for( ; p_in < p_line_end ; )
{
p_line_end -= i_pitch;
p_out_end -= 4;
p_out_end[i_y_offset+2] = p_line_end[i_y_offset];
p_out_end[i_u_offset] = p_line_end[i_offset];
p_line_end -= i_pitch;
p_out_end[i_y_offset] = p_line_end[i_y_offset];
p_out_end[i_v_offset] = p_line_end[i_offset2];
}
p_in += 2;
{
int a = i_offset;
i_offset = i_offset2;
i_offset2 = a;
}
}
}
break;
case TRANSFORM_MODE_180:
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
uint8_t *p_in = p_pic->p[i_index].p_pixels;
uint8_t *p_in_end = p_in + p_pic->p[i_index].i_visible_lines
* p_pic->p[i_index].i_pitch;
uint8_t *p_out = p_outpic->p[i_index].p_pixels;
for( ; p_in < p_in_end ; )
{
uint8_t *p_line_start = p_in_end
- p_pic->p[i_index].i_pitch;
p_in_end -= p_pic->p[i_index].i_pitch
- p_pic->p[i_index].i_visible_pitch;
for( ; p_line_start < p_in_end ; )
{
p_in_end -= 4;
p_out[i_y_offset] = p_in_end[i_y_offset+2];
p_out[i_u_offset] = p_in_end[i_u_offset];
p_out[i_y_offset+2] = p_in_end[i_y_offset];
p_out[i_v_offset] = p_in_end[i_v_offset];
p_out += 4;
}
p_out += p_outpic->p[i_index].i_pitch
- p_outpic->p[i_index].i_visible_pitch;
}
}
break;
case TRANSFORM_MODE_270:
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
int i_pitch = p_pic->p[i_index].i_pitch;
uint8_t *p_in = p_pic->p[i_index].p_pixels;
uint8_t *p_out = p_outpic->p[i_index].p_pixels;
uint8_t *p_out_end = p_out +
p_outpic->p[i_index].i_visible_lines *
p_outpic->p[i_index].i_pitch;
int i_offset = i_u_offset;
int i_offset2 = i_v_offset;
for( ; p_out < p_out_end ; )
{
uint8_t *p_in_end;
p_in_end = p_in
+ p_pic->p[i_index].i_visible_lines * i_pitch;
for( ; p_in < p_in_end ; )
{
p_in_end -= i_pitch;
p_out[i_y_offset] = p_in_end[i_y_offset];
p_out[i_u_offset] = p_in_end[i_offset];
p_in_end -= i_pitch;
p_out[i_y_offset+2] = p_in_end[i_y_offset];
p_out[i_v_offset] = p_in_end[i_offset2];
p_out += 4;
}
p_out += p_outpic->p[i_index].i_pitch
- p_outpic->p[i_index].i_visible_pitch;
p_in += 2;
{
int a = i_offset;
i_offset = i_offset2;
i_offset2 = a;
}
}
}
break;
case TRANSFORM_MODE_HFLIP:
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
uint8_t *p_in = p_pic->p[i_index].p_pixels;
uint8_t *p_in_end = p_in + p_pic->p[i_index].i_visible_lines
* p_pic->p[i_index].i_pitch;
uint8_t *p_out = p_outpic->p[i_index].p_pixels;
for( ; p_in < p_in_end ; )
{
uint8_t *p_line_end = p_in
+ p_pic->p[i_index].i_visible_pitch;
for( ; p_in < p_line_end ; )
{
p_line_end -= 4;
p_out[i_y_offset] = p_line_end[i_y_offset+2];
p_out[i_u_offset] = p_line_end[i_u_offset];
p_out[i_y_offset+2] = p_line_end[i_y_offset];
p_out[i_v_offset] = p_line_end[i_v_offset];
p_out += 4;
}
p_in += p_pic->p[i_index].i_pitch;
p_out += p_outpic->p[i_index].i_pitch
- p_outpic->p[i_index].i_visible_pitch;
}
}
break;
default:
break;
}
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment