Intel NUC - Haswell (4th Generation CPU)
(2013-11-25, 04:17)Mangoes Wrote:
(2013-11-25, 04:00)lmyllari Wrote: I would prefer hardware decoding (uses less power -> less heat; more CPU available for other tasks). At the moment I'm using software decoding for better quality. My aim is to get the same quality with hardware decoding.

Yes, the vaapi decoding is lower quality than software. It sometimes shows some blockiness in the picture.

I am only using vaapi because the i3 is not strong enough to decode the 2D streams in the 3D blurays. With the i5 I would use software all the way.

What do you mean with "My aim is to get the same quality with hardware decoding". Does this mean you think you can do something about this?
Yes.

The decoding itself should be bit exact; I would be very surprised if it wasn't. The problems are with the RGB range expansion. Video decoder outputs YCbCr data, where Y (luminance) is in the range 16-235. Both Intel hardware decoder and FFmpeg software decoder work the same here. The difference lies in what happens next. With software decoding, xbmc gets the decoded frame in YCbCr format, calculates coefficients taking into account the colorspace and desired output range, and converts to RGB using these. When xbmc requests the decoded frame from VA-API, it specifies the colorspace (bt.601 or bt.709) and gets RGB data. There is no parameter for RGB output range, so VA-API always converts to full range. This means that luminance gets expanded from 16-235 to 0-255 and this is where the problem lies. This creates banding in the output signal.

With software decoding, we can avoid the conversion from 16-235 to 0-255 and get nice clean output.

My plan is to add a range parameter to VA-API and modify it to support limited range (16-235) RGB output. Then xbmc rendering and gpu drivers need to be checked to make sure they pass this through unmodified. The latter part I have already prototyped using the "Video 16:235 pass-through" xrandr rgb range setting.

All of this is for TV users. PC monitors usually want full range signal. That can also be improved by using limited range output from decoder, and dithering when expanding to full range. For software decoding this should be pretty straightforward by adding dithering to the colorspace conversion shader. For hardware decoding I'm not yet sure how it would work. The dithering should not be done before scaling. There are also changes coming with the VA-API post processing. If the decoder output goes through deinterlacing, other post processing, colorspace conversion and scaling, it gets interesting. If all of that could be done with 10bit resolution and dithered at the end, that would be the best for accuracy. I'm not sure if the hardware supports that, and I'm pretty sure the drivers don't.
Reply


Messages In This Thread
Haswell NUC + XBMC - by solamnic - 2013-10-28, 08:14
RE: Haswell NUC + XBMC - by joelbaby - 2013-10-28, 12:32
RE: Haswell NUC + XBMC - by sheva7 - 2013-10-28, 15:11
RE: Haswell NUC + XBMC - by mgmcube - 2013-10-28, 16:21
RE: Haswell NUC + XBMC - by cecemf - 2013-10-28, 17:21
RE: Haswell NUC + XBMC - by floydje07 - 2013-10-28, 17:56
RE: Haswell NUC + XBMC - by joelbaby - 2013-10-29, 04:09
RE: Haswell NUC + XBMC - by floydje07 - 2013-10-29, 09:42
RE: Haswell NUC + XBMC - by mgmcube - 2013-10-29, 08:55
RE: Haswell NUC + XBMC - by zag - 2013-10-28, 19:37
RE: Haswell NUC + XBMC - by cecemf - 2013-10-30, 13:19
RE: Haswell NUC + XBMC - by voip-ninja - 2013-10-28, 23:58
Haswell NUC + XBMC - by solamnic - 2013-10-29, 11:29
RE: Haswell NUC + XBMC - by joelbaby - 2013-10-29, 13:20
RE: Haswell NUC + XBMC - by Acrobat76 - 2013-10-29, 15:11
RE: Haswell NUC + XBMC - by sheva7 - 2013-10-29, 15:14
RE: Haswell NUC + XBMC - by sheva7 - 2013-10-29, 15:02
RE: Haswell NUC + XBMC - by joelbaby - 2013-10-29, 16:01
RE: Haswell NUC + XBMC - by Camlann - 2013-10-29, 16:38
RE: Haswell NUC + XBMC - by mgmcube - 2013-10-29, 17:45
RE: Haswell NUC + XBMC - by Camlann - 2013-10-29, 19:18
RE: Haswell NUC + XBMC - by zag - 2013-10-29, 17:06
RE: Haswell NUC + XBMC - by voip-ninja - 2013-10-29, 21:28
RE: Haswell NUC + XBMC - by solamnic - 2013-10-29, 17:28
RE: Haswell NUC + XBMC - by Camlann - 2013-10-29, 17:42
RE: Haswell NUC + XBMC - by zag - 2013-10-29, 18:15
RE: Haswell NUC + XBMC - by solamnic - 2013-10-29, 20:45
RE: Haswell NUC + XBMC - by tutu - 2013-10-29, 23:00
RE: Haswell NUC + XBMC - by mattchapman - 2013-10-29, 23:12
RE: Haswell NUC + XBMC - by voip-ninja - 2013-10-29, 23:26
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-29, 23:29
RE: Haswell NUC + XBMC - by solamnic - 2013-10-29, 23:43
RE: Haswell NUC + XBMC - by cecemf - 2013-10-30, 14:04
RE: Haswell NUC + XBMC - by Budwyzer - 2013-10-29, 23:46
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-30, 00:31
RE: Haswell NUC + XBMC - by floydje07 - 2013-10-30, 11:44
RE: Haswell NUC + XBMC - by Camlann - 2013-10-30, 11:55
RE: Haswell NUC + XBMC - by solamnic - 2013-10-30, 13:23
RE: Haswell NUC + XBMC - by sheva7 - 2013-10-30, 14:51
RE: Haswell NUC + XBMC - by cecemf - 2013-10-30, 14:55
RE: Haswell NUC + XBMC - by solamnic - 2013-10-30, 14:54
RE: Haswell NUC + XBMC - by sheva7 - 2013-10-30, 15:24
RE: Haswell NUC + XBMC - by 00b5 - 2013-10-30, 15:32
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-30, 15:49
RE: Haswell NUC + XBMC - by tutu - 2013-10-30, 22:20
RE: Haswell NUC + XBMC - by husky55 - 2013-10-31, 18:02
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-31, 18:10
RE: Haswell NUC + XBMC - by husky55 - 2013-10-31, 20:11
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-31, 20:38
RE: Haswell NUC + XBMC - by Camlann - 2013-11-01, 10:18
RE: Haswell NUC + XBMC - by husky55 - 2013-10-31, 20:53
RE: Haswell NUC + XBMC - by solamnic - 2013-10-31, 21:13
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-31, 21:13
RE: Haswell NUC + XBMC - by MrCrispy - 2013-10-31, 21:17
RE: Haswell NUC + XBMC - by Platypus2 - 2013-10-31, 21:52
RE: Haswell NUC + XBMC - by cecemf - 2013-11-01, 14:28
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-01, 16:43
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-01, 17:32
RE: Haswell NUC + XBMC - by cecemf - 2013-11-02, 13:22
RE: Haswell NUC + XBMC - by Camlann - 2013-11-01, 19:39
RE: Haswell NUC + XBMC - by mgmcube - 2013-11-02, 03:58
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-02, 04:03
RE: Haswell NUC + XBMC - by joelbaby - 2013-11-02, 05:55
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-02, 11:59
RE: Haswell NUC + XBMC - by joelbaby - 2013-11-02, 15:30
RE: Haswell NUC + XBMC - by mushoss - 2013-11-02, 19:06
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-02, 15:57
RE: Haswell NUC + XBMC - by tesona1977 - 2013-11-02, 17:41
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-02, 20:18
RE: Haswell NUC + XBMC - by mushoss - 2013-11-02, 20:42
RE: Haswell NUC + XBMC - by mushoss - 2013-11-02, 21:20
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-03, 01:42
RE: Haswell NUC + XBMC - by detroitjb - 2013-11-02, 20:30
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-02, 20:40
RE: Haswell NUC + XBMC - by Selene - 2013-11-04, 19:11
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-04, 23:48
RE: Haswell NUC + XBMC - by solamnic - 2013-11-05, 00:15
RE: Haswell NUC + XBMC - by Selene - 2013-11-05, 06:54
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-05, 16:39
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-05, 17:53
RE: Haswell NUC + XBMC - by Selene - 2013-11-05, 18:16
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-05, 18:28
RE: Haswell NUC + XBMC - by Selene - 2013-11-05, 18:57
RE: Haswell NUC + XBMC - by Javlin - 2013-11-03, 07:26
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-03, 21:30
RE: Haswell NUC + XBMC - by ChopD - 2013-11-04, 01:18
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-04, 01:21
RE: Haswell NUC + XBMC - by ChopD - 2013-11-04, 14:18
RE: Haswell NUC + XBMC - by Javlin - 2013-11-04, 07:07
RE: Haswell NUC + XBMC - by jinkyjim - 2013-11-04, 12:58
AW: RE: Haswell NUC + XBMC - by disrupted - 2013-11-05, 00:32
Haswell NUC + XBMC - by solamnic - 2013-11-05, 09:30
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-05, 22:34
RE: Haswell NUC + XBMC - by Selene - 2013-11-05, 22:39
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-05, 23:03
RE: Haswell NUC + XBMC - by Selene - 2013-11-06, 00:38
RE: Haswell NUC + XBMC - by Platypus2 - 2013-11-06, 01:25
RE: Haswell NUC + XBMC - by cecemf - 2013-11-06, 13:35
RE: Haswell NUC + XBMC - by Selene - 2013-11-06, 01:28
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-06, 17:07
RE: Haswell NUC + XBMC - by zag - 2013-11-06, 00:20
RE: Haswell NUC + XBMC - by solamnic - 2013-11-06, 00:33
RE: Haswell NUC + XBMC - by Selene - 2013-11-06, 19:32
RE: Haswell NUC + XBMC - by cecemf - 2013-11-06, 19:36
RE: Haswell NUC + XBMC - by voip-ninja - 2013-11-06, 19:50
RE: Haswell NUC + XBMC - by renhack - 2013-11-06, 23:16
RE: Haswell NUC + XBMC - by NudistPenguin - 2013-11-07, 02:56
RE: Haswell NUC + XBMC - by Selene - 2013-11-07, 03:42
RE: Haswell NUC + XBMC - by cecemf - 2013-11-07, 09:43
RE: Haswell NUC + XBMC - by cecemf - 2013-11-07, 11:11
RE: Haswell NUC + XBMC - by zag - 2013-11-07, 11:29
RE: Haswell NUC + XBMC - by cecemf - 2013-11-07, 11:43
RE: Intel NUC - HTPC (Haswell Late 2013 edition) - by lmyllari - 2013-11-25, 04:51
MCEUSB ir receiver on nuc? - by alexgsz - 2013-12-22, 15:19
RE: memory - by nc88keyz - 2014-02-24, 23:52
Help with IRC on Haswell - by Pandysan - 2014-03-05, 22:49
Feedback - by chrissitoelle - 2014-04-27, 19:18
Re: RE: - by nickr - 2014-05-04, 01:25
Logout Mark Read Team Forum Stats Members Help
Intel NUC - Haswell (4th Generation CPU)7