<p>Personally I always stick to multiple of 8 but here it is:</p>
<p>Multiple of 4: In H.265, DCT can be done in 4x4 Transform Units, so it's not a problem for that. It can also use motion vectors for 8x4 or 4x8 Prediction Units if there is only a single reference frame, or 8x8 if there are 2 reference frames. I suspect this causes some inefficiency, but nowhere near as bad as not-divisible-by-16 was for MPEG-4.</p>
<p>Multiple of 2: I would not do that. Both PUs and TUs have to be padded. (I suspect it's still better than MPEG-4, just because the &quot;bad&quot; blocks are not that huge.) Also, what are you gaining? Cutting off 2 pixels is not going to be noticeable.</p>
<p>Multiple of 1: You can't even do it unless the pixel format is YUV444. Don't do it unless it's a really low resolution video, like maybe you are using it as a replacement for GIFs.</p>

CC BY-SA 4.0
2021-07-28T17:00:35.183Z
2021-07-28T17:00:35.183Z
stribika
<p>Are there any disadvantages (like worse image quality/more compression artefacts) when encoding a video in H.265 with dimensions that are not a multiple of 16 or 8, but instead a multiple of 4 or 2?
For example 1920x816 vs. 1920x818.</p>

<p>At least in file size there seems to be no difference, as far as my tests go.</p>

<encoding><video-quality><h.265><h265>
H.265 disadvantages with video dimensions not multiple of 8
YourMJK
# H.265 disadvantages with video dimensions not multiple of 8

(Asked by: username_0 on 2018-09-18)

Are there any disadvantages (like worse image quality/more compression artefacts) when encoding a video in H.265 with dimensions that are not a multiple of 16 or 8, but instead a multiple of 4 or 2?
For example 1920x816 vs. 1920x818.

At least in file size there seems to be no difference, as far as my tests go.

**Tags:** encoding, video-quality, h.265, h265


---

## 1 answers

### Answer by username_1 on 2021-07-28. Score: 2 | Accepted answer

Personally I always stick to multiple of 8 but here it is:

Multiple of 4: In H.265, DCT can be done in 4x4 Transform Units, so it's not a problem for that. It can also use motion vectors for 8x4 or 4x8 Prediction Units if there is only a single reference frame, or 8x8 if there are 2 reference frames. I suspect this causes some inefficiency, but nowhere near as bad as not-divisible-by-16 was for MPEG-4.

Multiple of 2: I would not do that. Both PUs and TUs have to be padded. (I suspect it's still better than MPEG-4, just because the "bad" blocks are not that huge.) Also, what are you gaining? Cutting off 2 pixels is not going to be noticeable.

Multiple of 1: You can't even do it unless the pixel format is YUV444. Don't do it unless it's a really low resolution video, like maybe you are using it as a replacement for GIFs.


---

