[請問] h264 decode破圖

作者: wong0101 (wong0101)   2017-04-12 19:41:15
想請教版上的大大
我在android上面decode rtp封包傳來的 h264 影片,
發現會有破圖的現象, 我把start code後面的幾個byte log下來,
發現好像是有一些規律, 可是網路可以查到的資料大部分都是說start code後面那一個
byte是什麼type的nalu, 還是不太清楚裡面的資料是怎麼編碼的
雖然破圖的原因有很多, 但還是想請教版對編碼較熟的大大,
這段log是否可以看出來是有順序不對的問題, 又或者是有什麼樣的問題存在?
先感謝各位了, log如下
(紅色字體出現時, 就會開始破圖) (但nalu type為67時卻不一定會破圖)
found somethings resembling an h.264/mpeg syncword at offset 18332
00000001 21 fd e8 07 5e
found somethings resembling an h.264/mpeg syncword at offset 18400
00000001 21 fe f0 07 5e
found somethings resembling an h.264/mpeg syncword at offset 18520
00000001 21 ff f8 07 5e
found somethings resembling an h.264/mpeg syncword at offset 18544
00000001 21 e0 00 07 5e
found somethings resembling an h.264/mpeg syncword at offset 18792
00000001 21 e1 08 07 5e
found somethings resembling an h.264/mpeg syncword at offset 18760
00000001 21 e2 10 07 5f
syncword at offset 0, 00000001 67 42 e0 1f ab
syncword at offset 0, 00000001 21 e1 08 0d 78
syncword at offset 0, 00000001 21 e2 10 07 5e
syncword at offset 0, 00000001 21 e3 18 07 5e
syncword at offset 0, 00000001 21 e4 20 07 5e
syncword at offset 0, 00000001 21 e5 28 07 5e
found somethings resembling an h.264/mpeg syncword at offset 7432
00000001 21 e6 30 07 5e
found somethings resembling an h.264/mpeg syncword at offset 19124
00000001 21 e7 38 07 5e
作者: kevingwn (如雲如風的人生)   2017-04-12 22:16:00
用"found something..."去估狗到的是ESQueue.cpp第267行這邊應該是說你的startcode不在data的起始
作者: wong0101 (wong0101)   2017-04-20 21:14:00
K大 不太懂你的意思,可否在說明一下~thx我看他會從start code後面才開始decode?
作者: kevingwn (如雲如風的人生)   2017-04-21 12:44:00
你的log可以在ESQueue.cpp這個檔案裡找到,對照log之前的程式碼是說在你餵入appendData()的參數data當中不是開頭的位置找到startcode,對照之後的程式碼它會忽略掉start-code前的資料,所以有可能破圖

Links booklink

Contact Us: admin [ a t ] ucptt.com