| 505 | } |
| 506 | |
| 507 | void ImageTargetCvPixelBuffer::finalize() |
| 508 | { |
| 509 | switch( ::CVPixelBufferGetPixelFormatType( mPixelBufferRef ) ) { |
| 510 | case 'v408':/*k4444YpCbCrA8PixelFormat:*/ |
| 511 | convertDataToAYpCbCr(); |
| 512 | ::CVBufferSetAttachment( mPixelBufferRef, kCVImageBufferYCbCrMatrixKey, kCVImageBufferYCbCrMatrix_ITU_R_601_4, kCVAttachmentMode_ShouldPropagate ); |
| 513 | break; |
| 514 | case 'v308':/*k444YpCbCr8CodecType:*/ |
| 515 | convertDataToYpCbCr(); |
| 516 | ::CVBufferSetAttachment( mPixelBufferRef, kCVImageBufferYCbCrMatrixKey, kCVImageBufferYCbCrMatrix_ITU_R_601_4, kCVAttachmentMode_ShouldPropagate ); |
| 517 | break; |
| 518 | } |
| 519 | } |
| 520 | |
| 521 | // Assumes RGB order 8 bit unsinged input, results in Rec. 601 YpCbCr |
| 522 | void ImageTargetCvPixelBuffer::convertDataToYpCbCr() |
no outgoing calls
no test coverage detected