void YuvBufferT::rotate180() { luma_ = rotateBuffer180(luma_); chromaU_ = rotateBuffer180(chromaU_); chromaV_ = rotateBuffer180(chromaV_); packedPlanarChromaView_ = rotateBuffer180(packedPlanarChromaView_); interleavedChromaView_ = rotateBuffer180(interleavedChromaView_); // Rotating the above two views effectively swaps U and V. switch(chromaStorage_) { case ChromaStorage::kPlanarPackedUFirst: chromaStorage_ = ChromaStorage::kPlanarPackedVFirst; break; case ChromaStorage::kPlanarPackedVFirst: chromaStorage_ = ChromaStorage::kPlanarPackedUFirst; break; case ChromaStorage::kInterleavedUFirst: chromaStorage_ = ChromaStorage::kInterleavedVFirst; break; case ChromaStorage::kInterleavedVFirst: chromaStorage_ = ChromaStorage::kInterleavedUFirst; break; default: // nothing break; }; }
void YuvBufferT::rotate180() { rotateBuffer180(&luma_); rotateBuffer180(&chromaU_); rotateBuffer180(&chromaV_); rotateBuffer180(&packedPlanarChromaView_); rotateBuffer180(&interleavedChromaView_); // Rotating the above two views effectively swaps U and V. switch(chromaStorage_) { case ChromaStorage::kPlanarPackedUFirst: chromaStorage_ = ChromaStorage::kPlanarPackedVFirst; break; case ChromaStorage::kPlanarPackedVFirst: chromaStorage_ = ChromaStorage::kPlanarPackedUFirst; break; case ChromaStorage::kInterleavedUFirst: chromaStorage_ = ChromaStorage::kInterleavedVFirst; break; case ChromaStorage::kInterleavedVFirst: chromaStorage_ = ChromaStorage::kInterleavedUFirst; break; }; }