summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorPosselwhite <christopher.posselwhite@sonyericsson.com>2011-06-21 12:41:01 +0200
committerelektroschmock <elektroschmock78@googlemail.com>2013-03-08 22:07:22 +0100
commit10fb74257c5950850146efede727490880616f87 (patch)
tree2f36f3d9d2b2d788f0ac71a59479c38b73f0fef1 /media
parenta18377f810d54ea34e72f67f3b0266371becda15 (diff)
downloadframeworks_base-10fb74257c5950850146efede727490880616f87.zip
frameworks_base-10fb74257c5950850146efede727490880616f87.tar.gz
frameworks_base-10fb74257c5950850146efede727490880616f87.tar.bz2
Performance increase in thumbnail handling
Allow for 160*120 thumbnails which is what cameras commonly generates. The constants for the micro thumbnail were set to other values, resulting in recalculations of the thumbnais, which takes time. This change only affects the maximum size of the temporary image, when choosing whether to use the EXIF thumbnail or decoding and downsampling the full image. Without this change, it will choose an x16 downsampling of the full image over an x2 downsampling of the EXIF thumbnail, after the change it will prefer the EXIF thumbnail. Cf the DCF specifications at http://www.exif.org/dcf.PDF, "3.3.6. DCF basic thumbnail data structure, (C) Pixel count" Tested by running DDMS and measuring the time required to create a thumbnail. This was 220-280 ms prior to change, < 20 ms after. Change-Id: I59c753493f947e920bad3fde5eeed5d49d509863
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/ThumbnailUtils.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/java/android/media/ThumbnailUtils.java b/media/java/android/media/ThumbnailUtils.java
index 8eb9332..756638c 100644
--- a/media/java/android/media/ThumbnailUtils.java
+++ b/media/java/android/media/ThumbnailUtils.java
@@ -48,7 +48,7 @@ public class ThumbnailUtils {
/* Maximum pixels size for created bitmap. */
private static final int MAX_NUM_PIXELS_THUMBNAIL = 512 * 384;
- private static final int MAX_NUM_PIXELS_MICRO_THUMBNAIL = 128 * 128;
+ private static final int MAX_NUM_PIXELS_MICRO_THUMBNAIL = 160 * 120;
private static final int UNCONSTRAINED = -1;
/* Options used internally. */