What does deinterlace preset EEDI2 do?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
damian101
Posts: 8
Joined: Wed Apr 18, 2018 9:06 pm

What does deinterlace preset EEDI2 do?

Post by damian101 »

I was very happy when deinterlace preset "EEDI2 Bob" was added to Handbrake, it is a visible improvement over "Bob" for deinterlacing interlaced video that wasn't produced from progressive video, and for the latter "Default" is already theoretically ideal as it just reverses the interlacing process.
But I wonder what "EEDI2" does, and what its purpose is. Like "Default" it produces 25 full frames a second from a 50i video if two half frames can be combined to a coherent full progressive frame, but for interlaced content where that's not possible it shows some pretty weird behaviour, seemingly irregularly combining half frames and sometimes one unique frame per half frame. Does "EEDI2" upscale each half frame using EEDI2 and then mashes frames together when they are similar enough?

Using HandBrake version 1.3.3 on RebornOS (Arch Linux), from Flatpak repository
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: What does deinterlace preset EEDI2 do?

Post by mduell »

EEDI2 (Enhanced Edge Directed Interpolation) resizes an image by 2x in the vertical direction by copying the current image to every other line in the resized image and then interpolating the missing field
damian101
Posts: 8
Joined: Wed Apr 18, 2018 9:06 pm

Re: What does deinterlace preset EEDI2 do?

Post by damian101 »

mduell wrote: Wed May 05, 2021 1:14 pm EEDI2 (Enhanced Edge Directed Interpolation) resizes an image by 2x in the vertical direction by copying the current image to every other line in the resized image and then interpolating the missing field
I mean the Handbrake filter "Decomb -> EEDI2", not the algorithm EEDI2.
For filter "Decomb -> EEDI2 Bob" it's pretty clear what it does: Run each half frame through EEDI2. But for "Decomb -> EEDI2" it's different. The behaviour shows that it doesn't just discard every second half-frame and runs the rest through EEDI2.
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: What does deinterlace preset EEDI2 do?

Post by Ritsuka »

Decomb blends frames too if the interlace detection is below a certain threshold. It should be possible to set the custom options and disable it, or maybe it's automatically disabled if the "Interlace detection" filter is off, I don't remember.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: What does deinterlace preset EEDI2 do?

Post by mduell »

Decombing checks for combing; if none is found it doesn't deinterlace the frame, if a little is found it blends, if a lot is found it runs your deinterlacer of choice.
damian101
Posts: 8
Joined: Wed Apr 18, 2018 9:06 pm

Re: What does deinterlace preset EEDI2 do?

Post by damian101 »

Ritsuka wrote: Wed May 05, 2021 2:22 pm Decomb blends frames too if the interlace detection is below a certain threshold. It should be possible to set the custom options and disable it, or maybe it's automatically disabled if the "Interlace detection" filter is off, I don't remember.
I don't think Decomb tries to blend half frames together when using the EEDI2 preset, because when I run the EEDI2 Decomb preset on material where every pair of half frames should easily blend together the CPU load and average encoding fps still shows that every single half frame is being upscaled with EEDI2, as it is the case with the EEDI2 Bob preset.
I always had the Interlace detection filter off.
User avatar
Ritsuka
HandBrake Team
Posts: 1650
Joined: Fri Jan 12, 2007 11:29 am

Re: What does deinterlace preset EEDI2 do?

Post by Ritsuka »

The statistics are at the end of the activity log, it will tell you how many frames were blended and how many were deinterlaced.
Post Reply