#10666: [Android] MediaCodec h264 decoder is much slower than native h264
decoder
-------------------------------------+-----------------------------------
Reporter: bubbleguuum | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: avcodec
Version: unspecified | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-----------------------------------
Comment (by quinkblack):
Firstly, decoding to Surface is more efficient, e.g.,
{{{
ffmpeg -benchmark -hwaccel mediacodec -init_hw_device
mediacodec=mc,create_window=1 -t 60 -i /sdcard/Movies/bunny.mp4 -an -f
null -
frame= 1800 fps=191 q=-0.0 Lsize=N/A time=00:01:00.03 bitrate=N/A
speed=6.37x
bench: utime=4.116s stime=5.333s rtime=9.553s
}}}
Decoding to buffer is slow (not much overhead with my device, but it can
be dramatically slow on some devcie)
{{{
ffmpeg -benchmark -hwaccel mediacodec -t 60 -i /sdcard/Movies/bunny.mp4
-an -f null -
frame= 1800 fps=152 q=-0.0 Lsize=N/A time=00:01:00.03 bitrate=N/A
speed=5.06x speed=2.01x
bench: utime=7.850s stime=6.942s rtime=11.905s
}}}
Secondly, H.264 doesn't take much CPU to decoding. So with 8 CPU cores,
software decoder can get a higher FPS, at the cost of high power
consumption and device heating.
H.265 requires higher computational power, so it's easy for hardware
decoder to overtake software decoder.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10666#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".