changeset 6429:3c67363d6fa0 libavcodec

more aspect ratios added in one of the ammendments
author lorenm
date Sat, 01 Mar 2008 01:58:25 +0000
parents 1d35fe8cd53c
children de7502093922
files h264.c h264data.h
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Fri Feb 29 08:01:01 2008 +0000
+++ b/h264.c	Sat Mar 01 01:58:25 2008 +0000
@@ -7008,7 +7008,7 @@
         if( aspect_ratio_idc == EXTENDED_SAR ) {
             sps->sar.num= 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];
         }else{
             av_log(h->s.avctx, AV_LOG_ERROR, "illegal aspect ratio\n");
--- a/h264data.h	Fri Feb 29 08:01:01 2008 +0000
+++ b/h264data.h	Sat Mar 01 01:58:25 2008 +0000
@@ -54,7 +54,7 @@
 NAL_AUXILIARY_SLICE=19
 };
 
-static const AVRational pixel_aspect[14]={
+static const AVRational pixel_aspect[17]={
  {0, 1},
  {1, 1},
  {12, 11},
@@ -69,6 +69,9 @@
  {15, 11},
  {64, 33},
  {160,99},
+ {4, 3},
+ {3, 2},
+ {2, 1},
 };
 
 static const uint8_t golomb_to_pict_type[5]=