Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbfff9ce authored by Emilian Peev's avatar Emilian Peev
Browse files

Camera: Lift the 32 pixel alignment Jpeg/R width limitation

32 pixel alignment for Jpeg/R outputs is no longer needed.
Remove the jpeg orientation capture result query. Exif orientation
is handled by the 'ExifUtils' output.

Bug: 262265296
Test: atest -c -d
cts/tests/camera/src/android/hardware/camera2/cts/ImageReaderTest.java#testJpegR

Change-Id: I709a23b5783def4554743d39eadea092cb9f6d90
parent bbe94a6b
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -247,12 +247,6 @@ status_t JpegRCompositeStream::processInputFrame(nsecs_t ts, const InputFrame &i
        jpegQuality = entry.data.u8[0];
    }

    uint8_t jpegOrientation = 0;
    entry = inputFrame.result.find(ANDROID_JPEG_ORIENTATION);
    if (entry.count > 0) {
        jpegOrientation = entry.data.i32[0];
    }

    if ((res = native_window_set_buffers_dimensions(mOutputSurface.get(), maxJpegRBufferSize, 1))
            != OK) {
        ALOGE("%s: Unable to configure stream buffer dimensions"
+2 −4
Original line number Diff line number Diff line
@@ -1160,10 +1160,8 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::deriveJpegRTags(bool
            static_cast<android_pixel_format_t>(HAL_PIXEL_FORMAT_YCBCR_P010), &supportedP010Sizes);
    auto it = supportedP010Sizes.begin();
    while (it != supportedP010Sizes.end()) {
        // Resolutions that don't align on 32 pixels are not supported by Jpeg/R.
        // This can be removed as soon as the encoder restriction is lifted.
        if ((std::find(supportedBlobSizes.begin(), supportedBlobSizes.end(), *it) ==
                supportedBlobSizes.end()) || ((std::get<0>(*it) % 32) != 0)) {
        if (std::find(supportedBlobSizes.begin(), supportedBlobSizes.end(), *it) ==
                supportedBlobSizes.end()) {
            it = supportedP010Sizes.erase(it);
        } else {
            it++;