9 Commits

Author SHA1 Message Date
philipel
6585f7087c Reland of Save width/height of SPS nalus and restore them on the first packet of an IDR. (patchset #1 id:1 of https://codereview.webrtc.org/2754543005/ )
Reason for revert:
fix

Original issue's description:
> Revert of Save width/height of SPS nalus and restore them on the first packet of an IDR. (patchset #6 id:100001 of https://codereview.webrtc.org/2750633003/ )
>
> Reason for revert:
> Breaks build bots.
>
> Original issue's description:
> > Save width/height of SPS nalus and restore them on the first packet of an IDR.
> >
> > It appears that for some H264 streams that the width/height is not set for
> > the first packet of the IDR but in the packet containing the SPS/PPS.
> >
> > BUG=chromium:698088, webrtc:7139
> >
> > Review-Url: https://codereview.webrtc.org/2750633003
> > Cr-Commit-Position: refs/heads/master@{#17239}
> > Committed: 620d75f5be
>
> TBR=stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:698088, webrtc:7139
>
> Review-Url: https://codereview.webrtc.org/2754543005
> Cr-Commit-Position: refs/heads/master@{#17250}
> Committed: be35a008ef

TBR=stefan@webrtc.org
BUG=chromium:698088, webrtc:7139

Review-Url: https://codereview.webrtc.org/2751843003
Cr-Commit-Position: refs/heads/master@{#17289}
2017-03-17 13:12:33 +00:00
philipel
be35a008ef Revert of Save width/height of SPS nalus and restore them on the first packet of an IDR. (patchset #6 id:100001 of https://codereview.webrtc.org/2750633003/ )
Reason for revert:
Breaks build bots.

Original issue's description:
> Save width/height of SPS nalus and restore them on the first packet of an IDR.
>
> It appears that for some H264 streams that the width/height is not set for
> the first packet of the IDR but in the packet containing the SPS/PPS.
>
> BUG=chromium:698088, webrtc:7139
>
> Review-Url: https://codereview.webrtc.org/2750633003
> Cr-Commit-Position: refs/heads/master@{#17239}
> Committed: 620d75f5be

TBR=stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:698088, webrtc:7139

Review-Url: https://codereview.webrtc.org/2754543005
Cr-Commit-Position: refs/heads/master@{#17250}
2017-03-15 14:13:17 +00:00
philipel
620d75f5be Save width/height of SPS nalus and restore them on the first packet of an IDR.
It appears that for some H264 streams that the width/height is not set for
the first packet of the IDR but in the packet containing the SPS/PPS.

BUG=chromium:698088, webrtc:7139

Review-Url: https://codereview.webrtc.org/2750633003
Cr-Commit-Position: refs/heads/master@{#17239}
2017-03-15 09:51:11 +00:00
johan
d2b092f38a Reland of H264SpsPpsTracker.InsertSpsPpsNalus() should accept Nalus with header.
Fixed memory leak in test case.

Original issue's description
> Revert of H264SpsPpsTracker.InsertSpsPpsNalus() should accept Nalus with header. (patchset #3 id:40001 of https://codereview.webrtc.org/2638933002/ )
>
> Reason for revert:
> Triggers leak on Linux memcheck (non-default trybot):
>
> Original issue's description:
> > H264SpsPpsTracker.InsertSpsPpsNalus() should accept Nalus with header.
> >
> > - Changed method name to clarify that entire Nalus are expected.
> > - Added unit test code.
> > - Adjusted InsetSpsPpsNalus() implementation to above requirement.
> >
> > BUG=webrtc:5948
> >
> > Review-Url: https://codereview.webrtc.org/2638933002
> > Cr-Commit-Position: refs/heads/master@{#16221}
> > Committed: f53d7374cf
>
> TBR=philipel@webrtc.org,sprang@webrtc.org,johan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5948
> Review-Url: https://codereview.webrtc.org/2649113003
> Cr-Commit-Position: refs/heads/master@{#16225}
> Committed: 914d49d0fd
>

BUG=webrtc:5948

Review-Url: https://codereview.webrtc.org/2651593004
Cr-Commit-Position: refs/heads/master@{#16235}
2017-01-24 10:38:17 +00:00
kjellander
914d49d0fd Revert of H264SpsPpsTracker.InsertSpsPpsNalus() should accept Nalus with header. (patchset #3 id:40001 of https://codereview.webrtc.org/2638933002/ )
Reason for revert:
Triggers leak on Linux memcheck (non-default trybot):

### BEGIN MEMORY TOOL REPORT (error hash=#0112A395AF2326BC#)
Command: ../Release/./modules_unittests --isolated-script-test-output=/b/s/w/ioUlJCnu/output.json --isolated-script-test-chartjson-output=/b/s/w/ioUlJCnu/chartjson-output.json --gtest_filter=-CommonFormats/AudioProcessingTest*
Leak_DefinitelyLost
45 bytes in 1 blocks are definitely lost in loss record 118 of 277
  operator new[](unsigned long) (m_replacemalloc/vg_replace_malloc.c:363)
  webrtc::video_coding::H264SpsPpsTracker::CopyAndFixBitstream(webrtc::VCMPacket*) (/b/s/w/irJgAGsR/out/Release/modules_unittests)
  webrtc::video_coding::TestH264SpsPpsTracker_SpsPpsOutOfBand_Test::TestBody() (/b/s/w/irJgAGsR/out/Release/modules_unittests)
Suppression (error hash=#0112A395AF2326BC#):
  For more info on using suppressions see http://dev.chromium.org/developers/tree-sheriffs/sheriff-details-chromium/memory-sheriff#TOC-Suppressing-memory-reports
{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   fun:_Zna*
   fun:_ZN6webrtc12video_coding17H264SpsPpsTracker19CopyAndFixBitstreamEPNS_9VCMPacketE
   fun:_ZN6webrtc12video_coding42TestH264SpsPpsTracker_SpsPpsOutOfBand_Test8TestBodyEv
}
### END MEMORY TOOL REPORT (error hash=#0112A395AF2326BC#)

Original issue's description:
> H264SpsPpsTracker.InsertSpsPpsNalus() should accept Nalus with header.
>
> - Changed method name to clarify that entire Nalus are expected.
> - Added unit test code.
> - Adjusted InsetSpsPpsNalus() implementation to above requirement.
>
> BUG=webrtc:5948
>
> Review-Url: https://codereview.webrtc.org/2638933002
> Cr-Commit-Position: refs/heads/master@{#16221}
> Committed: f53d7374cf

TBR=philipel@webrtc.org,sprang@webrtc.org,johan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5948

Review-Url: https://codereview.webrtc.org/2649113003
Cr-Commit-Position: refs/heads/master@{#16225}
2017-01-24 04:16:58 +00:00
johan
f53d7374cf H264SpsPpsTracker.InsertSpsPpsNalus() should accept Nalus with header.
- Changed method name to clarify that entire Nalus are expected.
- Added unit test code.
- Adjusted InsetSpsPpsNalus() implementation to above requirement.

BUG=webrtc:5948

Review-Url: https://codereview.webrtc.org/2638933002
Cr-Commit-Position: refs/heads/master@{#16221}
2017-01-23 17:29:33 +00:00
philipel
022b54e86a Wire up H264 fmtp sprop-parameter-sets with H264SpsPpsTracker.
To avoid making this CL large unittests will be added in a followup CL.

BUG=webrtc:5948

patch from issue 2570073002 at patchset 20001 (http://crrev.com/2570073002#ps20001)

Review-Url: https://codereview.webrtc.org/2565173009
Cr-Commit-Position: refs/heads/master@{#15710}
2016-12-20 12:15:59 +00:00
philipel
a75d12d09d H264SpsPpsTracker now return PacketAction on CopyAndFixBitstream.
To differentiate between when a packet should be dropped or when a keyframe
is missing its SPS and/or SPS CopyAndFixBitstream now returns:
 - kInsert, the packet should be inserted into the PacketBuffer.
 - kDrop, the packet should be dropped.
 - kRequestKeyframe, a keyframe should be requested.

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2477343002
Cr-Commit-Position: refs/heads/master@{#14948}
2016-11-07 13:11:44 +00:00
philipel
34852cf707 H264SpsPpsTracker class which keep tracks of SPS/PPS.
The H264SpsPpsTracker class:
 - Keeps track of all received SPS/PPS.
 - Decides whether a packet should be inserted into the PacketBuffer or not.
   - Don't insert if this packet only contains SPS and/or PPS.
   - Don't insert if this is the first packet of and IDR and we have not
     received the required SPS/PPS.
 - Insert start codes, and in the case of the first packet of an IDR prepend
   the bitstream with the given SPS/PPS for this IDR.

BUG=webrtc:5514

Review-Url: https://codereview.webrtc.org/2466993003
Cr-Commit-Position: refs/heads/master@{#14906}
2016-11-03 11:03:06 +00:00