Opened 5 years ago

Last modified 5 years ago

#8457 open defect

make fate HWACCEL=auto fails wih CUDA_ERROR_INVALID_IMAGE

Reported by: Slava Andrejev Owned by:
Priority: normal Component: fate
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I tried to run make fate HWACCEL=auto. It failed on ljpeg test.

Here is the command line that the test is using:

% ffmpeg -nostdin -nostats -cpuflags all -flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact -threads 1 -hwaccel auto -threads 1 -
thread_type frame+slice -i tests/data/fate/vsynth1-ljpeg.avi -flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact -threads 1 -dct f
astint -s 352x288 -pix_fmt yuv420p -vsync 0 -flags +bitexact -sws_flags +accurate_rnd+bitexact -fflags +bitexact -f rawvideo -y tests/data/fate/vsynth1-ljpeg.ou
t.rawvideo
ffmpeg version N-96270-gc3a17ffff6 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.2.1-9ubuntu2)
  configuration: --enable-shared --enable-cuda-nvcc --enable-libnpp --enable-cuda --enable-cuvid --enable-nvdec --enable-nvenc --enable-nonfree --enable-opengl
--samples=$HOME/fate-suite --prefix=$HOME/ffmpegenv
  libavutil      56. 38.100 / 56. 38.100
  libavcodec     58. 65.102 / 58. 65.102
  libavformat    58. 35.101 / 58. 35.101
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 70.101 /  7. 70.101
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
Input #0, avi, from 'tests/data/fate/vsynth1-ljpeg.avi':
  Duration: 00:00:02.00, start: 0.000000, bitrate: 25237 kb/s
    Stream #0:0: Video: mjpeg (Lossless) (LJPG / 0x47504A4C), yuv420p(tv, bt470bg/unknown/unknown), 352x288, lossless, 25724 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tb
c
[mjpeg @ 0x55ef7dccd400] Using auto hwaccel type cuda with new default device.
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> rawvideo (native))
[mjpeg @ 0x55ef7dccd400] decoder->cvdl->cuvidDecodePicture(decoder->decoder, &ctx->pic_params) failed -> CUDA_ERROR_INVALID_IMAGE: device kernel image is invali
d
Error while decoding stream #0:0: Generic error in an external library

cuvidGetDecoderCaps returned that the format is supported:

[mjpeg @ 0x5555555fcf00] Calling decoder->cvdl->cuvidGetDecoderCaps(&caps)
[mjpeg @ 0x5555555fcf00] NVDEC capabilities:
[mjpeg @ 0x5555555fcf00] format supported: yes, max_mb_count: 67108864
[mjpeg @ 0x5555555fcf00] min_width: 64, max_width: 32768
[mjpeg @ 0x5555555fcf00] min_height: 64, max_height: 16384

GPU: GP107-400
OS: Linux x64
NVIDIA Driver version: 435.21

cuvidCreateDecoder also was successful, CUVIDDECODECREATEINFO:

   ulWidth = 352,
   ulHeight = 288,
   ulNumDecodeSurfaces = 6,
   CodecType = cudaVideoCodec_JPEG,
   ChromaFormat = cudaVideoChromaFormat_420,
   ulCreationFlags = 0,
   bitDepthMinus8 = 0,
   ulIntraDecodeOnly = 0,
   ulMaxWidth = 0,
   ulMaxHeight = 0,
   Reserved1 = 0,
   display_area = {left = 0, top = 0, right = 0, bottom = 0},
   OutputFormat = cudaVideoSurfaceFormat_NV12,
   DeinterlaceMode = cudaVideoDeinterlaceMode_Weave,
   ulTargetWidth = 352,
   ulTargetHeight = 288,
   ulNumOutputSurfaces = 6,
   vidLock = 0x0,
   target_rect = {left = 0, top = 0, right = 0, bottom = 0},
   Reserved2 = {0, 0, 0, 0, 0}

cuvidDecodePicture fails, CUVIDPICPARAMS:

    PicWidthInMbs = 22,
    FrameHeightInMbs = 18,
    CurrPicIdx = 0,
    field_pic_flag = 0,
    bottom_field_flag = 0,
    second_field = 0,
    nBitstreamDataLen = 126392,
    pBitstreamData = 0x5555556106c2 "\377\376",
    nNumSlices = 1,
    pSliceDataOffsets = 0x555555ad8690,
    ref_pic_flag = 0,
    intra_pic_flag = 1,
    Reserved = {0 <repeats 30 times>},
    CodecSpecific = {
        mpeg2 = { ... },
        h264 = { ... },
        vc1 = { ... },
        mpeg4 = { ... },
        jpeg = {Reserved = 0},
        hevc = { ... },
        vp8 = { .... },
        vp9 = { ... },
        CodecReserved = {0 <repeats 1024 times>}
    }

Change History (4)

comment:1 by Slava Andrejev, 5 years ago

I have information that lossless JPEG is not supported by the GPU. How to make this regression test run in software even if HWACCEL is specified?

comment:2 by Carl Eugen Hoyos, 5 years ago

Component: undeterminedfate
Status: newopen

No GPU supports lossless jpeg.

comment:4 by Slava Andrejev, 5 years ago

I asked, it's not supported. The question is not about the support, the question is how to make make fate run giving the circumstances.

Note: See TracTickets for help on using tickets.