(1) Audio and video: Decoding H264 file process rendering and getting the decoded source data YUV Complete Demo

With the advent of 5G, the short video industry is becoming more and more popular. Audio and video technology has also become a hot spot, and I am going to write an audio and video series:
(1) Audio and video: decoding H264 file process rendering and getting the decoded source data YUV complete demo]
(2) Audio and video: MediaCodec encoding desktop information complete demo Further understand H264
(3) Audio and video: analyze H264 SPS to further understand H264

Well, let’s start with the article: (1) Audio and video: decoding H264 file process rendering and getting the decoded source data YUV complete demo

overview

  本博文讲解H264文件通过MediaCodec硬解码流程,解码后的处理:渲染和获取原始数据YUV。获取到的原始数据用7YUV工具查看出现绿色和紫色条的原因以及处理方式。

General flowchart: General flow chart
green and purple bars appear between frames:

Green and purple bars appearing between the second and third frames

MediaCodec decoding process

数据进入MediaCodec和出MediaCodec流程:

dequeueinputBuffer (obtain a buffer that can be filled with encoded data from the Input cache) —> queueInputBuffer (send the buffer that has been filled with data back to the codec, and notify the dsp to decode) —> dequeueO

Guess you like

Origin blog.csdn.net/weixin_43911199/article/details/126189034