mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-30 04:47:37 +08:00
more aspect ratios added in one of the ammendments
Originally committed as revision 12282 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -7008,7 +7008,7 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps){
|
|||||||
if( aspect_ratio_idc == EXTENDED_SAR ) {
|
if( aspect_ratio_idc == EXTENDED_SAR ) {
|
||||||
sps->sar.num= get_bits(&s->gb, 16);
|
sps->sar.num= get_bits(&s->gb, 16);
|
||||||
sps->sar.den= get_bits(&s->gb, 16);
|
sps->sar.den= get_bits(&s->gb, 16);
|
||||||
}else if(aspect_ratio_idc < 14){
|
}else if(aspect_ratio_idc < sizeof(pixel_aspect)/sizeof(*pixel_aspect)){
|
||||||
sps->sar= pixel_aspect[aspect_ratio_idc];
|
sps->sar= pixel_aspect[aspect_ratio_idc];
|
||||||
}else{
|
}else{
|
||||||
av_log(h->s.avctx, AV_LOG_ERROR, "illegal aspect ratio\n");
|
av_log(h->s.avctx, AV_LOG_ERROR, "illegal aspect ratio\n");
|
||||||
|
@ -54,7 +54,7 @@ NAL_SPS_EXT,
|
|||||||
NAL_AUXILIARY_SLICE=19
|
NAL_AUXILIARY_SLICE=19
|
||||||
};
|
};
|
||||||
|
|
||||||
static const AVRational pixel_aspect[14]={
|
static const AVRational pixel_aspect[17]={
|
||||||
{0, 1},
|
{0, 1},
|
||||||
{1, 1},
|
{1, 1},
|
||||||
{12, 11},
|
{12, 11},
|
||||||
@ -69,6 +69,9 @@ static const AVRational pixel_aspect[14]={
|
|||||||
{15, 11},
|
{15, 11},
|
||||||
{64, 33},
|
{64, 33},
|
||||||
{160,99},
|
{160,99},
|
||||||
|
{4, 3},
|
||||||
|
{3, 2},
|
||||||
|
{2, 1},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t golomb_to_pict_type[5]=
|
static const uint8_t golomb_to_pict_type[5]=
|
||||||
|
Reference in New Issue
Block a user