Is QSV out of the picture when a filter is active?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
qweh00
Posts: 7
Joined: Wed Jan 21, 2015 9:51 pm

Is QSV out of the picture when a filter is active?

Post by qweh00 »

Description of problem or question:
My encodes are really quick when not using any filter, but horrendously slow when a filter, like Denoise, is active.
Does enabling a filter somehow remove QSV from the processing chain?

Steps to reproduce the problem (If Applicable):
h264 encode with QSV enabled with no filters, standard 90min movie: ~45 - 50mins
h264 encode with QSV and Denoise (NLMeans, llight, film): ~6hrs

HandBrake version (e.g., 1.0.0):
1.5.1 x86_64

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Linux Mint 21
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: Is QSV out of the picture when a filter is active?

Post by Ritsuka »

NLMeans is a horrendously slow CPU filter.
qweh00
Posts: 7
Joined: Wed Jan 21, 2015 9:51 pm

Re: Is QSV out of the picture when a filter is active?

Post by qweh00 »

Code: Select all

[11:40:08] CPU: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
[11:40:08]  - Intel microarchitecture Broadwell
[11:40:08]  - logical processor count: 4
[11:40:08] Intel Quick Sync Video support: yes
[11:40:08]  - Intel Media SDK hardware: API 1.35 (minimum: 1.3)
[11:40:08]  - Decode support:  h264
[11:40:08]  - H.264 encoder: yes
[11:40:08]     - preferred implementation: hardware (any) via ANY
[11:40:08]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[11:40:08]  - H.265 encoder: no
[11:40:08] hb_scan: path=/dev/sr1, title_index=4
[11:40:11] scan: BD has 8 title(s)
[11:40:11] bd: scanning title 4
[11:40:11] bd: playlist 00005.MPLS
[11:40:11] bd: duration is 01:38:52 (5932384 ms)
[11:40:11] bd: video id=0x1011, stream type=MPEG2, format 1080p
[11:40:11] bd: aspect = 16:9
[11:40:11] bd: audio id=0x1100, lang=English (AC3), 3cc=eng
[11:40:11] bd: audio id=0x1101, lang=English (DTS), 3cc=eng
[11:40:11] bd: subtitle id=0x1200, lang=English [PGS], 3cc=eng
[11:40:11] bd: subtitle id=0x1201, lang=Francais [PGS], 3cc=fra
[11:40:11] bd: subtitle id=0x1202, lang=español [PGS], 3cc=spa
[11:40:11] bd: subtitle id=0x1203, lang=English [PGS], 3cc=eng
[11:40:11] bd: chap 1, 191065 ms
[11:40:11] bd: chap 2, 134134 ms
[11:40:11] bd: chap 3, 292000 ms
[11:40:11] bd: chap 4, 261761 ms
[11:40:11] bd: chap 5, 279279 ms
[11:40:11] bd: chap 6, 404695 ms
[11:40:11] bd: chap 7, 222138 ms
[11:40:11] bd: chap 8, 294585 ms
[11:40:11] bd: chap 9, 164080 ms
[11:40:11] bd: chap 10, 350641 ms
[11:40:11] bd: chap 11, 245203 ms
[11:40:11] bd: chap 12, 495328 ms
[11:40:11] bd: chap 13, 387428 ms
[11:40:11] bd: chap 14, 122205 ms
[11:40:11] bd: chap 15, 323948 ms
[11:40:11] bd: chap 16, 352101 ms
[11:40:11] bd: chap 17, 260468 ms
[11:40:11] bd: chap 18, 469343 ms
[11:40:11] bd: chap 19, 287120 ms
[11:40:11] bd: chap 20, 394852 ms
[11:40:11] bd: title 4 has 20 chapters
[11:40:11] scan: decoding previews for title 4
[11:40:11] scan: title angle(s) 1
[11:40:11] scan: audio 0x1101: dca, rate=48000Hz, bitrate=1536000 English (DTS-ES) (6.1 ch) (1536 kbps)
[11:40:11] scan: audio 0x1100: ac3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch) (640 kbps)
[11:40:15] scan: 10 previews, 1920x1080, 23,976 fps, autocrop = 0/2/2/6, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[11:40:15] stream: 7 good frames, 0 errors (0%)
[11:40:15] libhb: scan thread found 1 valid title(s)
[11:40:15] Starting Task: Encoding Pass
[11:40:15] Skipping vfr filter
[11:40:15] NLMeans using SSE2 optimizations
[11:40:15] NLMeans using 4 threads
[11:40:15] job configuration:
[11:40:15]  * source
[11:40:15]    + /dev/sr1
[11:40:15]    + title 4, chapter(s) 1 to 20
[11:40:15]  * destination
[11:40:15]    + /media/qweh00/HD25/movie.denoise.mkv
[11:40:15]    + container: Matroska (libavformat)
[11:40:15]      + chapter markers
[11:40:15]  * video track
[11:40:15]    + decoder: mpeg2video 8-bit (yuv420p)
[11:40:15]      + bitrate 200 kbps
[11:40:15]    + filters
[11:40:15]      + Denoise (nlmeans) (y-strength=3:y-origin-tune=0,9:y-patch-size=7:y-range=3:y-frame-count=2:y-prefilter=0:cb-strength=4:cb-origin-tune=0,9:cb-patch-size=7:cb-range=3:cb-frame-count=2:cb-prefilter=0)
[11:40:15]      + Crop and Scale (width=1912:height=1078:crop-top=0:crop-bottom=2:crop-left=2:crop-right=6)
[11:40:15]        + source: 1920 * 1080, crop (0/2/2/6): 1912 * 1078, scale: 1912 * 1078
[11:40:15]    + Output geometry
[11:40:15]      + storage dimensions: 1912 x 1078
[11:40:15]      + pixel aspect ratio: 1 : 1
[11:40:15]      + display dimensions: 1912 x 1078
[11:40:15]    + encoder: H.264 (Intel Media SDK)
[11:40:15]      + preset:  balanced
[11:40:15]      + profile: main
[11:40:15]      + level:   4.1
[11:40:15]      + quality: 20,00 (ICQ)
[11:40:15]      + color profile: 1-1-1
[11:40:15]      + chroma location: left
[11:40:15]  * subtitle track 1, English [PGS] (track 0, id 0x1200, Picture) -> Passthrough
[11:40:15]  * subtitle track 2, English [PGS] (track 3, id 0x1203, Picture) -> Passthrough
[11:40:15]  * audio track 1
[11:40:15]    + decoder: English (AC3) (5.1 ch) (640 kbps) (track 1, id 0x1100)
[11:40:15]      + bitrate: 640 kbps, samplerate: 48000 Hz
[11:40:15]    + AC3 Passthru
[11:40:15]  * audio track 2
[11:40:15]    + decoder: English (DTS-ES) (6.1 ch) (1536 kbps) (track 2, id 0x1101)
[11:40:15]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[11:40:15]    + DTS Passthru
[11:40:16] sync: expecting 142234 video frames
[11:40:16] hb_display_init: using VA driver 'iHD'
libva info: VA-API version 1.14.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
[11:40:16] encqsvInit: using encode-only path
[11:40:16] encqsvInit: H.264/AVC Main profile @ level 4.1
[11:40:16] encqsvInit: TargetUsage 4 AsyncDepth 4
[11:40:16] encqsvInit: GopRefDist 3 GopPicSize 24 NumRefFrame 1
[11:40:16] encqsvInit: BFramesMax 2 BRefType off
[11:40:16] Unknown Header.BufferId=1347637059
[11:40:16] encqsvInit: RateControlMethod ICQ ICQQuality 20
[11:40:16] encqsvInit: MBBRC on
[11:40:16] sync: first pts video is 0
[11:40:16] sync: "Chapter 1" (1) at frame 1 time 0
[11:40:16] sync: first pts audio 0x1100 is 0
[11:40:16] sync: first pts audio 0x1101 is 0
[11:40:17] qsv_enc_init: using 'hardware (1) via VAAPI' implementation, API: 1.35
[11:41:00] sync: first pts subtitle 0x1200 is 1148647
[11:41:00] sync: first pts subtitle 0x1203 is 1148647
[11:52:35] sync: "Chapter 2" (2) at frame 4582 time 17195928
[12:00:03] sync: "Chapter 3" (3) at frame 7798 time 29267988
[12:15:30] sync: "Chapter 4" (4) at frame 14799 time 55547992
[12:32:13] sync: "Chapter 5" (5) at frame 21075 time 79106527
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: Is QSV out of the picture when a filter is active?

Post by s55 »

Nothing unusual in the log.

It's using QSV, however You've put NLMeans in front of it which essentially bottlenecks the pipeline due to heavy nature of the filter and very slow CPU.
Post Reply