[mythtv-commits] Ticket #13233: Android Hardware accelerated decode
MythTV
noreply at mythtv.org
Sun Jul 29 21:19:28 UTC 2018
#13233: Android Hardware accelerated decode
-----------------------------+-------------------------------
Reporter: Peter Bennett | Owner: Peter Bennett
Type: Developer Task | Status: assigned
Priority: minor | Milestone: unknown
Component: Ports - Android | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
-----------------------------+-------------------------------
Comment (by Peter Bennett <pbennett@…>):
In [changeset:"8e34e6e558859b9b5efc3ab43cd6e9716496bcad/mythtv"
8e34e6e55/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="8e34e6e558859b9b5efc3ab43cd6e9716496bcad"
Playback: Prerequisites to support for mediacodec
Mediacodec is used for hardware decoding on android. It works differently
from other decoding methods and needs several changes to support the
different flow.
1. On NVidia Shield, mediacodec provides built in deinterlace with frame
doubling.
This causes a discrepancy between reported framerate and actual
framerate.
Changes are made to support detecting and using the double framerate.
2. Up to now there was always a maximum of one frame released after a
packet
was provided to the decoder. Mediacodec releases many frames at a time,
typically
15 frames at once after 15 or more packets were sent. Many changes are
needed to support this.
3. In conjunction with the previous change, FFmpeg recommend that the code
always
read all frames available before sending the next packet. Previously it
would
read one frame before sending the next packet. Change to support this.
5. The existing code uses arcane methods to calculate frame timing from
the
packet sent. This causes havoc with mediacodec because of the multiple
frames
per packet and the frame doubling. FFmpeg alreay does this work for you,
correctly.
Change to use ffmpeg frame timing for ffmeg and mediacodec. Other
decoding methods
probably should change as well, but that is not done here.
7. When skipping forward or back with doubled framerate from mediacodec,
one frame
is presented that is a combination of old and new frame. Change to drop
the first
4 frames after skipping with doubled framerate to avoid this.
8. With mediacodec there is sometimes a situation where the decoder will
neither
accept a packet nor provide a frame. According to FFmpeg documentation
this will
never occur, but it does occur. A short wait and retry in this case
solves the problem.
Refs #13233
}}}
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13233#comment:23>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list