[mythtv-commits] [MythTV/mythtv] d8976e: AVFrame deinterlacer

kmdewaal noreply at github.com
Fri Nov 18 18:20:24 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: d8976e59ea42793a44c8980f452954d21f2ca08d
      https://github.com/MythTV/mythtv/commit/d8976e59ea42793a44c8980f452954d21f2ca08d
  Author: Klaas de Waal <klaas at kldo.nl>
  Date:   2022-11-18 (Fri, 18 Nov 2022)

  Changed paths:
    M mythtv/libs/libmythtv/mythavutil.cpp

  Log Message:
  -----------
  AVFrame deinterlacer

The AVFrame deinterlacer is used by mytharchivehelper to create thumbnail images.
In commit bb6365f the code has been updated to use the MythVideoFrame deinterlacer;
previously a local implementation was used.
This commit introduced an error in the conversion from AVFrame to MythVideoFrame.
MythVideoFrame expects the video data to be stored in a contiguous memory area, with
one base pointer and various offsets pointing to the different areas (Y, U, V).
AVFrame has three pointers and can and does use separate memory areas.
The original code used pointer subtractions to compute the offsets for MythVideoFrame
but this only works if the video memory is one contigous memory area.
If not, it leads to segfaults.
This is now fixed by copying the AVFrame video data into a temporary buffer
and passing that to the deinterlacer.
Note that commit bb6365f has not been reverted because the MythVideoFrame deinterlacer
gives a better picture quality than the original AVFrame deinterlacer.
Thanks to @bshanteau for reporting the problem.
Thanks to @rcrdnalor for analyzing the problem.

Refs #633




More information about the mythtv-commits mailing list