Improve the interface for the different pixel formats
Unify the get pixel function Complete the interface Change some defines from PlaYUVerDefs.h Add a class to represent a pixel Improve LibAvContextHandle
This commit is contained in:
1 parent
82631f22f9
commit
3dfc1de042
11 files changed
+211
-177
No files matched your search
@@ -343,13 +343,8 @@ void PlaYUVerFrameStatistics::calcHistogramValues()
|
||||
}
|
||||
if( d->calcLuma && ( d->imageColorSpace == PlaYUVerFrame::COLOR_RGB || d->imageColorSpace == PlaYUVerFrame::COLOR_ARGB ) )
|
||||
{
|
||||
Pixel pixel_value =
|
||||
{
|
||||
d->imageColorSpace,
|
||||
*( data[COLOR_R] ),
|
||||
*( data[COLOR_G] ),
|
||||
*( data[COLOR_B] ) };
|
||||
luma = PlaYUVerFrame::ConvertPixel( pixel_value, PlaYUVerFrame::COLOR_YUV ).Luma;
|
||||
PlaYUVerFrame::Pixel currPixel( d->imageColorSpace, *( data[COLOR_R] ), *( data[COLOR_G] ), *( data[COLOR_B] ) );
|
||||
luma = PlaYUVerFrame::ConvertPixel( currPixel, PlaYUVerFrame::COLOR_YUV ).Y();
|
||||
d->histogram[luma + j * d->histoSegments]++;
|
||||
}
|
||||
for( j = 0; j < d->imageChannels; j++ )
|
||||
|
||||
Reference in new issue
Block a user