AshwanthSelvam / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add support for 10/12 bit YUV formats #331

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently the library only supports 8 bit samples.

libvpx/vp9 will soon support 10/12-bit depth encoding and libyuv is used at the 
frontend to scale YUV inputs.

A simple change to support this is to duplicate the current functions and 
change the 8 bit pointers to 16 bit pointers. This has clear maintainability 
issues, but does not disturb the current libyuv API.

I have attached a patch which uses the above method to create a 16 bit codepath 
for I420Scale, which is sufficient for libyuv. This also includes some unit 
tests to compare against the 8 bit C implementations. This patch does not 
include any ASM implementations. 

Original issue reported on code.google.com by james.hu...@argondesign.com on 19 May 2014 at 2:17

Attachments:

GoogleCodeExporter commented 9 years ago
For most functions, supporting 16 bit would be easiest if we use the upper 
bits.  The 10 and 12 bit variations would be the upper 10 or 12 bits of the 16 
bit samples.

I dont think the scaler cares, aside from saturation, but conversion functions 
would need to know.

Support wise, I'm hoping the ARGB and YUV scalers can share more of the low 
levels in the future.  The functionality you've added is consistent with that 
direction, so no problem there.

Original comment by fbarch...@chromium.org on 19 May 2014 at 7:16

GoogleCodeExporter commented 9 years ago
r1005 adds the 16 bit version of yuv scaler.

Original comment by fbarch...@chromium.org on 20 May 2014 at 7:23