intel / media-driver

Intel Graphics Media Driver to support hardware decode, encode and video processing.
https://github.com/intel/media-driver/wiki
Other
957 stars 342 forks source link

[regression] ffmpeg-vaapi scale broken since 24f4538c870c - [VP] 1to3 kernel integration(CL#810055) #386

Closed uartie closed 5 years ago

uartie commented 5 years ago

ffmpeg-vaapi scale pipelines fail since:

commit 24f4538c870c6969a56db0a5aa5387fac8485562 (HEAD -> master)
Author: Geng_Zhao <geng.zhao@intel.com>
Date:   Wed Oct 24 10:19:48 2018 +0800

    [VP] 1to3 kernel integration(CL#810055)

    1. integrate kernel for 1to3 case. using avs sampler.
    2. resotre interface descripte sampler offset as 3D sampler.
    3. modify 16align sampler index as 1 to unify with FC and 1to3.

    Change-Id: I5ef4bd28acb578b512e061c7c61b48b345ea7e17

For example:

$ LIBVA_DRIVER_NAME=iHD ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 \
  -v verbose -f rawvideo -pix_fmt nv12 -s:v 1280x720 -i input.yuv \
  -vf 'format=nv12,hwupload,scale_vaapi=w=1920:h=1080,hwdownload,format=nv12' \
  -pix_fmt nv12 -vframes 10 -y test.yuv

ffmpeg version 4.0.git Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8 (GCC)
  configuration: --prefix=/home/uaeoff/Work/workspace/media/install --disable-static --enable-shared --enable-libdrm --enable-vaapi --enable-libmfx --disable-amf --disable-audiotoolbox --disable-cuda --disable-cuda-sdk --disable-cuvid --disable-d3d11va --disable-dxva2 --disable-libnpp --disable-mmal --disable-nvdec --disable-nvenc --disable-omx --disable-omx-rpi --disable-rkmpp --disable-v4l2-m2m --disable-vdpau --disable-videotoolbox --enable-nonfree --enable-gpl
  libavutil      56. 20.100 / 56. 20.100
  libavcodec     58. 33.102 / 58. 33.102
  libavformat    58. 19.102 / 58. 19.102
  libavdevice    58.  4.106 / 58.  4.106
  libavfilter     7. 37.100 /  7. 37.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
[AVHWDeviceContext @ 0x1b92480] Opened VA display via DRM device /dev/dri/renderD128.
[AVHWDeviceContext @ 0x1b92480] libva: VA-API version 1.4.0
[AVHWDeviceContext @ 0x1b92480] libva: va_getDriverName() returns 0
[AVHWDeviceContext @ 0x1b92480] libva: User requested driver 'iHD'
[AVHWDeviceContext @ 0x1b92480] libva: Trying to open /home/uaeoff/Work/workspace/media/install/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x1b92480] libva: Found init function __vaDriverInit_1_4
[AVHWDeviceContext @ 0x1b92480] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x1b92480] Initialised VAAPI connection: version 1.4
[AVHWDeviceContext @ 0x1b92480] VAAPI driver: Intel iHD driver - 1.0.0.
[AVHWDeviceContext @ 0x1b92480] Driver not found in known nonstandard list, using standard behaviour.
[rawvideo @ 0x1bcd040] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from '/home/uaeoff/input.yuv':
  Duration: 00:00:00.40, start: 0.000000, bitrate: 276480 kb/s
    Stream #0:0: Video: rawvideo, 1 reference frame (NV12 / 0x3231564E), nv12, 1280x720, 276480 kb/s, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0x1be0500] w:1280 h:720 pixfmt:nv12 tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
[AVHWFramesContext @ 0x1be62c0] Failed to sync surface 0xa: 1 (operation failed).
[hwdownload @ 0x1bdf0c0] Failed to download frame: -5.
Error while filtering: Input/output error
Failed to inject frame into filter network: Input/output error
Error while processing the decoded data for stream #0:0
[AVIOContext @ 0x1bdaf80] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0x1bd5940] Statistics: 1382400 bytes read, 0 seeks
Conversion failed!

Software Stack:

libva (master) heads/master-0-g285267586a3d  https://github.com/01org/libva
gmmlib (master) heads/master-0-g3e602a84dccd  https://github.com/intel/gmmlib
intel-media-driver (master) heads/master-0-g24f4538c870c  https://github.com/intel/media-driver
msdk (master) heads/master-0-g20a2ecff395d  https://github.com/Intel-Media-SDK/MediaSDK
ffmpeg (master) heads/master-0-g6a112349c206  https://git.ffmpeg.org/ffmpeg
uartie commented 5 years ago

11059d2e556fe834 is the quick fix. Please reference issue numbers (e.g. #386) in commit messages. GitHub will automatically create link between issue and commit and makes it easier to see when activity occurs for specific issue.