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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 = 8, |
89 kMfcInputBufferMaxSize = 512 * 1024, | 89 kMfcInputBufferMaxSize = 512 * 1024, |
90 kGscInputBufferCount = 4, | 90 kGscInputBufferCount = 4, |
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 = 3, |
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 | |
96 // the GSC free output buffers queue, to add a safety margin. | |
97 // Must be lesser than or equal to kDpbOutputBufferExtraCount. | |
98 // TODO(sheu): remove this hack (http://crbug.com/225563). | |
99 kGscOutputBufferExtraForSyncCount = 2, | |
100 }; | 94 }; |
101 | 95 |
102 // Internal state of the decoder. | 96 // Internal state of the decoder. |
103 enum State { | 97 enum State { |
104 kUninitialized, // Initialize() not yet called. | 98 kUninitialized, // Initialize() not yet called. |
105 kInitialized, // Initialize() returned true; ready to start decoding. | 99 kInitialized, // Initialize() returned true; ready to start decoding. |
106 kDecoding, // DecodeBufferInitial() successful; decoding frames. | 100 kDecoding, // DecodeBufferInitial() successful; decoding frames. |
107 kResetting, // Presently resetting. | 101 kResetting, // Presently resetting. |
108 kAfterReset, // After Reset(), ready to start decoding again. | 102 kAfterReset, // After Reset(), ready to start decoding again. |
109 kError, // Error in kDecoding state. | 103 kError, // Error in kDecoding state. |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 421 |
428 // The codec we'll be decoding for. | 422 // The codec we'll be decoding for. |
429 media::VideoCodecProfile video_profile_; | 423 media::VideoCodecProfile video_profile_; |
430 | 424 |
431 DISALLOW_COPY_AND_ASSIGN(ExynosVideoDecodeAccelerator); | 425 DISALLOW_COPY_AND_ASSIGN(ExynosVideoDecodeAccelerator); |
432 }; | 426 }; |
433 | 427 |
434 } // namespace content | 428 } // namespace content |
435 | 429 |
436 #endif // CONTENT_COMMON_GPU_MEDIA_EXYNOS_VIDEO_DECODE_ACCELERATOR_H_ | 430 #endif // CONTENT_COMMON_GPU_MEDIA_EXYNOS_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |