diff options
author | junjiez <junjiez@codeaurora.org> | 2016-12-07 15:44:46 +0800 |
---|---|---|
committer | qimengp <qimengp@codeaurora.org> | 2016-12-13 19:31:28 +0800 |
commit | 797e9efbb608b95ed8ef297d2552e99a59a92c60 (patch) | |
tree | 4196493df1bb4f9a08b5c10adc9729d0d5b8ffef /rs | |
parent | 568dfe8fb8d7150e242ec778b039458d4e6e0b29 (diff) | |
download | android_packages_apps_Snap-797e9efbb608b95ed8ef297d2552e99a59a92c60.tar.gz android_packages_apps_Snap-797e9efbb608b95ed8ef297d2552e99a59a92c60.tar.bz2 android_packages_apps_Snap-797e9efbb608b95ed8ef297d2552e99a59a92c60.zip |
SnapdragonCamera:Fix front camera preview flipped
Modidfy render script to implement new flip way
according to the front camera mounting position.
Change-Id: I5681447aa17c0499bcb7dc47eef6d4793ee68818
CRs-Fixed: 1097179
Diffstat (limited to 'rs')
-rwxr-xr-x | rs/rotator.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rs/rotator.rs b/rs/rotator.rs index 2c57951d6..62257d2cf 100755 --- a/rs/rotator.rs +++ b/rs/rotator.rs @@ -50,6 +50,10 @@ uchar __attribute__((kernel)) rotate90andMerge(uint32_t x, uint32_t y) { if(x >= width - pad) return (uchar)0; rsSetElementAt_uchar(gOut, yValue, (width-1-x-pad)*height + y); + } else if (degree == 0) { + if(x >= width - pad) + return (uchar)0; + rsSetElementAt_uchar(gOut, yValue, x*height + y); } @@ -71,6 +75,11 @@ uchar __attribute__((kernel)) rotate90andMerge(uint32_t x, uint32_t y) { return (uchar)0; rsSetElementAt_uchar(gOut, uValue, ySize + (width-1-x-pad)/2*height + y -1); rsSetElementAt_uchar(gOut, vValue, ySize + (width-1-x-pad)/2*height + y); + } else if (degree == 0) { + if(x >= (width - pad)) + return (uchar)0; + rsSetElementAt_uchar(gOut, uValue, ySize + x/2*height + y - 1); + rsSetElementAt_uchar(gOut, vValue, ySize + x/2*height + y); } } return (uchar)0; |