Skip to content

Commit

Permalink
Leverage PixelFrame generic image read capability
Browse files Browse the repository at this point in the history
Summary: Code suggestion to simplify code and help support other compression formats

Reviewed By: PiotrBrzyski

Differential Revision:
D51786216

Privacy Context Container: L1181955

fbshipit-source-id: 3bc2306115099de526a4c01f6265be4d84f308ba
  • Loading branch information
Georges Berenger authored and facebook-github-bot committed Dec 4, 2023
1 parent 536d2bc commit 2b78347
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/data_provider/players/AriaImageSensorPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ bool AriaImageSensorPlayer::onImageRead(
auto& imageSpec = cb.image();
size_t blockSize = cb.getBlockSize();
// Synchronously read the image data, which is jpg compressed with Aria
if (imageSpec.getImageFormat() == vrs::ImageFormat::JPG) {
vrs::utils::PixelFrame::readJpegFrame(data_.pixelFrame, r.reader, cb.getBlockSize());
callback_(r, data_.pixelFrame->getBuffer(), verbose_);
} else if (imageSpec.getImageFormat() == vrs::ImageFormat::RAW) {
vrs::utils::PixelFrame::readRawFrame(data_.pixelFrame, r.reader, imageSpec);
if (vrs::utils::PixelFrame::readFrame(data_.pixelFrame, r.reader, cb)) {
callback_(r, data_.pixelFrame->getBuffer(), verbose_);
}
if (verbose_) {
Expand Down

0 comments on commit 2b78347

Please sign in to comment.