Skip to content

Commit

Permalink
Fix: MaskSub: stop returning vertically flipped result for RGB32
Browse files Browse the repository at this point in the history
  • Loading branch information
pinterf committed Nov 16, 2022
1 parent 46b15ff commit 6bb1fc8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/filters/transform/vsfilter/plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1391,10 +1391,16 @@ class CTextSubFilter : virtual public CFilter
env->MakeWritable(&frame);

dst.pitch = frame->GetPitch();
dst.pitchUV = frame->GetPitch(PLANAR_U);
dst.pitchUV = frame->GetPitch(PLANAR_U); // n/a for RGB
dst.bits = frame->GetWritePtr();
dst.bitsU = frame->GetWritePtr(PLANAR_U);
dst.bitsV = frame->GetWritePtr(PLANAR_V);
dst.bitsU = frame->GetWritePtr(PLANAR_U); // n/a for RGB
dst.bitsV = frame->GetWritePtr(PLANAR_V); // n/a for RGB
if (vi.IsRGB32() && useRGBAwhenRGB32) {
// MSP_RGB32 is flipped, MSP_RGBA is not flipped
// but since both is RGB32 in Avisynth, it must be adjusted here
dst.bits += (vi.height - 1) * dst.pitch;
dst.pitch = -dst.pitch;
}
}

// Common part
Expand Down

0 comments on commit 6bb1fc8

Please sign in to comment.