Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
2085fb08
Commit
2085fb08
authored
Jun 04, 2008
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorize some code in the filters.
parent
b6dc08db
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
34 additions
and
178 deletions
+34
-178
modules/video_filter/adjust.c
modules/video_filter/adjust.c
+2
-20
modules/video_filter/colorthres.c
modules/video_filter/colorthres.c
+1
-10
modules/video_filter/croppadd.c
modules/video_filter/croppadd.c
+2
-9
modules/video_filter/erase.c
modules/video_filter/erase.c
+2
-10
modules/video_filter/extract.c
modules/video_filter/extract.c
+1
-10
modules/video_filter/filter_picture.h
modules/video_filter/filter_picture.h
+1
-1
modules/video_filter/gaussianblur.c
modules/video_filter/gaussianblur.c
+2
-10
modules/video_filter/gradient.c
modules/video_filter/gradient.c
+1
-10
modules/video_filter/grain.c
modules/video_filter/grain.c
+1
-10
modules/video_filter/invert.c
modules/video_filter/invert.c
+2
-10
modules/video_filter/motionblur.c
modules/video_filter/motionblur.c
+4
-15
modules/video_filter/noise.c
modules/video_filter/noise.c
+2
-10
modules/video_filter/psychedelic.c
modules/video_filter/psychedelic.c
+2
-10
modules/video_filter/ripple.c
modules/video_filter/ripple.c
+2
-10
modules/video_filter/rotate.c
modules/video_filter/rotate.c
+2
-2
modules/video_filter/seamcarving.c
modules/video_filter/seamcarving.c
+2
-10
modules/video_filter/sharpen.c
modules/video_filter/sharpen.c
+3
-11
modules/video_filter/wave.c
modules/video_filter/wave.c
+2
-10
No files found.
modules/video_filter/adjust.c
View file @
2085fb08
...
...
@@ -410,16 +410,7 @@ static picture_t *FilterPlanar( filter_t *p_filter, picture_t *p_pic )
#undef WRITE_UV
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
/*****************************************************************************
...
...
@@ -652,16 +643,7 @@ static picture_t *FilterPacked( filter_t *p_filter, picture_t *p_pic )
#undef WRITE_UV
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
static
int
AdjustCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_var
,
...
...
modules/video_filter/colorthres.c
View file @
2085fb08
...
...
@@ -228,14 +228,5 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
p_out_v
++
;
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
modules/video_filter/croppadd.c
View file @
2085fb08
...
...
@@ -32,6 +32,7 @@
#include <vlc_plugin.h>
#include <vlc_vout.h>
#include "vlc_filter.h"
#include "filter_picture.h"
/****************************************************************************
* Local prototypes
...
...
@@ -187,13 +188,5 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
(
i_outheight
-
i_ypadd
-
i_height
)
*
p_outplane
->
i_pitch
);
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
modules/video_filter/erase.c
View file @
2085fb08
...
...
@@ -36,6 +36,7 @@
#include "vlc_image.h"
#include "vlc_filter.h"
#include "filter_picture.h"
/*****************************************************************************
* Local prototypes
...
...
@@ -216,16 +217,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
/* Here */
FilterErase
(
p_filter
,
p_pic
,
p_outpic
);
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
/*****************************************************************************
...
...
modules/video_filter/extract.c
View file @
2085fb08
...
...
@@ -250,16 +250,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
return
NULL
;
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
static
inline
uint8_t
crop
(
int
a
)
...
...
modules/video_filter/filter_picture.h
View file @
2085fb08
...
...
@@ -86,7 +86,7 @@ static inline int GetPackedYuvOffsets( vlc_fourcc_t i_chroma,
/*****************************************************************************
*
*****************************************************************************/
static
inline
picture_t
*
Copy
Meta
AndRelease
(
picture_t
*
p_outpic
,
picture_t
*
p_inpic
)
static
inline
picture_t
*
Copy
Info
AndRelease
(
picture_t
*
p_outpic
,
picture_t
*
p_inpic
)
{
p_outpic
->
date
=
p_inpic
->
date
;
p_outpic
->
b_force
=
p_inpic
->
b_force
;
...
...
modules/video_filter/gaussianblur.c
View file @
2085fb08
...
...
@@ -34,6 +34,7 @@
#include <vlc_vout.h>
#include "vlc_filter.h"
#include "filter_picture.h"
#include <math.h>
/* exp(), sqrt() */
...
...
@@ -377,14 +378,5 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
}
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
modules/video_filter/gradient.c
View file @
2085fb08
...
...
@@ -263,16 +263,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
break
;
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
/*****************************************************************************
...
...
modules/video_filter/grain.c
View file @
2085fb08
...
...
@@ -203,14 +203,5 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
modules/video_filter/invert.c
View file @
2085fb08
...
...
@@ -34,6 +34,7 @@
#include <vlc_vout.h>
#include "vlc_filter.h"
#include "filter_picture.h"
/*****************************************************************************
* Local prototypes
...
...
@@ -181,14 +182,5 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
}
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
modules/video_filter/motionblur.c
View file @
2085fb08
...
...
@@ -35,6 +35,7 @@
#include <vlc_sout.h>
#include <vlc_vout.h>
#include <vlc_filter.h>
#include "filter_picture.h"
/*****************************************************************************
* Local protypes
...
...
@@ -129,17 +130,6 @@ static void Destroy( vlc_object_t *p_this )
free
(
p_filter
->
p_sys
);
}
#define RELEASE( pic ) \
if( pic ->pf_release ) \
pic ->pf_release( pic );
#define INITPIC( dst, src ) \
dst ->date = src ->date; \
dst ->b_force = src ->b_force; \
dst ->i_nb_fields = src ->i_nb_fields; \
dst ->b_progressive = src->b_progressive; \
dst ->b_top_field_first = src ->b_top_field_first;
/*****************************************************************************
* Filter
*****************************************************************************/
...
...
@@ -154,10 +144,10 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
if
(
!
p_outpic
)
{
msg_Warn
(
p_filter
,
"can't get output picture"
);
RELEASE
(
p_pic
);
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
NULL
;
}
INITPIC
(
p_outpic
,
p_pic
);
if
(
!
p_sys
->
pp_planes
)
{
...
...
@@ -178,8 +168,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
RenderBlur
(
p_sys
,
p_pic
,
p_outpic
);
Copy
(
p_filter
,
p_outpic
);
RELEASE
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
/*****************************************************************************
...
...
modules/video_filter/noise.c
View file @
2085fb08
...
...
@@ -34,6 +34,7 @@
#include <vlc_vout.h>
#include "vlc_filter.h"
#include "filter_picture.h"
/*****************************************************************************
* Local prototypes
...
...
@@ -171,14 +172,5 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
}
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
modules/video_filter/psychedelic.c
View file @
2085fb08
...
...
@@ -37,6 +37,7 @@
#include "vlc_filter.h"
#include "vlc_image.h"
#include "filter_picture.h"
/*****************************************************************************
* Local prototypes
...
...
@@ -252,14 +253,5 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
p_filter
->
p_sys
->
v
+=
1
;
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
modules/video_filter/ripple.c
View file @
2085fb08
...
...
@@ -36,6 +36,7 @@
#include <vlc_plugin.h>
#include <vlc_vout.h>
#include <vlc_filter.h>
#include "filter_picture.h"
/*****************************************************************************
* Local prototypes
...
...
@@ -203,14 +204,5 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
}
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
modules/video_filter/rotate.c
View file @
2085fb08
...
...
@@ -283,7 +283,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
}
}
return
Copy
Meta
AndRelease
(
p_outpic
,
p_pic
);
return
Copy
Info
AndRelease
(
p_outpic
,
p_pic
);
}
/*****************************************************************************
...
...
@@ -385,7 +385,7 @@ static picture_t *FilterPacked( filter_t *p_filter, picture_t *p_pic )
}
}
return
Copy
Meta
AndRelease
(
p_outpic
,
p_pic
);
return
Copy
Info
AndRelease
(
p_outpic
,
p_pic
);
}
/*****************************************************************************
...
...
modules/video_filter/seamcarving.c
View file @
2085fb08
...
...
@@ -36,6 +36,7 @@
#include <vlc_vout.h>
#include "vlc_filter.h"
#include "filter_picture.h"
#include <assert.h>
...
...
@@ -126,16 +127,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
FilterSeamCarving
(
p_filter
,
p_pic
,
p_outpic
);
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
static
inline
int
my_min3
(
int
a
,
int
b
,
int
c
);
...
...
modules/video_filter/sharpen.c
View file @
2085fb08
...
...
@@ -42,6 +42,7 @@
#include <vlc_vout.h>
#include "vlc_filter.h"
#include "filter_picture.h"
#define SIG_TEXT N_("Sharpen strength (0-2)")
#define SIG_LONGTEXT N_("Set the Sharpen strength, between 0 and 2. Defaults to 0.05.")
...
...
@@ -101,7 +102,7 @@ inline static int32_t clip( int32_t a )
static
void
init_precalc_table
(
filter_sys_t
*
p_filter
)
{
float
sigma
=
p_filter
->
f_sigma
;
for
(
int
i
=
0
;
i
<
512
;
++
i
)
{
p_filter
->
tab_precalc
[
i
]
=
(
i
-
256
)
*
sigma
;
...
...
@@ -237,16 +238,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
p_outpic
->
p
[
V_PLANE
].
i_lines
*
p_outpic
->
p
[
V_PLANE
].
i_pitch
);
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
static
int
SharpenCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_var
,
...
...
modules/video_filter/wave.c
View file @
2085fb08
...
...
@@ -37,6 +37,7 @@
#include <vlc_vout.h>
#include "vlc_filter.h"
#include "filter_picture.h"
/*****************************************************************************
* Local prototypes
...
...
@@ -193,14 +194,5 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
}
}
p_outpic
->
date
=
p_pic
->
date
;
p_outpic
->
b_force
=
p_pic
->
b_force
;
p_outpic
->
i_nb_fields
=
p_pic
->
i_nb_fields
;
p_outpic
->
b_progressive
=
p_pic
->
b_progressive
;
p_outpic
->
b_top_field_first
=
p_pic
->
b_top_field_first
;
if
(
p_pic
->
pf_release
)
p_pic
->
pf_release
(
p_pic
);
return
p_outpic
;
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
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