Browse Source

packetizer: h26x: check chroma_idc range

refs #29054
pull/188/head
François Cartegnie 1 year ago
committed by Thomas Guillem
parent
commit
4b1df08396
  1. 7
      modules/packetizer/h26x_nal_common.h

7
modules/packetizer/h26x_nal_common.h

@ -20,6 +20,7 @@
#ifndef H26X_NAL_COMMON_H
# define H26X_NAL_COMMON_H
#include <assert.h>
#include <vlc_common.h>
#include "iso_color_tables.h"
@ -55,6 +56,12 @@ bool h26x_get_picture_size( nal_u2_t chroma_format_idc,
w = vw = pic_width_in_luma_samples;
h = vh = pic_height_in_luma_samples;
if( chroma_format_idc > 3 )
{
assert( chroma_format_idc <= 3 );
return false;
}
static const uint8_t SubWidthHeight[4][2] = { {1, 1}, {2, 2}, {2, 1}, {1, 1} };
ox = conf_win->left_offset * SubWidthHeight[chroma_format_idc][0];

Loading…
Cancel
Save