Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
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
Show 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 @@
...
@@ -25,6 +25,14 @@
typedef
int
ATMO_BOOL
;
typedef
int
ATMO_BOOL
;
# define ATMO_TRUE 1
# define ATMO_TRUE 1
# define ATMO_FALSE 0
# 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
#endif
...
@@ -56,10 +64,9 @@ typedef struct
...
@@ -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...
// maximal Anzahl Kanle...
#define ATMO_NUM_CHANNELS 5
#define ATMO_NUM_CHANNELS 5
...
...
modules/video_filter/atmo/AtmoExternalCaptureInput.cpp
View file @
bb05ac4f
...
@@ -219,7 +219,11 @@ void CAtmoExternalCaptureInput::CalcColors() {
...
@@ -219,7 +219,11 @@ void CAtmoExternalCaptureInput::CalcColors() {
// HSVI = HSV Image allready in right format just copy the easiest task
// HSVI = HSV Image allready in right format just copy the easiest task
// und weiterverarbeiten lassen
// 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
));
memcpy
(
&
HSV_Img
,
m_pCurrentFramePixels
,
CAP_WIDTH
*
CAP_HEIGHT
*
sizeof
(
tHSVColor
));
}
}
...
...
modules/video_filter/atmo/AtmoOutputFilter.cpp
View file @
bb05ac4f
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include "AtmoOutputFilter.h"
#include "AtmoOutputFilter.h"
CAtmoOutputFilter
::
CAtmoOutputFilter
(
CAtmoConfig
*
atmoConfig
)
CAtmoOutputFilter
::
CAtmoOutputFilter
(
CAtmoConfig
*
atmoConfig
)
{
{
this
->
m_pAtmoConfig
=
atmoConfig
;
this
->
m_pAtmoConfig
=
atmoConfig
;
...
@@ -93,6 +94,7 @@ void CAtmoOutputFilter::MeanFilter(ATMO_BOOL init)
...
@@ -93,6 +94,7 @@ void CAtmoOutputFilter::MeanFilter(ATMO_BOOL init)
static
tColorPacket
filter_output_old
;
static
tColorPacket
filter_output_old
;
static
int
filter_length_old
;
static
int
filter_length_old
;
char
reinitialize
=
0
;
char
reinitialize
=
0
;
long
int
tmp
;
if
(
init
)
// Initialization
if
(
init
)
// Initialization
{
{
...
@@ -120,15 +122,21 @@ void CAtmoOutputFilter::MeanFilter(ATMO_BOOL init)
...
@@ -120,15 +122,21 @@ void CAtmoOutputFilter::MeanFilter(ATMO_BOOL init)
// calculate the mean-value filters
// calculate the mean-value filters
mean_sums
.
channel
[
ch
].
r
+=
mean_sums
.
channel
[
ch
].
r
+=
(
long
int
)(
filter_input
.
channel
[
ch
].
r
-
mean_values
.
channel
[
ch
].
r
);
// red
(
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
+=
mean_sums
.
channel
[
ch
].
g
+=
(
long
int
)(
filter_input
.
channel
[
ch
].
g
-
mean_values
.
channel
[
ch
].
g
);
// green
(
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
+=
mean_sums
.
channel
[
ch
].
b
+=
(
long
int
)(
filter_input
.
channel
[
ch
].
b
-
mean_values
.
channel
[
ch
].
b
);
// blue
(
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
// 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) {
...
@@ -261,9 +261,14 @@ void CAtmoTools::SaveBitmap(HDC hdc,HBITMAP hBmp,char *fileName) {
bmpFileHeader
.
bfReserved1
=
0
;
bmpFileHeader
.
bfReserved1
=
0
;
bmpFileHeader
.
bfReserved2
=
0
;
bmpFileHeader
.
bfReserved2
=
0
;
bmpFileHeader
.
bfSize
=
sizeof
(
BITMAPFILEHEADER
)
+
sizeof
(
BITMAPINFOHEADER
)
+
bmpInfo
.
bmiHeader
.
biSizeImage
;
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
);
bmpFileHeader
.
bfOffBits
=
sizeof
(
BITMAPFILEHEADER
)
+
sizeof
(
BITMAPINFOHEADER
);
FILE
*
fp
=
NULL
;
FILE
*
fp
=
NULL
;
fp
=
fopen
(
fileName
,
"wb"
);
fp
=
fopen
(
fileName
,
"wb"
);
fwrite
(
&
bmpFileHeader
,
sizeof
(
BITMAPFILEHEADER
),
1
,
fp
);
fwrite
(
&
bmpFileHeader
,
sizeof
(
BITMAPFILEHEADER
),
1
,
fp
);
...
...
modules/video_filter/atmo/AtmoZoneDefinition.cpp
View file @
bb05ac4f
...
@@ -103,8 +103,11 @@ int CAtmoZoneDefinition::LoadGradientFromBitmap(char *pszBitmap)
...
@@ -103,8 +103,11 @@ int CAtmoZoneDefinition::LoadGradientFromBitmap(char *pszBitmap)
fclose
(
bmp
);
fclose
(
bmp
);
return
ATMO_LOAD_GRADIENT_FAILED_SIZE
;
return
ATMO_LOAD_GRADIENT_FAILED_SIZE
;
}
}
#ifdef _ATMO_VLC_PLUGIN_
if
(
bmpFileHeader
.
bfType
!=
'
MB
'
)
if
(
bmpFileHeader
.
bfType
!=
VLC_TWOCC
(
'M'
,
'B'
))
#else
if
(
bmpFileHeader
.
bfType
!=
MakeWord
(
'M'
,
'B'
))
#endif
{
{
fclose
(
bmp
);
fclose
(
bmp
);
return
ATMO_LOAD_GRADIENT_FAILED_HEADER
;
return
ATMO_LOAD_GRADIENT_FAILED_HEADER
;
...
...
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)
...
@@ -1612,7 +1612,7 @@ void SaveBitmap(filter_sys_t *p_sys, uint8_t *p_pixels, char *psz_filename)
bmp_fileheader
.
bfSize
=
sizeof
(
BITMAPFILEHEADER
)
+
bmp_fileheader
.
bfSize
=
sizeof
(
BITMAPFILEHEADER
)
+
sizeof
(
BITMAPINFOHEADER
)
+
sizeof
(
BITMAPINFOHEADER
)
+
bmp_info
.
bmiHeader
.
biSizeImage
;
bmp_info
.
bmiHeader
.
biSizeImage
;
bmp_fileheader
.
bfType
=
'
MB
'
;
bmp_fileheader
.
bfType
=
VLC_TWOCC
(
'M'
,
'B'
)
;
bmp_fileheader
.
bfOffBits
=
sizeof
(
BITMAPFILEHEADER
)
+
bmp_fileheader
.
bfOffBits
=
sizeof
(
BITMAPFILEHEADER
)
+
sizeof
(
BITMAPINFOHEADER
);
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