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
2d26ce0b
Commit
2d26ce0b
authored
Nov 14, 2014
by
Thomas Guillem
Committed by
Jean-Baptiste Kempf
Nov 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mediacodec: remove unused code/variables
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
706e6bd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
19 deletions
+8
-19
modules/codec/omxil/android_mediacodec.c
modules/codec/omxil/android_mediacodec.c
+8
-19
No files found.
modules/codec/omxil/android_mediacodec.c
View file @
2d26ce0b
...
@@ -157,7 +157,6 @@ struct decoder_sys_t
...
@@ -157,7 +157,6 @@ struct decoder_sys_t
jobject
input_buffers
,
output_buffers
;
jobject
input_buffers
,
output_buffers
;
int
pixel_format
;
int
pixel_format
;
int
stride
,
slice_height
;
int
stride
,
slice_height
;
int
crop_top
,
crop_left
;
char
*
name
;
char
*
name
;
bool
allocated
;
bool
allocated
;
...
@@ -716,10 +715,6 @@ static void GetOutput(decoder_t *p_dec, JNIEnv *env, picture_t **pp_pic, jlong t
...
@@ -716,10 +715,6 @@ static void GetOutput(decoder_t *p_dec, JNIEnv *env, picture_t **pp_pic, jlong t
if
(
*
pp_pic
)
{
if
(
*
pp_pic
)
{
picture_t
*
p_pic
=
*
pp_pic
;
picture_t
*
p_pic
=
*
pp_pic
;
// TODO: Use crop_top/crop_left as well? Or is that already taken into account?
// On OMX_TI_COLOR_FormatYUV420PackedSemiPlanar the offset already incldues
// the cropping, so the top/left cropping params should just be ignored.
/* If the oldest input block had no PTS, the timestamp
/* If the oldest input block had no PTS, the timestamp
* of the frame returned by MediaCodec might be wrong
* of the frame returned by MediaCodec might be wrong
* so we overwrite it with the corresponding dts. */
* so we overwrite it with the corresponding dts. */
...
@@ -822,8 +817,8 @@ static void GetOutput(decoder_t *p_dec, JNIEnv *env, picture_t **pp_pic, jlong t
...
@@ -822,8 +817,8 @@ static void GetOutput(decoder_t *p_dec, JNIEnv *env, picture_t **pp_pic, jlong t
p_sys
->
stride
=
GET_INTEGER
(
format
,
"stride"
);
p_sys
->
stride
=
GET_INTEGER
(
format
,
"stride"
);
p_sys
->
slice_height
=
GET_INTEGER
(
format
,
"slice-height"
);
p_sys
->
slice_height
=
GET_INTEGER
(
format
,
"slice-height"
);
p_sys
->
pixel_format
=
GET_INTEGER
(
format
,
"color-format"
);
p_sys
->
pixel_format
=
GET_INTEGER
(
format
,
"color-format"
);
p_sys
->
crop_left
=
GET_INTEGER
(
format
,
"crop-left"
);
int
crop_left
=
GET_INTEGER
(
format
,
"crop-left"
);
p_sys
->
crop_top
=
GET_INTEGER
(
format
,
"crop-top"
);
int
crop_top
=
GET_INTEGER
(
format
,
"crop-top"
);
int
crop_right
=
GET_INTEGER
(
format
,
"crop-right"
);
int
crop_right
=
GET_INTEGER
(
format
,
"crop-right"
);
int
crop_bottom
=
GET_INTEGER
(
format
,
"crop-bottom"
);
int
crop_bottom
=
GET_INTEGER
(
format
,
"crop-bottom"
);
...
@@ -844,12 +839,12 @@ static void GetOutput(decoder_t *p_dec, JNIEnv *env, picture_t **pp_pic, jlong t
...
@@ -844,12 +839,12 @@ static void GetOutput(decoder_t *p_dec, JNIEnv *env, picture_t **pp_pic, jlong t
}
}
}
}
msg_
Dbg
(
p_dec
,
"output: %d %s, %dx%d stride %d %d, crop %d %d %d %d"
,
msg_
Err
(
p_dec
,
"output: %d %s, %dx%d stride %d %d, crop %d %d %d %d"
,
p_sys
->
pixel_format
,
name
,
width
,
height
,
p_sys
->
stride
,
p_sys
->
slice_height
,
p_sys
->
pixel_format
,
name
,
width
,
height
,
p_sys
->
stride
,
p_sys
->
slice_height
,
p_sys
->
crop_left
,
p_sys
->
crop_top
,
crop_right
,
crop_bottom
);
crop_left
,
crop_top
,
crop_right
,
crop_bottom
);
p_dec
->
fmt_out
.
video
.
i_width
=
crop_right
+
1
-
p_sys
->
crop_left
;
p_dec
->
fmt_out
.
video
.
i_width
=
crop_right
+
1
-
crop_left
;
p_dec
->
fmt_out
.
video
.
i_height
=
crop_bottom
+
1
-
p_sys
->
crop_top
;
p_dec
->
fmt_out
.
video
.
i_height
=
crop_bottom
+
1
-
crop_top
;
if
(
p_sys
->
stride
<=
0
)
if
(
p_sys
->
stride
<=
0
)
p_sys
->
stride
=
width
;
p_sys
->
stride
=
width
;
if
(
p_sys
->
slice_height
<=
0
)
if
(
p_sys
->
slice_height
<=
0
)
...
@@ -859,14 +854,8 @@ static void GetOutput(decoder_t *p_dec, JNIEnv *env, picture_t **pp_pic, jlong t
...
@@ -859,14 +854,8 @@ static void GetOutput(decoder_t *p_dec, JNIEnv *env, picture_t **pp_pic, jlong t
ArchitectureSpecificCopyHooks
(
p_dec
,
p_sys
->
pixel_format
,
p_sys
->
slice_height
,
ArchitectureSpecificCopyHooks
(
p_dec
,
p_sys
->
pixel_format
,
p_sys
->
slice_height
,
p_sys
->
stride
,
&
p_sys
->
architecture_specific_data
);
p_sys
->
stride
,
&
p_sys
->
architecture_specific_data
);
if
(
p_sys
->
pixel_format
==
OMX_TI_COLOR_FormatYUV420PackedSemiPlanar
)
{
if
(
p_sys
->
pixel_format
==
OMX_TI_COLOR_FormatYUV420PackedSemiPlanar
)
p_sys
->
slice_height
-=
p_sys
->
crop_top
/
2
;
p_sys
->
slice_height
-=
crop_top
/
2
;
/* Reset crop top/left here, since the offset parameter already includes this.
* If we'd ignore the offset parameter in the BufferInfo, we could just keep
* the original slice height and apply the top/left cropping instead. */
p_sys
->
crop_top
=
0
;
p_sys
->
crop_left
=
0
;
}
if
(
IgnoreOmxDecoderPadding
(
p_sys
->
name
))
{
if
(
IgnoreOmxDecoderPadding
(
p_sys
->
name
))
{
p_sys
->
slice_height
=
0
;
p_sys
->
slice_height
=
0
;
p_sys
->
stride
=
p_dec
->
fmt_out
.
video
.
i_width
;
p_sys
->
stride
=
p_dec
->
fmt_out
.
video
.
i_width
;
...
...
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