5 Commits

Author SHA1 Message Date
Tom Finegan
0c0ecd0f24 vpxpes_parser: Add start code emulation prevention support.
Remove bytes inserted to avoid start code emulation. Operates on:
- PES optional header
- BCMV header
- payloads.

Transforms the following byte sequences as noted (left converts to
right):
  0x00 0x00 0x03 0x01  =>  0x00 0x00 0x01
  0x00 0x00 0x03 0x03  =>  0x00 0x00 0x03

Change-Id: I09ae2d5bf03dfc1ade785ee89a773509eca8330c
2016-08-11 08:45:31 -07:00
Tom Finegan
6cf0a0f400 vpxpes_parser: Store frame payloads.
libwebm_util:
- Add 90khz -> nanosecond conversion.

vpxpes_parser:
- Get rid of VpxPesParser::VpxFrame and use VideoFrame.
- Store/Accumulate (when neccessary) PES payloads in
  VideoFrames.
- Change type of size constants from int to size_t.
- Return offset accounting for origin from FindStartCode().
- Check all PTS marker bits (instead of checking the second
  marker twice).

video_frame:
- Add nanosecond_pts mutator.

webm2pes:
- Write DTS/PTS presence flag correctly when PTS is not
  present.

Change-Id: I10f16cd03bb3a51205a25331527ddceb3769ba03
2016-08-08 11:14:03 -07:00
Tom Finegan
4b735452bb webm2pes: Add start code emulation prevention.
- Make start codes reliable for VPx in PES.
- Stop setting the PES size field and stop splitting packets when
  larger than UINT16_MAX (always set 0; rely on start codes to find
  packet boundaries).

Change-Id: I402e91c26562e930f61543ca59223b83cc92be29
2016-06-02 17:05:07 -07:00
Tom Finegan
22b0845686 webmts: Fix implicit conversion warnings.
Fix warnings exposed by addition of -Wshorten-64-32 compiler flag
in webmts sources.

Change-Id: I3104e7be2bf991d7e108b652857ecca8e82c5ef9
2016-04-08 10:44:35 -07:00
Tom Finegan
c5b76d8d11 Extract PES parser from WebM2Pes tests.
Change-Id: I6c81255635a65337bdb701119a3814801864469d
2016-03-11 14:12:57 -08:00