Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bc655839
authored
Aug 16, 2019
by
andrewlewis
Committed by
Toni
Aug 23, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove superfluous logging
PiperOrigin-RevId: 263718527
parent
efb05494
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
extensions/vp9/src/main/jni/vpx_jni.cc
extensions/vp9/src/main/jni/vpx_jni.cc
View file @
bc655839
...
...
@@ -342,7 +342,7 @@ class JniBufferManager {
*
fb
=
out_buffer
->
vpx_fb
;
int
retVal
=
0
;
if
(
!
out_buffer
->
vpx_fb
.
data
||
all_buffer_count
>=
MAX_FRAMES
)
{
LOGE
(
"
ERROR:
JniBufferManager get_buffer OOM."
);
LOGE
(
"JniBufferManager get_buffer OOM."
);
retVal
=
-
1
;
}
else
{
memset
(
fb
->
data
,
0
,
fb
->
size
);
...
...
@@ -354,7 +354,7 @@ class JniBufferManager {
JniFrameBuffer
*
get_buffer
(
int
id
)
const
{
if
(
id
<
0
||
id
>=
all_buffer_count
)
{
LOGE
(
"
ERROR:
JniBufferManager get_buffer invalid id %d."
,
id
);
LOGE
(
"JniBufferManager get_buffer invalid id %d."
,
id
);
return
NULL
;
}
return
all_buffers
[
id
];
...
...
@@ -362,7 +362,7 @@ class JniBufferManager {
void
add_ref
(
int
id
)
{
if
(
id
<
0
||
id
>=
all_buffer_count
)
{
LOGE
(
"
ERROR:
JniBufferManager add_ref invalid id %d."
,
id
);
LOGE
(
"JniBufferManager add_ref invalid id %d."
,
id
);
return
;
}
pthread_mutex_lock
(
&
mutex
);
...
...
@@ -372,13 +372,13 @@ class JniBufferManager {
int
release
(
int
id
)
{
if
(
id
<
0
||
id
>=
all_buffer_count
)
{
LOGE
(
"
ERROR:
JniBufferManager release invalid id %d."
,
id
);
LOGE
(
"JniBufferManager release invalid id %d."
,
id
);
return
-
1
;
}
pthread_mutex_lock
(
&
mutex
);
JniFrameBuffer
*
buffer
=
all_buffers
[
id
];
if
(
!
buffer
->
ref_count
)
{
LOGE
(
"
ERROR:
JniBufferManager release, buffer already released."
);
LOGE
(
"JniBufferManager release, buffer already released."
);
pthread_mutex_unlock
(
&
mutex
);
return
-
1
;
}
...
...
@@ -444,7 +444,7 @@ DECODER_FUNC(jlong, vpxInit, jboolean disableLoopFilter,
vpx_codec_err_t
err
=
vpx_codec_dec_init
(
context
->
decoder
,
&
vpx_codec_vp9_dx_algo
,
&
cfg
,
0
);
if
(
err
)
{
LOGE
(
"
ERROR:
Failed to initialize libvpx decoder, error = %d."
,
err
);
LOGE
(
"Failed to initialize libvpx decoder, error = %d."
,
err
);
errorCode
=
err
;
return
0
;
}
...
...
@@ -452,20 +452,19 @@ DECODER_FUNC(jlong, vpxInit, jboolean disableLoopFilter,
err
=
vpx_codec_control
(
context
->
decoder
,
VP9D_SET_ROW_MT
,
enableRowMultiThreadMode
);
if
(
err
)
{
LOGE
(
"
ERROR:
Failed to enable row multi thread mode, error = %d."
,
err
);
LOGE
(
"Failed to enable row multi thread mode, error = %d."
,
err
);
}
#endif
if
(
disableLoopFilter
)
{
err
=
vpx_codec_control
(
context
->
decoder
,
VP9_SET_SKIP_LOOP_FILTER
,
true
);
if
(
err
)
{
LOGE
(
"
ERROR:
Failed to shut off libvpx loop filter, error = %d."
,
err
);
LOGE
(
"Failed to shut off libvpx loop filter, error = %d."
,
err
);
}
#ifdef VPX_CTRL_VP9_SET_LOOP_FILTER_OPT
}
else
{
err
=
vpx_codec_control
(
context
->
decoder
,
VP9D_SET_LOOP_FILTER_OPT
,
true
);
if
(
err
)
{
LOGE
(
"ERROR: Failed to enable loop filter optimization, error = %d."
,
err
);
LOGE
(
"Failed to enable loop filter optimization, error = %d."
,
err
);
}
#endif
}
...
...
@@ -473,8 +472,7 @@ DECODER_FUNC(jlong, vpxInit, jboolean disableLoopFilter,
context
->
decoder
,
vpx_get_frame_buffer
,
vpx_release_frame_buffer
,
context
->
buffer_manager
);
if
(
err
)
{
LOGE
(
"ERROR: Failed to set libvpx frame buffer functions, error = %d."
,
err
);
LOGE
(
"Failed to set libvpx frame buffer functions, error = %d."
,
err
);
}
// Populate JNI References.
...
...
@@ -500,7 +498,7 @@ DECODER_FUNC(jlong, vpxDecode, jlong jContext, jobject encoded, jint len) {
vpx_codec_decode
(
context
->
decoder
,
buffer
,
len
,
NULL
,
0
);
errorCode
=
0
;
if
(
status
!=
VPX_CODEC_OK
)
{
LOGE
(
"
ERROR:
vpx_codec_decode() failed, status= %d"
,
status
);
LOGE
(
"vpx_codec_decode() failed, status= %d"
,
status
);
errorCode
=
status
;
return
-
1
;
}
...
...
@@ -597,8 +595,8 @@ DECODER_FUNC(jint, vpxGetFrame, jlong jContext, jobject jOutputBuffer) {
}
else
if
(
outputMode
==
kOutputModeSurfaceYuv
)
{
if
(
img
->
fmt
&
VPX_IMG_FMT_HIGHBITDEPTH
)
{
LOGE
(
"
ERROR: High bit depth output format %d not supported in surface
"
"
YUV output
mode"
,
"
High bit depth output format %d not supported in surface YUV output
"
"mode"
,
img
->
fmt
);
return
-
1
;
}
...
...
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