Deinterlacing "Bottom Frame First" footage in Double Framerate yields incorrect output

Open
#6,061 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Start by reproducing the issue in OBS Studio 27.2.1 on Windows 10 with Bottom Field First footage, using Blend 2x, Linear 2x, or Yadif 2x deinterlacing in Bottom Fields First mode. Compare the output sequence with the expected ordered fields and the linked OBS log and videos; done means the output is no longer reordered as 1, 6, 3, 8, 5, 10.

Written by the indexing model from the issue text.

Description

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

27.2.1

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/XatW6D21UZ_tunCz

OBS Studio Crash Log URL

No response

Expected Behavior

Sets of fields should be reconstructed in their appropriate frames, constructing the first set of fields in every odd frame, and the second set of fields in every even frame. This results in smooth video output with every frame in order, represented by the pattern of 1, 2, 3, 4, 5, 6, [...].

This would match the existing working OBS behavior when "Top Fields First" footage is deinterlaced in "Top Fields First" mode.

image

https://user-images.githubusercontent.com/11812575/156069727-a23ffc5b-bfc7-40cd-a7f8-4376223009c6.mp4

Current Behavior

In the video output, top fields are delayed by 6 frames while bottom frames are constructed properly, resulting in a jerky video
constructed out of order in the pattern of 1, 6, 3, 8, 5, 10, [...]

image

https://user-images.githubusercontent.com/11812575/156070214-fe5a290e-9591-4f11-a307-64e6dd4c9d61.mp4

Steps to Reproduce
  1. Add an input source that contains video content that is interlaced using the "Bottom Field First" method
  2. Enable the Deinterlacing using Blend 2x, Linear 2x or Yadif 2x
  3. Set the Deinterlacing mode to "Bottom Field First"
  4. Watch the video output
Anything else we should know?

If a "Top Fields First" video were to be properly deinterlaced with "Bottom Fields First", and vice versa, then the second set of fields should be constructed one frame behind, leading to a mildly jerky video output. This is expected behavior, and not the behavior currently achieved with this bug.

image

https://user-images.githubusercontent.com/11812575/156070765-bb9e33e8-ffc1-4d74-8f77-e7c7602adaac.mp4

https://user-images.githubusercontent.com/11812575/156070243-0939d936-c4e2-4d9c-b8df-61edb971ef80.mp4

Dominant language
C
Stars
76.4k
Forks
10.2k
Avg merge
4d 23h
Merged PRs (30d)
12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from obsproject/obs-studio

All issues in obsproject/obs-studio

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.