[mythtv] Another ffmpeg mediacodec problem
Peter Bennett
pb.mythtv at gmail.com
Mon Sep 24 15:35:14 UTC 2018
Hi Aman
mediacodec is working well with the shield now. I am now testing
Mythfrontend with another android device (amazon fire stick). The amazon
fire stick runs amazon's version of android, which is built on android 5.1.
Playback is working quite well on the fire stick, except for 1080i mpeg2
content.
_
Problem 1_
There is a problem very similar to the one we had on the shield.
This time there is no seg fault, but the color is shifted upward on the
screen.
In this case it is using ff_mediacodec_sw_buffer_copy_yuv420_planar, so
there are three planes. The slice height is 1088. The same patch as
before works, i.e. change the code to use the height (1080) instead of
the slice height fixes the problem. Patch file is attached. For photos
of the screen see below URLs.
Corrupted picture https://imagebin.ca/v/4GogJVTUFY72
Picture after the patch https://imagebin.ca/v/4GogkMDmF7FU
The buffer size that is passed into
ff_mediacodec_sw_buffer_copy_yuv420_planar is the correct size for if it
was using a slice height of 1088. With the shield the buffer size was
only enough for a slice height of 1080, which is why the shield got a
seg fault when it tried to use 1088 as slice height.
size passed in = 3133472
Size needed for 1080 slice height: 1920*1080+960*540+960*540 = 3110400
Size needed for 1088 slice height: 1920*1088+960*544+960*544 = 3133440
in mediacodec_dec_parse_format:
(gdb) print s->codec_name
$9 = 0xb84f51e0 "OMX.MTK.VIDEO.DECODER.MPEG2"
(gdb) print format
$20 = 0xb8582320
"{image-data=java.nio.ByteArrayBuffer[position=0,limit=80,capacity=80],
mime=video/raw, crop-top=0, crop-right=1919, slice-height=1088,
color-format=19, height=1080, width=1920, crop-bottom=1079, crop-left=0,
stride=1920}"
_
Problem 2_
Also on the fire stick, with 480i or 1080i content,
AVFrame::interlaced_frame is always 0. As a result we are not calling
any deinterlacer. Can you help with how we can find out that frames are
interlaced?
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20180924/d1f5065e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20180923_1858_mpeg2_color_fire.patch
Type: text/x-patch
Size: 903 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20180924/d1f5065e/attachment.bin>
More information about the mythtv-dev
mailing list