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

Commit c9992148 authored by Wonsik Kim's avatar Wonsik Kim Committed by Android (Google) Code Review
Browse files

Merge "codec2: Fix width and height when output is cropped" into qt-dev

parents 6c7fa038 f7c49e27
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1739,7 +1739,7 @@ void CCodec::onMessageReceived(const sp<AMessage> &msg) {
                        //      block.width(), block.height());
                        updates.emplace_back(new C2StreamCropRectInfo::output(stream, block.crop()));
                        updates.emplace_back(new C2StreamPictureSizeInfo::output(
                                stream, block.width(), block.height()));
                                stream, block.crop().width, block.crop().height));
                        break; // for now only do the first block
                    }
                    ++stream;
+2 −2
Original line number Diff line number Diff line
@@ -391,8 +391,8 @@ public:
                return;
        }
        mediaImage->mNumPlanes = layout.numPlanes;
        mediaImage->mWidth = mWidth;
        mediaImage->mHeight = mHeight;
        mediaImage->mWidth = view.crop().width;
        mediaImage->mHeight = view.crop().height;
        mediaImage->mBitDepth = bitDepth;
        mediaImage->mBitDepthAllocated = mAllocatedDepth;

+2 −2
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ static status_t _ImageCopy(View &view, const MediaImage2 *img, ImagePixel *imgBa
}  // namespace

status_t ImageCopy(uint8_t *imgBase, const MediaImage2 *img, const C2GraphicView &view) {
    if (view.width() != img->mWidth || view.height() != img->mHeight) {
    if (view.crop().width != img->mWidth || view.crop().height != img->mHeight) {
        return BAD_VALUE;
    }
    if ((IsNV12(view) && IsI420(img)) || (IsI420(view) && IsNV12(img))) {
@@ -153,7 +153,7 @@ status_t ImageCopy(uint8_t *imgBase, const MediaImage2 *img, const C2GraphicView
}

status_t ImageCopy(C2GraphicView &view, const uint8_t *imgBase, const MediaImage2 *img) {
    if (view.width() != img->mWidth || view.height() != img->mHeight) {
    if (view.crop().width != img->mWidth || view.crop().height != img->mHeight) {
        return BAD_VALUE;
    }
    if ((IsNV12(img) && IsI420(view)) || (IsI420(img) && IsNV12(view))) {