20 #ifndef PIXELFORMAT_H_
21 #define PIXELFORMAT_H_
22 #include <com/avpkit/core/AVPKit.h>
23 #include <com/avpkit/core/IPixelFormat.h>
25 namespace com {
namespace avpkit {
namespace core
37 static int getFastYUV420PPixelOffset(
int width,
int height,
39 IPixelFormat::YUVColorComponent c)
44 case IPixelFormat::YUV_Y:
49 case IPixelFormat::YUV_U:
51 int area = width*height;
52 int w2 = (width+1)>>1;
53 retval = (y>>1)*w2+(x>>1)+area;
56 case IPixelFormat::YUV_V:
58 int area = width*height;
59 int w2 = (width+1)>>1;
60 int h2 = (height+1)>>1;
62 retval = (y>>1)*w2+(x>>1)+area+area2;
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...