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
8ffd7da8
authored
Mar 19, 2019
by
olly
Committed by
Oliver Woodman
Mar 20, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
[libvpx] Add flag to experiment with the impact of input/output buffers
PiperOrigin-RevId: 239122083
parent
c81c14ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/LibvpxVideoRenderer.java
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/LibvpxVideoRenderer.java
View file @
8ffd7da8
...
@@ -98,12 +98,12 @@ public class LibvpxVideoRenderer extends BaseRenderer {
...
@@ -98,12 +98,12 @@ public class LibvpxVideoRenderer extends BaseRenderer {
public
static
final
int
MSG_SET_OUTPUT_BUFFER_RENDERER
=
C
.
MSG_CUSTOM_BASE
;
public
static
final
int
MSG_SET_OUTPUT_BUFFER_RENDERER
=
C
.
MSG_CUSTOM_BASE
;
/** The number of input buffers. */
/** The number of input buffers. */
private
static
final
int
NUM_INPUT_BUFFERS
=
4
;
private
final
int
numInputBuffers
;
/**
/**
* The number of output buffers. The renderer may limit the minimum possible value due to
* The number of output buffers. The renderer may limit the minimum possible value due to
* requiring multiple output buffers to be dequeued at a time for it to make progress.
* requiring multiple output buffers to be dequeued at a time for it to make progress.
*/
*/
private
static
final
int
NUM_OUTPUT_BUFFERS
=
4
;
private
final
int
numOutputBuffers
;
/** The default input buffer size. */
/** The default input buffer size. */
private
static
final
int
DEFAULT_INPUT_BUFFER_SIZE
=
768
*
1024
;
// Value based on cs/SoftVpx.cpp.
private
static
final
int
DEFAULT_INPUT_BUFFER_SIZE
=
768
*
1024
;
// Value based on cs/SoftVpx.cpp.
...
@@ -220,7 +220,9 @@ public class LibvpxVideoRenderer extends BaseRenderer {
...
@@ -220,7 +220,9 @@ public class LibvpxVideoRenderer extends BaseRenderer {
playClearSamplesWithoutKeys
,
playClearSamplesWithoutKeys
,
disableLoopFilter
,
disableLoopFilter
,
/* enableRowMultiThreadMode= */
false
,
/* enableRowMultiThreadMode= */
false
,
getRuntime
().
availableProcessors
());
getRuntime
().
availableProcessors
(),
/* numInputBuffers= */
8
,
/* numOutputBuffers= */
8
);
}
}
/**
/**
...
@@ -241,6 +243,8 @@ public class LibvpxVideoRenderer extends BaseRenderer {
...
@@ -241,6 +243,8 @@ public class LibvpxVideoRenderer extends BaseRenderer {
* @param disableLoopFilter Disable the libvpx in-loop smoothing filter.
* @param disableLoopFilter Disable the libvpx in-loop smoothing filter.
* @param enableRowMultiThreadMode Whether row multi threading decoding is enabled.
* @param enableRowMultiThreadMode Whether row multi threading decoding is enabled.
* @param threads Number of threads libvpx will use to decode.
* @param threads Number of threads libvpx will use to decode.
* @param numInputBuffers Number of input buffers.
* @param numOutputBuffers Number of output buffers.
*/
*/
public
LibvpxVideoRenderer
(
public
LibvpxVideoRenderer
(
long
allowedJoiningTimeMs
,
long
allowedJoiningTimeMs
,
...
@@ -251,7 +255,9 @@ public class LibvpxVideoRenderer extends BaseRenderer {
...
@@ -251,7 +255,9 @@ public class LibvpxVideoRenderer extends BaseRenderer {
boolean
playClearSamplesWithoutKeys
,
boolean
playClearSamplesWithoutKeys
,
boolean
disableLoopFilter
,
boolean
disableLoopFilter
,
boolean
enableRowMultiThreadMode
,
boolean
enableRowMultiThreadMode
,
int
threads
)
{
int
threads
,
int
numInputBuffers
,
int
numOutputBuffers
)
{
super
(
C
.
TRACK_TYPE_VIDEO
);
super
(
C
.
TRACK_TYPE_VIDEO
);
this
.
disableLoopFilter
=
disableLoopFilter
;
this
.
disableLoopFilter
=
disableLoopFilter
;
this
.
allowedJoiningTimeMs
=
allowedJoiningTimeMs
;
this
.
allowedJoiningTimeMs
=
allowedJoiningTimeMs
;
...
@@ -260,6 +266,8 @@ public class LibvpxVideoRenderer extends BaseRenderer {
...
@@ -260,6 +266,8 @@ public class LibvpxVideoRenderer extends BaseRenderer {
this
.
playClearSamplesWithoutKeys
=
playClearSamplesWithoutKeys
;
this
.
playClearSamplesWithoutKeys
=
playClearSamplesWithoutKeys
;
this
.
enableRowMultiThreadMode
=
enableRowMultiThreadMode
;
this
.
enableRowMultiThreadMode
=
enableRowMultiThreadMode
;
this
.
threads
=
threads
;
this
.
threads
=
threads
;
this
.
numInputBuffers
=
numInputBuffers
;
this
.
numOutputBuffers
=
numOutputBuffers
;
joiningDeadlineMs
=
C
.
TIME_UNSET
;
joiningDeadlineMs
=
C
.
TIME_UNSET
;
clearReportedVideoSize
();
clearReportedVideoSize
();
formatHolder
=
new
FormatHolder
();
formatHolder
=
new
FormatHolder
();
...
@@ -762,8 +770,8 @@ public class LibvpxVideoRenderer extends BaseRenderer {
...
@@ -762,8 +770,8 @@ public class LibvpxVideoRenderer extends BaseRenderer {
format
.
maxInputSize
!=
Format
.
NO_VALUE
?
format
.
maxInputSize
:
DEFAULT_INPUT_BUFFER_SIZE
;
format
.
maxInputSize
!=
Format
.
NO_VALUE
?
format
.
maxInputSize
:
DEFAULT_INPUT_BUFFER_SIZE
;
decoder
=
decoder
=
new
VpxDecoder
(
new
VpxDecoder
(
NUM_INPUT_BUFFERS
,
numInputBuffers
,
NUM_OUTPUT_BUFFERS
,
numOutputBuffers
,
initialInputBufferSize
,
initialInputBufferSize
,
mediaCrypto
,
mediaCrypto
,
disableLoopFilter
,
disableLoopFilter
,
...
...
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