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
1eaa7b8c
Commit
1eaa7b8c
authored
Nov 19, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed deinterlacing for i422.
Initial report/patch by Marian Durkovic.
parent
769bef87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
53 deletions
+22
-53
modules/video_filter/deinterlace.c
modules/video_filter/deinterlace.c
+22
-53
No files found.
modules/video_filter/deinterlace.c
View file @
1eaa7b8c
...
...
@@ -308,13 +308,14 @@ static void SetFilterMethod( vout_thread_t *p_vout, char *psz_method )
}
else
{
const
bool
b_i422
=
p_vout
->
render
.
i_chroma
==
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'2'
);
if
(
strcmp
(
psz_method
,
"discard"
)
)
msg_Err
(
p_vout
,
"no valid deinterlace mode provided, "
"using
\"
discard
\"
"
);
p_vout
->
p_sys
->
i_mode
=
DEINTERLACE_DISCARD
;
p_vout
->
p_sys
->
b_double_rate
=
false
;
p_vout
->
p_sys
->
b_half_height
=
true
;
p_vout
->
p_sys
->
b_half_height
=
!
b_i422
;
}
msg_Dbg
(
p_vout
,
"using %s deinterlace method"
,
psz_method
);
...
...
@@ -384,22 +385,32 @@ static vout_thread_t *SpawnRealVout( vout_thread_t *p_vout )
msg_Dbg
(
p_vout
,
"spawning the real video output"
);
fmt
=
p_vout
->
fmt_out
;
if
(
p_vout
->
p_sys
->
b_half_height
)
{
fmt
.
i_height
/=
2
;
fmt
.
i_visible_height
/=
2
;
fmt
.
i_y_offset
/=
2
;
fmt
.
i_sar_den
*=
2
;
}
switch
(
p_vout
->
render
.
i_chroma
)
{
case
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'0'
):
case
VLC_FOURCC
(
'I'
,
'Y'
,
'U'
,
'V'
):
case
VLC_FOURCC
(
'Y'
,
'V'
,
'1'
,
'2'
):
if
(
p_vout
->
p_sys
->
b_half_height
)
{
fmt
.
i_height
/=
2
;
fmt
.
i_visible_height
/=
2
;
fmt
.
i_y_offset
/=
2
;
fmt
.
i_sar_den
*=
2
;
}
p_real_vout
=
vout_Create
(
p_vout
,
&
fmt
);
break
;
case
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'2'
):
fmt
.
i_chroma
=
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'0'
);
switch
(
p_vout
->
p_sys
->
i_mode
)
{
case
DEINTERLACE_MEAN
:
case
DEINTERLACE_LINEAR
:
case
DEINTERLACE_X
:
fmt
.
i_chroma
=
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'2'
);
break
;
default:
fmt
.
i_chroma
=
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'0'
);
break
;
}
p_real_vout
=
vout_Create
(
p_vout
,
&
fmt
);
break
;
...
...
@@ -1998,16 +2009,8 @@ static int SendEvents( vlc_object_t *p_this, char const *psz_var,
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
_p_vout
;
vlc_value_t
sentval
=
newval
;
if
(
!
strcmp
(
psz_var
,
"mouse-y"
)
)
{
switch
(
p_vout
->
p_sys
->
i_mode
)
{
case
DEINTERLACE_MEAN
:
case
DEINTERLACE_DISCARD
:
sentval
.
i_int
*=
2
;
break
;
}
}
if
(
!
strcmp
(
psz_var
,
"mouse-y"
)
&&
p_vout
->
p_sys
->
b_half_height
)
sentval
.
i_int
*=
2
;
var_Set
(
p_vout
,
psz_var
,
sentval
);
...
...
@@ -2023,52 +2026,18 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd,
{
VLC_UNUSED
(
psz_cmd
);
VLC_UNUSED
(
p_data
);
VLC_UNUSED
(
oldval
);
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
int
i_old_mode
=
p_vout
->
p_sys
->
i_mode
;
msg_Dbg
(
p_vout
,
"using %s deinterlace mode"
,
newval
.
psz_string
);
vlc_mutex_lock
(
&
p_vout
->
p_sys
->
filter_lock
);
const
bool
b_old_half_height
=
p_vout
->
p_sys
->
b_half_height
;
SetFilterMethod
(
p_vout
,
newval
.
psz_string
);
switch
(
p_vout
->
render
.
i_chroma
)
if
(
!
b_old_half_height
==
!
p_vout
->
p_sys
->
b_half_height
)
{
case
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'2'
):
vlc_mutex_unlock
(
&
p_vout
->
p_sys
->
filter_lock
);
return
VLC_SUCCESS
;
break
;
case
VLC_FOURCC
(
'I'
,
'4'
,
'2'
,
'0'
):
case
VLC_FOURCC
(
'I'
,
'Y'
,
'U'
,
'V'
):
case
VLC_FOURCC
(
'Y'
,
'V'
,
'1'
,
'2'
):
switch
(
p_vout
->
p_sys
->
i_mode
)
{
case
DEINTERLACE_MEAN
:
case
DEINTERLACE_DISCARD
:
if
(
(
i_old_mode
==
DEINTERLACE_MEAN
)
||
(
i_old_mode
==
DEINTERLACE_DISCARD
)
)
{
vlc_mutex_unlock
(
&
p_vout
->
p_sys
->
filter_lock
);
return
VLC_SUCCESS
;
}
break
;
case
DEINTERLACE_BOB
:
case
DEINTERLACE_BLEND
:
case
DEINTERLACE_LINEAR
:
if
(
(
i_old_mode
==
DEINTERLACE_BOB
)
||
(
i_old_mode
==
DEINTERLACE_BLEND
)
||
(
i_old_mode
==
DEINTERLACE_LINEAR
)
)
{
vlc_mutex_unlock
(
&
p_vout
->
p_sys
->
filter_lock
);
return
VLC_SUCCESS
;
}
break
;
}
break
;
default:
break
;
}
/* We need to kill the old vout */
...
...
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