how to decode h.264 slice mode stream with type-9 NALs on iOS

时光怂恿深爱的人放手 提交于 2019-12-13 03:34:52

问题


The input raw bitstream has type 9 NALs (AU delimiter).

There are multiple NALs of type 5 or 1 between NAL type 9. for ex: {NAL-9, NAL-5, NAL-5, NAL-9, NAL-1, NAL-1, NAL-9, NAL-1, NAL-1 ....}. I believe the encoder used slice mode (raw stream is from windows h.264 encoder which has slice mode enabled via low latency flag).

How do i feed such stream to iOS?

My guess: put all NALs between two NAL-9 into one buffer, removed NAL-9, and send those buffers to HW decoder.

In my example, buffers going to decoder will look like : {NAL-5, NAL-5}, {NAL-1, NAL-1}, {NAL-1, NAL-1}. The output result shows that decode happens but with lot of green artifacts which makes me think that there is something missing in the above approach.

来源:https://stackoverflow.com/questions/50886905/how-to-decode-h-264-slice-mode-stream-with-type-9-nals-on-ios

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!