Mailing List Archive

[MythTV/mythtv] 987da0: AVFrame deinterlacer
Branch: refs/heads/fixes/32
Home: https://github.com/MythTV/mythtv
Commit: 987da09e83ca80181afdd24a1b457faadd1f2c9f
https://github.com/MythTV/mythtv/commit/987da09e83ca80181afdd24a1b457faadd1f2c9f
Author: Klaas de Waal <klaas@kldo.nl>
Date: 2022-11-22 (Tue, 22 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

(cherry picked from commit d8976e59ea42793a44c8980f452954d21f2ca08d)


_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-commits