Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium YUV requirements #73

Open
GoogleCodeExporter opened this issue Dec 31, 2015 · 14 comments
Open

Chromium YUV requirements #73

GoogleCodeExporter opened this issue Dec 31, 2015 · 14 comments

Comments

@GoogleCodeExporter
Copy link

In this crbug some libyuv concerns are raised:
http://code.google.com/p/chromium/issues/detail?id=142518

Comment 11 by [email protected], Yesterday (19 hours ago)
1. libYUV supports convertions between RGB32(different packing formats, ARGB, 
ABGR, BGRA, etc) to YUV but seems it misses some features(mirroring, filter 
modes FILTER_BILINEAR_H and FILTER_BILINEAR_V).
2. LibYUV provides basic functions but no functions which implement several 
features in one function. for example, ScaleYUVToRGB32 combines many basic 
features like scale, convert, rotate. I think it might be implemented with APIs 
of libYUV and need support from libYUV.
3. For platform support, now the implementation in media/base supports MMX and 
SSE instructions. libYUV doesn't only support them but also NEON, etc.

API mapping between YUV related APIs in media/base and libYUV:
a) ConvertYUVToRGB32: (convert YV12 and YV16 to rgb formats) 
   libYUV: ConvertToARGB(I420ToARGB, I422ToARGB),  I420ToABGR,  I420ToBGRA, etc
b) ConvertRGB32ToYUV: 
   libYUV: ARGBToI420, BGRAToI420
c) ScaleYUVToRGB32: 
   Actually this function combines scale, convert, rotate features. libYUV doesn't have this kind of function. Another thing is that I don't find libYUV support mirroring.
d) ScaleYUVToRGB32WithRect: libYUV seems not have this kind of function. may 
need implementation in libYUV.
e) ConvertRGB24ToYUV: 
   libYUV: RGB24ToI420
f) ConvertYUY2ToYUV: no need to use libyuv 
g) ConvertNV21ToYUV: no need to use libyuv

Original issue reported on code.google.com by [email protected] on 23 Aug 2012 at 3:35

@GoogleCodeExporter
Copy link
Author

Chromoting has 2 requirements
1. speed up libyuv unittests
2. run libyuv unittests from chromium builds.

Original comment by [email protected] on 30 Aug 2012 at 7:42

@GoogleCodeExporter
Copy link
Author

Progress update:
1. speed up unittests.  Done.  Was 5 minutes.  Now 10 seconds.

try server and build bots added to libyuv.
valgrind added.  tsan and asan pass.  TODO memcheck.
webrtc has additional unittests and builds/runs bots, including Android.

RGBA to/from ARGB added and optimized for SSSE3.

Original comment by [email protected] on 14 Sep 2012 at 6:29

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

RGBA to/from I420 optimized for SSSE3.

Original comment by [email protected] on 18 Sep 2012 at 6:07

@GoogleCodeExporter
Copy link
Author

NEON optimized I420ToRGBA.  RGBA, ARGB, BGRA and ARGB are all supported.

Re
f) ConvertYUY2ToYUV: no need to use libyuv
libyuv version is fully optimized for SSE2.
NEON version coming soon.

g) ConvertNV21ToYUV: no need to use libyuv
libyuv version is fully optimized for NV12/21, on NEON and SSE2 and including 
fully register based rotate by 90/180/270.  32 bit version rotates 8x8 blocks 
while 64 bit rotates 16x8.
NV12 is the most common mobile format, so rotation is important.
Also NV12ToARGB is a one step direct conversion with SSSE3, and theres an 
NV12toRGB565 for mobile.


Original comment by [email protected] on 19 Sep 2012 at 4:37

@GoogleCodeExporter
Copy link
Author

r431 ARGBToRGB565/555/4444 optimized for NEON.
f) g) optimized unaligned versions of YUY2 and NV12 for Neon and SSSE3.

Original comment by [email protected] on 20 Oct 2012 at 7:00

@GoogleCodeExporter
Copy link
Author

b) ConvertRGB32ToYUV
r481 optimized for Neon.

Original comment by [email protected] on 13 Nov 2012 at 7:00

@GoogleCodeExporter
Copy link
Author

r548 optimizes YUV bilinear scale for SSE2 (was SSSE3).

Original comment by [email protected] on 22 Jan 2013 at 8:04

@GoogleCodeExporter
Copy link
Author

Step 1 complete.  RGB to YUV and YUV to RGB use libyuv.  10% overall 
performance improvement.

Original comment by [email protected] on 3 May 2013 at 7:01

@GoogleCodeExporter
Copy link
Author

RGBToI420 tested for Chrome media capture.  20x faster (was C)

Original comment by [email protected] on 10 Sep 2013 at 8:22

@GoogleCodeExporter
Copy link
Author

RGBAToBGRA used.  Now optimized for AVX2 and SSE2, as well as SSSE3 and Neon 
circa r810.

Original comment by [email protected] on 13 Oct 2013 at 2:51

@GoogleCodeExporter
Copy link
Author

A number of media functions now use libyuv.  The main unsatisfied requirement 
is YUV to ARGB scaling.

Original comment by [email protected] on 25 Feb 2014 at 8:50

@GoogleCodeExporter
Copy link
Author

Closing overall issue.  libyuv is in use in various parts of chromium.
Open specific bugs for followup.

Original comment by [email protected] on 9 Feb 2015 at 7:02

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Progress made on this bug, so reopening to track the 7 basic requests:

API mapping between YUV related APIs in media/base and libYUV:
a) ConvertYUVToRGB32: (convert YV12 and YV16 to rgb formats) 
   libYUV: ConvertToARGB(I420ToARGB, I422ToARGB),  I420ToABGR,  I420ToBGRA, etc
b) ConvertRGB32ToYUV: 
   libYUV: ARGBToI420, BGRAToI420
c) ScaleYUVToRGB32: 
   Actually this function combines scale, convert, rotate features. libYUV doesn't have this kind of function. Another thing is that I don't find libYUV support mirroring.
d) ScaleYUVToRGB32WithRect: libYUV seems not have this kind of function. may 
need implementation in libYUV.
e) ConvertRGB24ToYUV: 
   libYUV: RGB24ToI420
f) ConvertYUY2ToYUV: no need to use libyuv 
g) ConvertNV21ToYUV: no need to use libyuv

Original comment by [email protected] on 5 Oct 2015 at 6:06

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

f) ConvertYUY2ToYUV: no need to use libyuv
Done - removed.
g) ConvertNV21ToYUV: no need to use libyuv
Done - removed.
a), b) previously. done.

That leaves scale and RGB24
c) ScaleYUVToRGB32: 
   Actually this function combines scale, convert, rotate features. libYUV doesn't have this kind of function. Another thing is that I don't find libYUV support mirroring.
d) ScaleYUVToRGB32WithRect: libYUV seems not have this kind of function. may 
need implementation in libYUV.
e) ConvertRGB24ToYUV: 
   libYUV: RGB24ToI420

Original comment by [email protected] on 7 Oct 2015 at 1:02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant