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
68ead3cb
Commit
68ead3cb
authored
Dec 16, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
es_format: avoid copy in video_format_IsSimilar() if possible
parent
ab500430
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
src/misc/es_format.c
src/misc/es_format.c
+16
-15
No files found.
src/misc/es_format.c
View file @
68ead3cb
...
@@ -373,30 +373,31 @@ void video_format_ApplyRotation( video_format_t *restrict out,
...
@@ -373,30 +373,31 @@ void video_format_ApplyRotation( video_format_t *restrict out,
video_format_TransformTo
(
out
,
ORIENT_NORMAL
);
video_format_TransformTo
(
out
,
ORIENT_NORMAL
);
}
}
bool
video_format_IsSimilar
(
const
video_format_t
*
p_fmt1
,
const
video_format_t
*
p_fmt2
)
bool
video_format_IsSimilar
(
const
video_format_t
*
f1
,
const
video_format_t
*
f2
)
{
{
video_format_t
v1
=
*
p_fmt1
;
if
(
f1
->
i_chroma
!=
f2
->
i_chroma
)
video_format_t
v2
=
*
p_fmt2
;
if
(
v1
.
i_chroma
!=
v2
.
i_chroma
)
return
false
;
return
false
;
if
(
v1
.
i_width
!=
v2
.
i_width
||
v1
.
i_height
!=
v2
.
i_height
||
if
(
f1
->
i_width
!=
f2
->
i_width
||
f1
->
i_height
!=
f2
->
i_height
||
v1
.
i_visible_width
!=
v2
.
i_visible_width
||
f1
->
i_visible_width
!=
f2
->
i_visible_width
||
v1
.
i_visible_height
!=
v2
.
i_visible_height
||
f1
->
i_visible_height
!=
f2
->
i_visible_height
||
v1
.
i_x_offset
!=
v2
.
i_x_offset
||
v1
.
i_y_offset
!=
v2
.
i_y_offset
)
f1
->
i_x_offset
!=
f2
->
i_x_offset
||
f1
->
i_y_offset
!=
f2
->
i_y_offset
)
return
false
;
return
false
;
if
(
v1
.
i_sar_num
*
v2
.
i_sar_den
!=
v2
.
i_sar_num
*
v1
.
i_sar_den
)
if
(
f1
->
i_sar_num
*
f2
->
i_sar_den
!=
f2
->
i_sar_num
*
f1
->
i_sar_den
)
return
false
;
return
false
;
if
(
v1
.
orientation
!=
v2
.
orientation
)
if
(
f1
->
orientation
!=
f2
->
orientation
)
return
false
;
return
false
;
if
(
v1
.
i_chroma
==
VLC_CODEC_RGB15
||
if
(
f1
->
i_chroma
==
VLC_CODEC_RGB15
||
v1
.
i_chroma
==
VLC_CODEC_RGB16
||
f1
->
i_chroma
==
VLC_CODEC_RGB16
||
v1
.
i_chroma
==
VLC_CODEC_RGB24
||
f1
->
i_chroma
==
VLC_CODEC_RGB24
||
v1
.
i_chroma
==
VLC_CODEC_RGB32
)
f1
->
i_chroma
==
VLC_CODEC_RGB32
)
{
{
video_format_t
v1
=
*
f1
;
video_format_t
v2
=
*
f2
;
video_format_FixRgb
(
&
v1
);
video_format_FixRgb
(
&
v1
);
video_format_FixRgb
(
&
v2
);
video_format_FixRgb
(
&
v2
);
...
...
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