diff options
author | Dheeraj Sharma <dheerajs@google.com> | 2011-01-30 15:22:39 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-01-30 15:22:39 -0800 |
commit | 471ebbca5f404062bed232aa27da9c1f1ebf0a1d (patch) | |
tree | 200db9219ee937c326d3ce4a9be2fcac6ed130f7 /media | |
parent | bd633b7297c60771223f0e8799c418cdbce3017c (diff) | |
parent | 45911e1969fd1843bac5806e06f351123b67f596 (diff) | |
download | frameworks_base-471ebbca5f404062bed232aa27da9c1f1ebf0a1d.zip frameworks_base-471ebbca5f404062bed232aa27da9c1f1ebf0a1d.tar.gz frameworks_base-471ebbca5f404062bed232aa27da9c1f1ebf0a1d.tar.bz2 |
am 45911e19: Merge "Fix for issue 3400229 Pan and Zoom effect is not accurate in JAVA and JNI" into honeycomb
* commit '45911e1969fd1843bac5806e06f351123b67f596':
Fix for issue 3400229 Pan and Zoom effect is not accurate in JAVA and JNI
Diffstat (limited to 'media')
-rwxr-xr-x | media/java/android/media/videoeditor/MediaImageItem.java | 12 | ||||
-rwxr-xr-x | media/jni/mediaeditor/VideoEditorClasses.cpp | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/media/java/android/media/videoeditor/MediaImageItem.java b/media/java/android/media/videoeditor/MediaImageItem.java index f1315c0..633e7ee 100755 --- a/media/java/android/media/videoeditor/MediaImageItem.java +++ b/media/java/android/media/videoeditor/MediaImageItem.java @@ -794,8 +794,8 @@ public class MediaImageItem extends MediaItem { return clipSettings; } - PanZoomXa = (100 * start.width()) / width; - PanZoomXb = (100 * end.width()) / width; + PanZoomXa = (1000 * start.width()) / width; + PanZoomXb = (1000 * end.width()) / width; clipSettings.clipPath = getDecodedImageFileName(); clipSettings.fileType = mMANativeHelper.getMediaItemFileType(getFileType()); @@ -805,11 +805,11 @@ public class MediaImageItem extends MediaItem { clipSettings.endCutPercent = 0; clipSettings.panZoomEnabled = true; clipSettings.panZoomPercentStart = PanZoomXa; - clipSettings.panZoomTopLeftXStart = (start.left * 100) / width; - clipSettings.panZoomTopLeftYStart = (start.top * 100) / height; + clipSettings.panZoomTopLeftXStart = (start.left * 1000) / width; + clipSettings.panZoomTopLeftYStart = (start.top * 1000) / height; clipSettings.panZoomPercentEnd = PanZoomXb; - clipSettings.panZoomTopLeftXEnd = (end.left * 100) / width; - clipSettings.panZoomTopLeftYEnd = (end.top * 100) / height; + clipSettings.panZoomTopLeftXEnd = (end.left * 1000) / width; + clipSettings.panZoomTopLeftYEnd = (end.top * 1000) / height; clipSettings.mediaRendering = mMANativeHelper.getMediaItemRenderingMode(getRenderingMode()); diff --git a/media/jni/mediaeditor/VideoEditorClasses.cpp b/media/jni/mediaeditor/VideoEditorClasses.cpp index 369faa9..c3585e8 100755 --- a/media/jni/mediaeditor/VideoEditorClasses.cpp +++ b/media/jni/mediaeditor/VideoEditorClasses.cpp @@ -1548,7 +1548,7 @@ videoEditClasses_createClipSettings( // Set the panZoomPercentStart field. pEnv->SetIntField(object, fieldIds.panZoomPercentStart, - (100 - pSettings->xVSS.PanZoomXa)); + (1000 - pSettings->xVSS.PanZoomXa)); // Set the panZoomTopLeftXStart field. pEnv->SetIntField(object, fieldIds.panZoomTopLeftXStart, @@ -1560,7 +1560,7 @@ videoEditClasses_createClipSettings( // Set the panZoomPercentEnd field. pEnv->SetIntField(object, fieldIds.panZoomPercentEnd, - (100 - pSettings->xVSS.PanZoomXb)); + (1000 - pSettings->xVSS.PanZoomXb)); // Set the panZoomTopLeftXEnd field. pEnv->SetIntField(object, fieldIds.panZoomTopLeftXEnd, |