Skip to content

Commit 1f08389

Browse files
Francisco Casasjulliard
Francisco Casas
authored andcommitted
quartz: Align src_pitch for planar formats.
Not doing this results in misaligned video scan lines on videos whose width is not multiple of 4.
1 parent 77fb946 commit 1f08389

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dlls/quartz/vmr7.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static HRESULT vmr_render(struct strmbase_renderer *iface, IMediaSample *sample)
209209
depth = bitmap_header->biBitCount;
210210
if (bitmap_header->biCompression == mmioFOURCC('N','V','1','2')
211211
|| bitmap_header->biCompression == mmioFOURCC('Y','V','1','2'))
212-
src_pitch = width;
212+
src_pitch = (width + 3) & ~3;
213213
else /* packed YUV (UYVY or YUY2) or RGB */
214214
src_pitch = ((width * depth / 8) + 3) & ~3;
215215

dlls/quartz/vmr9.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ static HRESULT vmr_render(struct strmbase_renderer *iface, IMediaSample *sample)
267267
depth = bitmap_header->biBitCount;
268268
if (bitmap_header->biCompression == mmioFOURCC('N','V','1','2')
269269
|| bitmap_header->biCompression == mmioFOURCC('Y','V','1','2'))
270-
src_pitch = width;
270+
src_pitch = (width + 3) & ~3;
271271
else /* packed YUV (UYVY or YUY2) or RGB */
272272
src_pitch = ((width * depth / 8) + 3) & ~3;
273273

0 commit comments

Comments
 (0)