Add some more test cases for RTCCVPixelBuffer.
Also fix rendering of certain i420 buffers in debug quicklook. Bug: None Change-Id: I793915c3a5a1fcb4cd7b24383d1579655e9a7c28 Reviewed-on: https://webrtc-review.googlesource.com/72080 Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Commit-Queue: Anders Carlsson <andersc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23005}
This commit is contained in:

committed by
Commit Bot

parent
1a759c6354
commit
2efb665e27
@ -127,9 +127,9 @@
|
|||||||
_i420Buffer->DataV(),
|
_i420Buffer->DataV(),
|
||||||
_i420Buffer->StrideV(),
|
_i420Buffer->StrideV(),
|
||||||
ctxData,
|
ctxData,
|
||||||
_i420Buffer->width() * 4,
|
CGBitmapContextGetBytesPerRow(c),
|
||||||
_i420Buffer->width(),
|
CGBitmapContextGetWidth(c),
|
||||||
_i420Buffer->height());
|
CGBitmapContextGetHeight(c));
|
||||||
|
|
||||||
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
|
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
|
||||||
UIGraphicsEndImageContext();
|
UIGraphicsEndImageContext();
|
||||||
|
@ -133,6 +133,18 @@
|
|||||||
outputSize:CGSizeMake(0, 0)];
|
outputSize:CGSizeMake(0, 0)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)testCropAndScaleToSmallFormat_NV12 {
|
||||||
|
[self cropAndScaleTestWithNV12InputFormat:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
|
||||||
|
outputFormat:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
|
||||||
|
outputSize:CGSizeMake(148, 320)];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)testCropAndScaleToOddFormat_NV12 {
|
||||||
|
[self cropAndScaleTestWithNV12InputFormat:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
|
||||||
|
outputFormat:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
|
||||||
|
outputSize:CGSizeMake(361, 640)];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)testCropAndScale_32BGRA {
|
- (void)testCropAndScale_32BGRA {
|
||||||
[self cropAndScaleTestWithRGBPixelFormat:kCVPixelFormatType_32BGRA];
|
[self cropAndScaleTestWithRGBPixelFormat:kCVPixelFormatType_32BGRA];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user