[FFmpeg-trac] #8400(avcodec:new): Add tiles encoding support for HEVC QSV

FFmpeg trac at avcodec.org
Tue Nov 26 04:41:53 EET 2019


#8400: Add tiles encoding support for HEVC QSV
-------------------------------------+-------------------------------------
             Reporter:  fulinjie     |                    Owner:
                 Type:  enhancement  |                   Status:  new
             Priority:  normal       |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  QSV HEVC     |               Blocked By:
  Tiles                              |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by fulinjie):

 Log after the patch is applied:

 option:
 -tile_rows 2 -tile_cols 2

 Output:
 [hevc_qsv @ 0x11f9700] NumTileColumns: 2; NumTileRows: 2


 {{{
 ffmpeg -v verbose -hwaccel qsv -init_hw_device qsv=hw -filter_hw_device hw
 -f rawvideo -s:v 1920x1080 -i ./1080p_blue_sky.yuv -vf
 format=nv12,hwupload=extra_hw_frames=64 -c:v hevc_qsv -tile_rows 2
 -tile_cols 2 -vframes 10 -y ./qsv.h265
 ffmpeg version N-95879-gdcfc671 Copyright (c) 2000-2019 the FFmpeg
 developers
   built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
   configuration: --enable-vaapi --prefix=/opt/X11R7/iHD/ffmpeg_mainline
 --enable-nonfree --enable-shared --enable-libmfx --enable-gpl --enable-
 libx264 --enable-libx265 --disable-optimizations --enable-debug=3
 --disable-stripping --enable-libvorbis --enable-libvpx --samples=fate-
 suite
   libavutil      56. 36.100 / 56. 36.100
   libavcodec     58. 62.100 / 58. 62.100
   libavformat    58. 35.100 / 58. 35.100
   libavdevice    58.  9.101 / 58.  9.101
   libavfilter     7. 67.100 /  7. 67.100
   libswscale      5.  6.100 /  5.  6.100
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
 [AVHWDeviceContext @ 0x1164980] Trying to use DRM render node for device
 0.
 [AVHWDeviceContext @ 0x1164980] libva: VA-API version 1.6.0
 [AVHWDeviceContext @ 0x1164980] libva: User requested driver 'iHD'
 [AVHWDeviceContext @ 0x1164980] libva: Trying to open
 /opt/X11R7/iHD/vpg_driver/lib/dri//iHD_drv_video.so
 [AVHWDeviceContext @ 0x1164980] libva: Found init function
 __vaDriverInit_1_6
 [AVHWDeviceContext @ 0x1164980] libva: va_openDriver() returns 0
 [AVHWDeviceContext @ 0x1164980] Initialised VAAPI connection: version 1.6
 [AVHWDeviceContext @ 0x1164980] VAAPI driver: Intel iHD driver - 1.0.0.
 [AVHWDeviceContext @ 0x1164980] Driver not found in known nonstandard
 list, using standard behaviour.
 [AVHWDeviceContext @ 0x1164400] Initialize MFX session: API version is
 1.30, implementation version is 1.30
 [rawvideo @ 0x11deb40] Estimating duration from bitrate, this may be
 inaccurate
 Input #0, rawvideo, from './1080p_blue_sky.yuv':
   Duration: 00:00:08.68, start: 0.000000, bitrate: 622080 kb/s
     Stream #0:0: Video: rawvideo, 1 reference frame (I420 / 0x30323449),
 yuv420p, 1920x1080, 622080 kb/s, 25 tbr, 25 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> hevc (hevc_qsv))
 Press [q] to stop, [?] for help
 [graph 0 input from stream 0:0 @ 0x11feb40] w:1920 h:1080 pixfmt:yuv420p
 tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
 [auto_scaler_0 @ 0x1202000] w:iw h:ih flags:'bicubic' interl:0
 [Parsed_format_0 @ 0x11641c0] auto-inserting filter 'auto_scaler_0'
 between the filter 'graph 0 input from stream 0:0' and the filter
 'Parsed_format_0'
 [auto_scaler_0 @ 0x1202000] w:1920 h:1080 fmt:yuv420p sar:0/1 -> w:1920
 h:1080 fmt:nv12 sar:0/1 flags:0x4
 [AVHWDeviceContext @ 0x1202980] VAAPI driver: Intel iHD driver - 1.0.0.
 [AVHWDeviceContext @ 0x1202980] Driver not found in known nonstandard
 list, using standard behaviour.
 VPP PIPELINE:
 RESIZE
 VPP PIPELINE:
 RESIZE
 VPP PIPELINE:
 RESIZE
 VPP PIPELINE:
 RESIZE
 [hevc_qsv @ 0x11f9700] Using the variable bitrate (VBR) ratecontrol method
 [AVHWDeviceContext @ 0x127e140] VAAPI driver: Intel iHD driver - 1.0.0.
 [AVHWDeviceContext @ 0x127e140] Driver not found in known nonstandard
 list, using standard behaviour.
 [hevc_qsv @ 0x11f9700] profile: simple; level: 40
 [hevc_qsv @ 0x11f9700] GopPicSize: 248; GopRefDist: 9; GopOptFlag: closed
 ; IdrInterval: 1
 [hevc_qsv @ 0x11f9700] TargetUsage: 4; RateControlMethod: VBR
 [hevc_qsv @ 0x11f9700] BufferSizeInKB: 250; InitialDelayInKB: 125;
 TargetKbps: 1000; MaxKbps: 1000; BRCParamMultiplier: 1
 [hevc_qsv @ 0x11f9700] NumSlice: 4; NumRefFrame: 5
 [hevc_qsv @ 0x11f9700] RateDistortionOpt: unknown
 [hevc_qsv @ 0x11f9700] NumTileColumns: 2; NumTileRows: 2
 [hevc_qsv @ 0x11f9700] RecoveryPointSEI: unknown IntRefType: 0;
 IntRefCycleSize: 0; IntRefQPDelta: 0
 [hevc_qsv @ 0x11f9700] MaxFrameSize: 0; MaxSliceSize: 0;
 [hevc_qsv @ 0x11f9700] BitrateLimit: unknown; MBBRC: unknown; ExtBRC: OFF
 [hevc_qsv @ 0x11f9700] Trellis: auto
 [hevc_qsv @ 0x11f9700] VDENC: OFF
 [hevc_qsv @ 0x11f9700] RepeatPPS: OFF; NumMbPerSlice: 0; LookAheadDS:
 unknown
 [hevc_qsv @ 0x11f9700] AdaptiveI: unknown; AdaptiveB: unknown; BRefType:
 pyramid
 [hevc_qsv @ 0x11f9700] MinQPI: 0; MaxQPI: 0; MinQPP: 0; MaxQPP: 0; MinQPB:
 0; MaxQPB: 0
 [hevc_qsv @ 0x11f9700] GPB: ON
 [hevc_qsv @ 0x11f9700] FrameRateExtD: 1; FrameRateExtN: 25
 Output #0, hevc, to './qsv.h265':
   Metadata:
     encoder         : Lavf58.35.100
     Stream #0:0: Video: hevc (hevc_qsv), 1 reference frame, qsv,
 1920x1080, q=2-31, 1000 kb/s, 25 fps, 25 tbn, 25 tbc
     Metadata:
       encoder         : Lavc58.62.100 hevc_qsv
     Side data:
       cpb: bitrate max/min/avg: 0/0/1000000 buffer size: 0 vbv_delay: N/A
 No more output streams to write to, finishing.
 frame=   10 fps=0.0 q=-0.0 Lsize=      41kB time=00:00:00.24
 bitrate=1388.2kbits/s speed=0.662x
 video:41kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.000000%
 Input file #0 (./1080p_blue_sky.yuv):
   Input stream #0:0 (video): 10 packets read (31104000 bytes); 10 frames
 decoded;
   Total: 10 packets (31104000 bytes) demuxed
 Output file #0 (./qsv.h265):
   Output stream #0:0 (video): 10 frames encoded; 10 packets muxed (41645
 bytes);
   Total: 10 packets (41645 bytes) muxed
 [AVIOContext @ 0x11fa400] Statistics: 0 seeks, 1 writeouts
 (null)CRITICAL - UnloadCPLib:131: Invalid m_referenceCount
 [AVIOContext @ 0x11e7c80] Statistics: 31104000 bytes read, 0 seeks
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8400#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list