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
78047b27
Commit
78047b27
authored
Mar 22, 2013
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
omxil_vout: Simplify code with a local variable
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
d68625ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
modules/codec/omxil/vout.c
modules/codec/omxil/vout.c
+9
-7
No files found.
modules/codec/omxil/vout.c
View file @
78047b27
...
...
@@ -132,6 +132,7 @@ static int Open(vlc_object_t *p_this)
vout_display_t
*
p_dec
=
vd
;
char
ppsz_components
[
MAX_COMPONENTS_LIST_SIZE
][
OMX_MAX_STRINGNAME_SIZE
];
picture_t
**
pictures
=
NULL
;
OMX_PARAM_PORTDEFINITIONTYPE
*
def
;
static
OMX_CALLBACKTYPE
callbacks
=
{
OmxEventHandler
,
OmxEmptyBufferDone
,
OmxFillBufferDone
};
...
...
@@ -179,18 +180,19 @@ static int Open(vlc_object_t *p_this)
p_sys
->
port
.
b_valid
=
true
;
p_sys
->
port
.
omx_handle
=
p_sys
->
omx_handle
;
OMX_INIT_STRUCTURE
(
p_sys
->
port
.
definition
);
p_sys
->
port
.
definition
.
nPortIndex
=
p_sys
->
port
.
i_port_index
;
omx_error
=
OMX_GetParameter
(
p_sys
->
omx_handle
,
OMX_IndexParamPortDefinition
,
&
p_sys
->
port
.
definition
);
def
=
&
p_sys
->
port
.
definition
;
OMX_INIT_STRUCTURE
(
*
def
);
def
->
nPortIndex
=
p_sys
->
port
.
i_port_index
;
omx_error
=
OMX_GetParameter
(
p_sys
->
omx_handle
,
OMX_IndexParamPortDefinition
,
def
);
CHECK_ERROR
(
omx_error
,
"OMX_GetParameter(OMX_IndexParamPortDefinition) failed (%x: %s)"
,
omx_error
,
ErrorToString
(
omx_error
));
#define ALIGN_16_PIXELS(x) (((x) + 15) / 16 * 16)
p_sys
->
port
.
definition
.
format
.
video
.
nFrameWidth
=
ALIGN_16_PIXELS
(
vd
->
cfg
->
display
.
width
);
p_sys
->
port
.
definition
.
format
.
video
.
nFrameHeight
=
ALIGN_16_PIXELS
(
vd
->
cfg
->
display
.
height
);
p_sys
->
port
.
definition
.
format
.
video
.
nStride
=
p_sys
->
port
.
definition
.
format
.
video
.
nFrameWidth
;
p_sys
->
port
.
definition
.
format
.
video
.
nSliceHeight
=
p_sys
->
port
.
definition
.
format
.
video
.
nFrameHeight
;
def
->
format
.
video
.
nFrameWidth
=
ALIGN_16_PIXELS
(
vd
->
cfg
->
display
.
width
);
def
->
format
.
video
.
nFrameHeight
=
ALIGN_16_PIXELS
(
vd
->
cfg
->
display
.
height
);
def
->
format
.
video
.
nStride
=
def
->
format
.
video
.
nFrameWidth
;
def
->
format
.
video
.
nSliceHeight
=
def
->
format
.
video
.
nFrameHeight
;
p_sys
->
port
.
definition
.
format
.
video
.
eColorFormat
=
OMX_COLOR_FormatYUV420PackedPlanar
;
omx_error
=
OMX_SetParameter
(
p_sys
->
omx_handle
,
OMX_IndexParamPortDefinition
,
&
p_sys
->
port
.
definition
);
...
...
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