OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // This file contains an implementation of VideoDecoderAccelerator | 5 // This file contains an implementation of VideoDecoderAccelerator |
6 // that utilizes the hardware video decoder present on the Exynos SoC. | 6 // that utilizes the hardware video decoder present on the Exynos SoC. |
7 | 7 |
8 #ifndef CONTENT_COMMON_GPU_MEDIA_EXYNOS_VIDEO_DECODE_ACCELERATOR_H_ | 8 #ifndef CONTENT_COMMON_GPU_MEDIA_EXYNOS_VIDEO_DECODE_ACCELERATOR_H_ |
9 #define CONTENT_COMMON_GPU_MEDIA_EXYNOS_VIDEO_DECODE_ACCELERATOR_H_ | 9 #define CONTENT_COMMON_GPU_MEDIA_EXYNOS_VIDEO_DECODE_ACCELERATOR_H_ |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 // Do any necessary initialization before the sandbox is enabled. | 78 // Do any necessary initialization before the sandbox is enabled. |
79 static void PreSandboxInitialization(); | 79 static void PreSandboxInitialization(); |
80 | 80 |
81 // Lazily initialize static data after sandbox is enabled. Return false on | 81 // Lazily initialize static data after sandbox is enabled. Return false on |
82 // init failure. | 82 // init failure. |
83 static bool PostSandboxInitialization(); | 83 static bool PostSandboxInitialization(); |
84 | 84 |
85 private: | 85 private: |
86 // These are rather subjectively tuned. | 86 // These are rather subjectively tuned. |
87 enum { | 87 enum { |
88 kMfcInputBufferCount = 8, | 88 kMfcInputBufferCount = 12, |
wuchengli
2013/06/10 12:33:43
Increasing the buffer counts has much better decod
Ami GONE FROM CHROMIUM
2013/06/11 23:48:05
These numbers are arbitrary (as l.86 says) so no n
| |
89 kMfcInputBufferMaxSize = 512 * 1024, | 89 kMfcInputBufferMaxSize = 512 * 1024, |
90 kGscInputBufferCount = 4, | 90 kGscInputBufferCount = 8, |
91 // Number of output buffers to use for each VDA stage above what's required | 91 // Number of output buffers to use for each VDA stage above what's required |
92 // by the decoder (e.g. DPB size, in H264). | 92 // by the decoder (e.g. DPB size, in H264). |
93 kDpbOutputBufferExtraCount = 3, | 93 kDpbOutputBufferExtraCount = 8, |
Pawel Osciak
2013/06/12 23:38:22
This adds almost 42MB to our memory footprint for
sheu
2013/06/13 01:24:26
I can give you two buffers for free by removing kG
wuchengli
2013/06/13 10:28:07
That's great. Will you do it? Or should I remove i
| |
94 // We're continuing to have issues with synchronization between Mali 3D and | 94 // We're continuing to have issues with synchronization between Mali 3D and |
95 // Exynos video decode, so we buffer this many extra GSC output buffers in | 95 // Exynos video decode, so we buffer this many extra GSC output buffers in |
96 // the GSC free output buffers queue, to add a safety margin. | 96 // the GSC free output buffers queue, to add a safety margin. |
97 // Must be lesser than or equal to kDpbOutputBufferExtraCount. | 97 // Must be lesser than or equal to kDpbOutputBufferExtraCount. |
98 // TODO(sheu): remove this hack (http://crbug.com/225563). | 98 // TODO(sheu): remove this hack (http://crbug.com/225563). |
99 kGscOutputBufferExtraForSyncCount = 2, | 99 kGscOutputBufferExtraForSyncCount = 2, |
100 }; | 100 }; |
101 | 101 |
102 // Internal state of the decoder. | 102 // Internal state of the decoder. |
103 enum State { | 103 enum State { |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
427 | 427 |
428 // The codec we'll be decoding for. | 428 // The codec we'll be decoding for. |
429 media::VideoCodecProfile video_profile_; | 429 media::VideoCodecProfile video_profile_; |
430 | 430 |
431 DISALLOW_COPY_AND_ASSIGN(ExynosVideoDecodeAccelerator); | 431 DISALLOW_COPY_AND_ASSIGN(ExynosVideoDecodeAccelerator); |
432 }; | 432 }; |
433 | 433 |
434 } // namespace content | 434 } // namespace content |
435 | 435 |
436 #endif // CONTENT_COMMON_GPU_MEDIA_EXYNOS_VIDEO_DECODE_ACCELERATOR_H_ | 436 #endif // CONTENT_COMMON_GPU_MEDIA_EXYNOS_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |