DXVA2 auto turn on/off ?

Hi. I use Kodi 17 with win 10 x64. Intel Celeron 3930. The problem with the video quality when I enable dxva2. Dxva2 really reduce the image quality. For video playback at resolutions 720p and 1080p my CPU copes without dxva2. (both x264/x265). But 4K videos is already a bit slow. At the same time playing 4k dxva2 does not spoil the picture. So I have each time go in to the Kodi settings and manually enable/disable dxva2. Whether it is possible to set a rule to dxva2 automatic turn on, if the video resolution more than 1080p ?