mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
codecparsers: vc1: fix aspect ratio calculation.
ASPECT_HORIZ_SIZE and ASPECT_VERT_SIZE are syntax elements that hold binary encodings of sizes ranging from 1 to 256. Thus, the calculated pixel-aspect-ratio was off by one. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com> https://bugzilla.gnome.org/show_bug.cgi?id=683858
This commit is contained in:
parent
2c3eaf527b
commit
0b2dd2e723
1 changed files with 5 additions and 2 deletions
|
@ -837,10 +837,13 @@ parse_sequence_header_advanced (GstVC1SeqHdr * seqhdr, GstBitReader * br)
|
|||
READ_UINT8 (br, advanced->aspect_ratio, 4);
|
||||
|
||||
if (advanced->aspect_ratio == 15) {
|
||||
/* Aspect Width (6.1.14.3.2) and Aspect Height (6.1.14.3.3)
|
||||
* syntax elements hold a binary encoding of sizes ranging
|
||||
* from 1 to 256 */
|
||||
READ_UINT8 (br, advanced->aspect_horiz_size, 8);
|
||||
READ_UINT8 (br, advanced->aspect_vert_size, 8);
|
||||
advanced->par_n = advanced->aspect_horiz_size;
|
||||
advanced->par_d = advanced->aspect_vert_size;
|
||||
advanced->par_n = 1 + advanced->aspect_horiz_size;
|
||||
advanced->par_d = 1 + advanced->aspect_vert_size;
|
||||
} else {
|
||||
advanced->par_n = aspect_ratios[advanced->aspect_ratio].par_n;
|
||||
advanced->par_d = aspect_ratios[advanced->aspect_ratio].par_d;
|
||||
|
|
Loading…
Reference in a new issue