Opened 9 years ago

#1559 new defect

-vf expand does not properly handle uyvy or yuy2 format

Reported by: rectalogic@… Owned by: reimar
Priority: normal Component: vf
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

Play or encode any file and expand width by 2 pixels and force format to uyvy (or yuy2) and the resulting output is blue-ish, e.g.

mplayer test.mp4 -vf expand=-2:0,format=uyvy,scale
mencoder test.mp4 -nosound -ovc raw -vf expand=-2:0,format=uyvy -o out.avi

(makes more sense when using mencoder and you want raw uyvy/yuy2 in the output file)

Workaround is to add an extra scale to do conversion so vf_expand works in YV12.

mplayer test.mp4 -vf expand=-2:0,scale,format=uyvy,scale
mencoder test.mp4 -nosound -ovc raw -vf expand=-2:0,scale,format=uyvy -o out.avi

I think the issue is vf_expand is using vf->priv->exp_x*(vf->dmpi->bpp/8) to offset into vf->dmpi->planes[0], and for UYVY vf->dmpi->bpp==16 but this is "effectively" 16 bpp, so can't just divide by 8 to get a byte offset of a pixel.

Change History (0)

Note: See TracTickets for help on using tickets.