本帖最後由 hoyee108 於 2013-2-18 00:57 編輯
現在的 IC 幾乎都有 HW overlay 的能力, 應 該沒甚麼好討論的, 可惜故事還沒有完. 大 家如果把玩手上的 Android 手機或是平板, 可能會在設定裡面看到 "停用硬體重疊圖 層" 這個選項. 既然 HW overlay 看起來比 較好, 幹嘛把它停用呢? 每一個 OpenGL 的 process 都需要 2~8MB 的 RAM, 浪費 記憶體就不用說了. GPU 還要挺高檔才行 [註 3].
每秒可以畫 1000 M pixel/second 的 200MHz SGX544, 在 1920×1080@60FPS (frame per second) 的輸出螢幕上, 能在每 個 pixel render 8.0375 次. 若是換成了 SGX531就只能 render 4 次 [註 4]. 這 4 次 如果用來畫一層背景, 一層電影. 一層進度 條和 OSD (on screen display), 一層字幕, 就已經達到 GPU 的硬體極限. 此時只是做 到 HW overlay 的水準而已, 但什麼 3D 動 畫效果都畫不出來了.
以上都是說 Android 的壞話, 但 Google 卻 可以藉著不支援 HW Overlay 來統一硬體的 差異, copybit 不就在 Android 4.0 上被拔 掉了嗎? 若是放任每一家廠商製作的 HW Overlay 都不相同, 當然就限制了 APP (跨 平台的) 的互通性. 再者, GPU 只要聰明地 用, 不要常常 redraw 沒用的畫面, 效率還是 不會太差 [註 3]. 按照 Android 的官方說法, 全部的畫面都能進入 GPU 的話, 使用者將 可以得到更多樂趣! 至於 GPU 的計算能 力….當然必須夠, 這不是 Android 的責任範 圍, 它只是個做軟體的. [註5]
Media effects for transforming images and video
A set of high-performance transformation filters let developers apply rich effects to any image passed as an OpenGL ES 2.0 texture. Developers can adjust color levels and brightness, change backgrounds, sharpen, crop, rotate, add lens distortion, and apply other effects. The transformations are processed by the GPU, so they are fast enough for processing image frames loaded from disk, camera, or video stream.
[註]
1. Android Display (surfaceflinger and Overlay)
2. Android 显示系统
3. The truth about hardware acceleration on Android
4. PowerVR
5. Ice Cream Sandwich
不關會掉了2-8ram
關不關没關係
因为你的机子有2gbram |