vd_lavc: fix comment, document hwdec video frame size trickiness

About this issue, it would be better if the surfaces could be allocated
with the real size, and the vdpau video mixer could be created with that
size as well. That would be a bit hard, because the real surface size
had to be communicated to vdpau. So I'm going with this solution. vaapi
seems to be fine with either surface size, so there's hopefully no
problem.
This commit is contained in:
wm4 2013-08-15 18:20:52 +02:00
parent 0da9638576
commit be2f2ff033
1 changed files with 4 additions and 1 deletions

View File

@ -565,7 +565,10 @@ static struct mp_image *get_surface_hwdec(struct sh_video *sh, AVFrame *pic)
if (!IMGFMT_IS_HWACCEL(imgfmt))
return NULL;
// frame->width/height lie. Using them breaks with non-mod 16 video.
// Using frame->width/height is bad. For non-mod 16 video (which would
// require alignment of frame sizes) we want the decoded size, not the
// aligned size. At least vdpau needs this: the video mixer is created
// with decoded size, and the video surfaces must have matching size.
int w = ctx->avctx->width;
int h = ctx->avctx->height;