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
bb05ac4f
Commit
bb05ac4f
authored
Feb 16, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch by Andre Weber: fix several warnings in atmo video_filter.
parent
f8743ad0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
13 deletions
+40
-13
modules/video_filter/atmo/AtmoDefs.h
modules/video_filter/atmo/AtmoDefs.h
+11
-4
modules/video_filter/atmo/AtmoExternalCaptureInput.cpp
modules/video_filter/atmo/AtmoExternalCaptureInput.cpp
+5
-1
modules/video_filter/atmo/AtmoOutputFilter.cpp
modules/video_filter/atmo/AtmoOutputFilter.cpp
+11
-3
modules/video_filter/atmo/AtmoTools.cpp
modules/video_filter/atmo/AtmoTools.cpp
+6
-1
modules/video_filter/atmo/AtmoZoneDefinition.cpp
modules/video_filter/atmo/AtmoZoneDefinition.cpp
+6
-3
modules/video_filter/atmo/atmo.cpp
modules/video_filter/atmo/atmo.cpp
+1
-1
No files found.
modules/video_filter/atmo/AtmoDefs.h
View file @
bb05ac4f
...
...
@@ -25,6 +25,14 @@
typedef
int
ATMO_BOOL
;
# define ATMO_TRUE 1
# define ATMO_FALSE 0
# define MakeWord(ch1,ch2) ((((int)(ch1)&255)<<8) | \
((int)(ch2)&255))
# define MakeDword(ch1,ch2,ch3,ch4) ((((DWORD)(ch1)&255) << 24) | \
(((DWORD)(ch2)&255) << 16) | \
(((DWORD)(ch3)&255) << 8) | \
(((DWORD)(ch4)&255)))
#endif
...
...
@@ -56,10 +64,9 @@ typedef struct
#define FCC(ch4) ((((DWORD)(ch4) & 0xFF) << 24) | \
(((DWORD)(ch4) & 0xFF00) << 8) | \
(((DWORD)(ch4) & 0xFF0000) >> 8) | \
(((DWORD)(ch4) & 0xFF000000) >> 24))
// maximal Anzahl Kanle...
#define ATMO_NUM_CHANNELS 5
...
...
modules/video_filter/atmo/AtmoExternalCaptureInput.cpp
View file @
bb05ac4f
...
...
@@ -219,7 +219,11 @@ void CAtmoExternalCaptureInput::CalcColors() {
// HSVI = HSV Image allready in right format just copy the easiest task
// und weiterverarbeiten lassen
if
(
m_CurrentFrameHeader
.
biCompression
==
FCC
(
'
HSVI
'
))
#ifdef _ATMO_VLC_PLUGIN_
if
(
m_CurrentFrameHeader
.
biCompression
==
VLC_FOURCC
(
'H'
,
'S'
,
'V'
,
'I'
))
#else
if
(
m_CurrentFrameHeader
.
biCompression
==
MakeDword
(
'H'
,
'S'
,
'V'
,
'I'
))
#endif
{
memcpy
(
&
HSV_Img
,
m_pCurrentFramePixels
,
CAP_WIDTH
*
CAP_HEIGHT
*
sizeof
(
tHSVColor
));
}
...
...
modules/video_filter/atmo/AtmoOutputFilter.cpp
View file @
bb05ac4f
...
...
@@ -13,6 +13,7 @@
#include "AtmoOutputFilter.h"
CAtmoOutputFilter
::
CAtmoOutputFilter
(
CAtmoConfig
*
atmoConfig
)
{
this
->
m_pAtmoConfig
=
atmoConfig
;
...
...
@@ -93,6 +94,7 @@ void CAtmoOutputFilter::MeanFilter(ATMO_BOOL init)
static
tColorPacket
filter_output_old
;
static
int
filter_length_old
;
char
reinitialize
=
0
;
long
int
tmp
;
if
(
init
)
// Initialization
{
...
...
@@ -120,15 +122,21 @@ void CAtmoOutputFilter::MeanFilter(ATMO_BOOL init)
// calculate the mean-value filters
mean_sums
.
channel
[
ch
].
r
+=
(
long
int
)(
filter_input
.
channel
[
ch
].
r
-
mean_values
.
channel
[
ch
].
r
);
// red
mean_values
.
channel
[
ch
].
r
=
mean_sums
.
channel
[
ch
].
r
/
((
long
int
)
filter_length_old
/
20
);
tmp
=
mean_sums
.
channel
[
ch
].
r
/
((
long
int
)
filter_length_old
/
20
);
if
(
tmp
<
0
)
tmp
=
0
;
else
{
if
(
tmp
>
255
)
tmp
=
255
;
}
mean_values
.
channel
[
ch
].
r
=
(
unsigned
char
)
tmp
;
mean_sums
.
channel
[
ch
].
g
+=
(
long
int
)(
filter_input
.
channel
[
ch
].
g
-
mean_values
.
channel
[
ch
].
g
);
// green
mean_values
.
channel
[
ch
].
g
=
mean_sums
.
channel
[
ch
].
g
/
((
long
int
)
filter_length_old
/
20
);
tmp
=
mean_sums
.
channel
[
ch
].
g
/
((
long
int
)
filter_length_old
/
20
);
if
(
tmp
<
0
)
tmp
=
0
;
else
{
if
(
tmp
>
255
)
tmp
=
255
;
}
mean_values
.
channel
[
ch
].
g
=
(
unsigned
char
)
tmp
;
mean_sums
.
channel
[
ch
].
b
+=
(
long
int
)(
filter_input
.
channel
[
ch
].
b
-
mean_values
.
channel
[
ch
].
b
);
// blue
mean_values
.
channel
[
ch
].
b
=
mean_sums
.
channel
[
ch
].
b
/
((
long
int
)
filter_length_old
/
20
);
tmp
=
mean_sums
.
channel
[
ch
].
b
/
((
long
int
)
filter_length_old
/
20
);
if
(
tmp
<
0
)
tmp
=
0
;
else
{
if
(
tmp
>
255
)
tmp
=
255
;
}
mean_values
.
channel
[
ch
].
b
=
(
unsigned
char
)
tmp
;
// check, if there is a jump -> check if differences between actual values and filter values are too big
...
...
modules/video_filter/atmo/AtmoTools.cpp
View file @
bb05ac4f
...
...
@@ -261,9 +261,14 @@ void CAtmoTools::SaveBitmap(HDC hdc,HBITMAP hBmp,char *fileName) {
bmpFileHeader
.
bfReserved1
=
0
;
bmpFileHeader
.
bfReserved2
=
0
;
bmpFileHeader
.
bfSize
=
sizeof
(
BITMAPFILEHEADER
)
+
sizeof
(
BITMAPINFOHEADER
)
+
bmpInfo
.
bmiHeader
.
biSizeImage
;
bmpFileHeader
.
bfType
=
'
MB
'
;
#ifdef _ATMO_VLC_PLUGIN_
bmpFileHeader
.
bfType
=
VLC_TWOCC
(
'M'
,
'B'
);
#else
bmpFileHeader
.
bfType
=
MakeWord
(
'M'
,
'B'
);
#endif
bmpFileHeader
.
bfOffBits
=
sizeof
(
BITMAPFILEHEADER
)
+
sizeof
(
BITMAPINFOHEADER
);
FILE
*
fp
=
NULL
;
fp
=
fopen
(
fileName
,
"wb"
);
fwrite
(
&
bmpFileHeader
,
sizeof
(
BITMAPFILEHEADER
),
1
,
fp
);
...
...
modules/video_filter/atmo/AtmoZoneDefinition.cpp
View file @
bb05ac4f
...
...
@@ -103,8 +103,11 @@ int CAtmoZoneDefinition::LoadGradientFromBitmap(char *pszBitmap)
fclose
(
bmp
);
return
ATMO_LOAD_GRADIENT_FAILED_SIZE
;
}
if
(
bmpFileHeader
.
bfType
!=
'
MB
'
)
#ifdef _ATMO_VLC_PLUGIN_
if
(
bmpFileHeader
.
bfType
!=
VLC_TWOCC
(
'M'
,
'B'
))
#else
if
(
bmpFileHeader
.
bfType
!=
MakeWord
(
'M'
,
'B'
))
#endif
{
fclose
(
bmp
);
return
ATMO_LOAD_GRADIENT_FAILED_HEADER
;
...
...
@@ -206,7 +209,7 @@ void CAtmoZoneDefinition::UpdateWeighting(int *destWeight,
{
destWeight
[
index
]
=
0
;
}
else
{
destWeight
[
index
]
=
(
int
)(
255.0
*
(
float
)
pow
(
((
float
)
m_BasicWeight
[
index
])
/
255.0
,
newEdgeWeightning
));
destWeight
[
index
]
=
(
int
)(
255.0
*
(
float
)
pow
(
((
float
)
m_BasicWeight
[
index
])
/
255.0
,
newEdgeWeightning
));
}
index
++
;
}
...
...
modules/video_filter/atmo/atmo.cpp
View file @
bb05ac4f
...
...
@@ -1612,7 +1612,7 @@ void SaveBitmap(filter_sys_t *p_sys, uint8_t *p_pixels, char *psz_filename)
bmp_fileheader
.
bfSize
=
sizeof
(
BITMAPFILEHEADER
)
+
sizeof
(
BITMAPINFOHEADER
)
+
bmp_info
.
bmiHeader
.
biSizeImage
;
bmp_fileheader
.
bfType
=
'
MB
'
;
bmp_fileheader
.
bfType
=
VLC_TWOCC
(
'M'
,
'B'
)
;
bmp_fileheader
.
bfOffBits
=
sizeof
(
BITMAPFILEHEADER
)
+
sizeof
(
BITMAPINFOHEADER
);
...
...
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