Commit afbd3cc
committed
lavf/qsvvpp: Fix a transcoding issue when input isn't 64 bytes aligned
When the input is yuv420p format from software decoding, the vpp output
may be incorrect when width is not 64 bytes aligned.
see: ffmpeg -init_hw_device qsv=foo -filter_hw_device foo -i spam_720x480.avi -an
-vcodec h264_qsv -vf [main]vpp_qsv=w=512:h=288[out] out.mp4
Patch is evolution from Gilles Vieira on
#16, and
root caused as:
"When width = 720, after alignment the Y’s linesize is 736, and
U, V’s line size is 384 and “736 != 384 * 2”. But mfxFrameSurface1 in
current mSDK has only one linesize field for Y component; and I think it
use half of Y’s linesize to be U, V’s linesize, and it’s the root cause
of the issue."
Idea-by: Gilles Vieira
Signed-off-by: Zhong Li <zhong.li@intel.com>1 parent be6cdf7 commit afbd3cc
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
304 | 307 | | |
305 | | - | |
| 308 | + | |
306 | 309 | | |
307 | 310 | | |
308 | 311 | | |
| |||
0 commit comments