Comments (4)
Note on this line: src_uplane + (width * height / 4);
it wont be quite right for odd width/height.
best to compute
int half_width = (width + 1) / 2;
int half_height = (height + 1) / 2;
unsigned char * src_vplane = src_uplane + half_width * half_height;
The main issue is you're passing src as destination. Unfortunately I didn't
anticipate that one and it won't work in the current code.
The way the function works internally is it writes each row of destination,
starting at the top left, with a horizontally mirrored row, starting the reads
at the last row.
It would be difficult to make 90 and 270 degree rotation work, but it would be
possible to make 180 work, if it swapped 2 rows at a time.
Original comment by [email protected]
on 28 Mar 2012 at 12:28
- Changed state: Started
from libyuv.
r227 adds I420Rotate by 180 in place
1. ConvertToI420 now has the ability to rotate anything (ie MJPG) using a
temporary buffer. So it was easy to add a check for destination==source and
use the buffer to allow rotate to work 'in-place'. But it wont really be
inplace.
2. I420Rotate does 2 rows at a time, swapping them and mirroring.
Performance is only marginally slower, but more flexible, so I always use the
new approach for better code coverage.
Before:
ConstructI420Rotate0 (455 ms)
ConstructI420Rotate90 (921 ms)
ConstructI420Rotate180 (425 ms)
ConstructI420Rotate270 (922 ms)
After
ConstructI420Rotate0 (460 ms)
ConstructI420Rotate90 (917 ms)
ConstructI420Rotate180 (461 ms)
ConstructI420Rotate270 (911 ms)
Original comment by [email protected]
on 28 Mar 2012 at 3:03
from libyuv.
Original comment by [email protected]
on 28 Mar 2012 at 8:05
- Changed state: Fixed
from libyuv.
r247 fixes a Neon rotate issue.
Original comment by [email protected]
on 22 Apr 2012 at 3:08
from libyuv.
Related Issues (20)
- ARGBToUVJRow_SSSE3 used but expected ARGBToUVJRow_AVX2 HOT 3
- NV12ToARGBRow_SSSE3 used, but should be NV12ToARGBRow_AVX2, based on I422ToARGBRow_AVX2 HOT 5
- I411ToARGBRow_SSSE3 used but expected AVX2. Adapt from I422ToARGBRow_AVX2 HOT 5
- I422ToYUY2Row_SSE2 - port to AVX2 HOT 1
- I422ToARGBRow_SSSE3 used; expected I422ToARGBRow_AVX2 HOT 5
- ScaleRowDown2Box_Odd_SSSE3 for odd source width subsampling.
- Convert16To8 for higher bit depth conversions
- Convert16ToF16 for higher bit depth conversions to half float.
- MJPGToARGB prototype in wrong header HOT 2
- Row_ name consistency HOT 3
- Signed int overflows in row_gcc.cc HOT 12
- test msan HOT 8
- rename MIPS_DSPR2 to DSPR2 HOT 2
- -DLIBYUV_DISABLE_X86=1 build HOT 2
- libyuv 'Source' shows old svn content - update or remove HOT 1
- SVN turn down HOT 1
- libyuv_neon.a library build failed in ios building HOT 2
- Android - android/test_runner.py ImportError: No module named dependency_manager HOT 4
- ARGBToRGB565 neon use vsri HOT 1
- ARGBToA
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libyuv.