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)
- Remove I422ToBGRARow functions HOT 1
- chromium media perf test gn HOT 4
- YUV to RGB use registers for x64 HOT 2
- ARMv7 I420ToBGRA test fails HOT 2
- GCC YUV to RGB transpose matrix versions fail HOT 9
- GN build incomplete HOT 1
- memory leak in unittest HOT 4
- memory read failure in I411 HOT 10
- I420 Interpolation HOT 2
- YUV alpha blender HOT 13
- UYVYToNV12 fails on odd height HOT 2
- xgetbv(0) fails on Visual C 2013 release builds HOT 5
- convert_test.cc:1750:1: error: unused variable 'max_diff' HOT 3
- row_win.cc(2321): error C2400: inline assembler syntax error in 'opcode'; found 'ymm0' HOT 3
- android debug build error HOT 2
- row_gcc.cc:1809:5: error: inline assembly requires more registers than available HOT 6
- Exception: Environment variable "SYSTEMROOT" required to be set to valid path HOT 7
- InterpolateRow rounding inconsistent HOT 7
- Android - ValueError: 'build' is not in list
- TestInterpolatePlane test fail on linux HOT 3
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.