[Bug 749253] New: H263parse CPFMT read error issue.
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue May 12 01:22:07 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=749253
Bug ID: 749253
Summary: H263parse CPFMT read error issue.
Classification: Platform
Product: GStreamer
Version: 1.4.5
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-bad
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: lyon.wang at freescale.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created attachment 303243
--> https://bugzilla.gnome.org/attachment.cgi?id=303243&action=edit
mkv stream with h263 video
When we played a encoded H.263 video clip (see attached file) and failed to
play and h263parse reported "corrupted CPFMT" and failed to parse the header.
We checked this issue, and it turns out there is no CPFMT area in this h263
video (also attached the h263 raw video), and it is wrongly read this area.
1. In H263 spec, for CPFMT, it said:
A fixed length codeword of 23 bits that is present only if the use of a custom
picture format is signalled in PLUSPTYPE and UFEP is '001'.
So, only when source format is custom picture format (format==6), then CPFMT
can be read.
2. When checking the CPFMT reading, we also found that the width and height
calculation is not correct.
According to spec,
The 9 bits width info and 9 bits height info should be used as:
Picture Width Indication: Range [0, ... , 511]; Number of pixels per line =
(PWI + 1) * 4
Picture Height Indication: Range [1, ... , 288]; Number of lines = PHI * 4.
*/
The prevoius calculate method is not correctly.
params->width = (((cpfmt >> 10) & 0x1f) + 1) * 4;
params->height = ((cpfmt & 0x1f) + 1) * 4;
should be:
params->width = (((cpfmt >> 10) & 0x1ff) + 1) * 4;
params->height = (cpfmt & 0x1ff) * 4;
Please see attached patch for the fix
Thanks
Lyon
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list