mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
codecparsers: h264: fix derivation of default scaling lists.
When useDefaultScalingMatrixFlag is computed to be 1 while parsing scaling_list(), then the scaling list shall be inferred to be equal to the default list (7.4.2.1.1.1). That default list is really one of Default_4x4_{Intra,Inter} or Default_8x8_{Intra,Inter} and not one from fall-back rule sets A or B. This fixes parsing for FRExt1_Panasonic_D, FRExt2_Panasonic_C, FRExt3_Panasonic_E and FRExt4_Panasonic_B. https://bugzilla.gnome.org/show_bug.cgi?id=724518 Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
241c3acad5
commit
1b9e8a25a0
1 changed files with 10 additions and 1 deletions
|
@ -364,6 +364,14 @@ gst_h264_parser_parse_scaling_list (NalReader * nr,
|
|||
{
|
||||
guint i;
|
||||
|
||||
static const guint8 *default_lists[12] = {
|
||||
default_4x4_intra, default_4x4_intra, default_4x4_intra,
|
||||
default_4x4_inter, default_4x4_inter, default_4x4_inter,
|
||||
default_8x8_intra, default_8x8_inter,
|
||||
default_8x8_intra, default_8x8_inter,
|
||||
default_8x8_intra, default_8x8_inter
|
||||
};
|
||||
|
||||
GST_DEBUG ("parsing scaling lists");
|
||||
|
||||
for (i = 0; i < 12; i++) {
|
||||
|
@ -397,7 +405,8 @@ gst_h264_parser_parse_scaling_list (NalReader * nr,
|
|||
next_scale = (last_scale + delta_scale) & 0xff;
|
||||
}
|
||||
if (j == 0 && next_scale == 0) {
|
||||
use_default = TRUE;
|
||||
/* Use default scaling lists (7.4.2.1.1.1) */
|
||||
memcpy (scaling_list, default_lists[i], size);
|
||||
break;
|
||||
}
|
||||
last_scale = scaling_list[j] =
|
||||
|
|
Loading…
Reference in a new issue