|
Support external buffer import in VDA interface and add a V4L2SVDA impl.
Currently, the VDA interface requires implementations to allocate
backing memory for output PictureBuffers. This change introduces a second
mode of operation, the IMPORT mode, which allows the VDA::Client to provide
already allocated buffers for the VDA to import and use.
In order to use it, the Client has to Initialize() the VDA for IMPORT
OutputMode, go through the standard ProvidePictureBuffers(),
AssignPictureBuffers() sequence, but is required to call
ImportBufferForPicture() once for each buffer before it may be used.
VDAs not supporting IMPORT mode will return false from VDA::Initialize().
Also, add support for IMPORT mode to V4L2SVDA and vdaunittest.
This also relands previously reverted crrev.com/1643123003.
The reverted CL was affected by a corner case, which occurred if all of the
following were true: the input stream contained two SPSes in a row, each
causing a resolution change, with no actual frames to decode in between
them, and we happened to hit the second one between calling
ProvidePictureBuffers and before AssignPictureBuffers had a chance to
arrive. This CL fixes that issue by making sure we use the correct
(latest) set of buffers.
Original message:
V4L2SVDA: Move allocation from GPU Child thread to decoder thread.
Allocation may take time, and we don't need to be on the GPU Child
thread to do it. This also removes the explicit synchronization between
the decoder and GPU Child threads during picture set change.
BUG=b/27779397,574241
TEST=vdatest,crosvideo.appspot,seektests
Committed: https://crrev.com/4b267e8cc10a4d98d0295847ecc9e2aa3732d6c5
Cr-Commit-Position: refs/heads/master@{#388168}
Total comments: 39
Total comments: 2
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+782 lines, -265 lines) |
Patch |
 |
M |
content/common/gpu/media/android_video_decode_accelerator.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/dxva_video_decode_accelerator_win.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/generic_v4l2_device.h
|
View
|
1
2
3
4
|
1 chunk |
+9 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/generic_v4l2_device.cc
|
View
|
1
2
3
4
|
3 chunks |
+17 lines, -31 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc
|
View
|
1
2
3
4
|
3 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/tegra_v4l2_device.h
|
View
|
1
2
3
4
|
1 chunk |
+8 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/tegra_v4l2_device.cc
|
View
|
1
2
3
4
|
1 chunk |
+8 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/v4l2_device.h
|
View
|
1
2
3
4
|
1 chunk |
+15 lines, -12 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/v4l2_slice_video_decode_accelerator.h
|
View
|
1
2
3
4
|
9 chunks |
+93 lines, -26 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc
|
View
|
1
2
3
4
5
|
30 chunks |
+357 lines, -133 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/v4l2_video_decode_accelerator.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/v4l2_video_decode_accelerator.cc
|
View
|
1
2
3
4
|
4 chunks |
+30 lines, -9 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/vaapi_video_decode_accelerator.cc
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/video_decode_accelerator_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
6 chunks |
+130 lines, -11 lines |
0 comments
|
Download
|
 |
M |
content/common/gpu/media/vt_video_decode_accelerator_mac.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/gpu/gpu_video_decode_accelerator_factory.h
|
View
|
1
2
3
4
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/gpu/gpu_video_decode_accelerator_factory.cc
|
View
|
1
2
3
4
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/renderer/media/rtc_video_decoder.h
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/media/rtc_video_decoder.cc
|
View
|
1
2
3
4
|
2 chunks |
+14 lines, -8 lines |
0 comments
|
Download
|
 |
M |
media/filters/gpu_video_decoder.cc
|
View
|
1
2
3
4
|
1 chunk |
+7 lines, -4 lines |
0 comments
|
Download
|
 |
M |
media/video/video_decode_accelerator.h
|
View
|
1
2
3
4
|
5 chunks |
+31 lines, -0 lines |
0 comments
|
Download
|
 |
M |
media/video/video_decode_accelerator.cc
|
View
|
1
2
3
4
|
1 chunk |
+11 lines, -1 line |
0 comments
|
Download
|
Total messages: 61 (24 generated)
|