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
249fb100
Commit
249fb100
authored
Aug 20, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed video_format_FixRgb from blend.c
parent
1239429e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
104 deletions
+0
-104
modules/video_filter/blend.c
modules/video_filter/blend.c
+0
-104
No files found.
modules/video_filter/blend.c
View file @
249fb100
...
...
@@ -117,8 +117,6 @@ static void BlendRGBAR16( filter_t *, picture_t *, picture_t *, picture_t *,
static
void
BlendRGBAR24
(
filter_t
*
,
picture_t
*
,
picture_t
*
,
picture_t
*
,
int
,
int
,
int
,
int
,
int
);
static
void
video_format_FixRgb
(
video_format_t
*
p_fmt
);
/*****************************************************************************
* OpenFilter: probe the filter and return score
*****************************************************************************/
...
...
@@ -390,27 +388,6 @@ static void vlc_blend_rgb16( uint16_t *p_dst, const uint16_t *p_src,
(
vlc_blend
(
B
>>
p_fmt
->
i_rbshift
,
b
,
i_alpha
)
<<
p_fmt
->
i_lbshift
);
}
/*****************************************************************************
* BinaryLog: computes the base 2 log of a binary value
*****************************************************************************
* This functions is used by MaskToShift, to get a bit index from a binary
* value.
*****************************************************************************/
static
int
BinaryLog
(
uint32_t
i
)
{
int
i_log
=
0
;
if
(
i
==
0
)
return
-
31337
;
if
(
i
&
0xffff0000
)
i_log
+=
16
;
if
(
i
&
0xff00ff00
)
i_log
+=
8
;
if
(
i
&
0xf0f0f0f0
)
i_log
+=
4
;
if
(
i
&
0xcccccccc
)
i_log
+=
2
;
if
(
i
&
0xaaaaaaaa
)
i_log
+=
1
;
return
i_log
;
}
static
void
vlc_rgb_index
(
int
*
pi_rindex
,
int
*
pi_gindex
,
int
*
pi_bindex
,
const
video_format_t
*
p_fmt
)
{
...
...
@@ -430,87 +407,6 @@ static void vlc_rgb_index( int *pi_rindex, int *pi_gindex, int *pi_bindex,
#endif
}
/**
* It transforms a color mask into right and left shifts
* FIXME copied from video_output.c
*/
static
void
MaskToShift
(
int
*
pi_left
,
int
*
pi_right
,
uint32_t
i_mask
)
{
uint32_t
i_low
,
i_high
;
/* lower hand higher bits of the mask */
if
(
!
i_mask
)
{
*
pi_left
=
*
pi_right
=
0
;
return
;
}
/* Get bits */
i_low
=
i_high
=
i_mask
;
i_low
&=
-
(
int32_t
)
i_low
;
/* lower bit of the mask */
i_high
+=
i_low
;
/* higher bit of the mask */
/* Transform bits into an index. Also deal with i_high overflow, which
* is faster than changing the BinaryLog code to handle 64 bit integers. */
i_low
=
BinaryLog
(
i_low
);
i_high
=
i_high
?
BinaryLog
(
i_high
)
:
32
;
/* Update pointers and return */
*
pi_left
=
i_low
;
*
pi_right
=
(
8
-
i_high
+
i_low
);
}
/* FIXME should be moved to src/ */
static
void
video_format_FixRgb
(
video_format_t
*
p_fmt
)
{
if
(
p_fmt
->
i_chroma
!=
FCC_RV15
&&
p_fmt
->
i_chroma
!=
FCC_RV16
&&
p_fmt
->
i_chroma
!=
FCC_RV24
&&
p_fmt
->
i_chroma
!=
FCC_RV32
)
return
;
/* FIXME find right default mask */
if
(
!
p_fmt
->
i_rmask
||
!
p_fmt
->
i_gmask
||
!
p_fmt
->
i_bmask
)
{
switch
(
p_fmt
->
i_chroma
)
{
case
FCC_RV15
:
p_fmt
->
i_rmask
=
0x7c00
;
p_fmt
->
i_gmask
=
0x03e0
;
p_fmt
->
i_bmask
=
0x001f
;
break
;
case
FCC_RV16
:
p_fmt
->
i_rmask
=
0xf800
;
p_fmt
->
i_gmask
=
0x07e0
;
p_fmt
->
i_bmask
=
0x001f
;
break
;
case
FCC_RV24
:
p_fmt
->
i_rmask
=
0xff0000
;
p_fmt
->
i_gmask
=
0x00ff00
;
p_fmt
->
i_bmask
=
0x0000ff
;
break
;
case
FCC_RV32
:
p_fmt
->
i_rmask
=
0x00ff0000
;
p_fmt
->
i_gmask
=
0x0000ff00
;
p_fmt
->
i_bmask
=
0x000000ff
;
break
;
default:
assert
(
0
);
break
;
}
}
MaskToShift
(
&
p_fmt
->
i_lrshift
,
&
p_fmt
->
i_rrshift
,
p_fmt
->
i_rmask
);
MaskToShift
(
&
p_fmt
->
i_lgshift
,
&
p_fmt
->
i_rgshift
,
p_fmt
->
i_gmask
);
MaskToShift
(
&
p_fmt
->
i_lbshift
,
&
p_fmt
->
i_rbshift
,
p_fmt
->
i_bmask
);
}
/***********************************************************************
* YUVA
***********************************************************************/
...
...
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