View Issue Details

IDProjectCategoryView StatusLast Update
0000310JVT JM H.264/AVC reference softwareencoder and decoderpublic2012-07-19 10:58
ReporterVittorio Giovara Assigned ToKarsten Suehring  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionJM 18.3 
Fixed in VersionJM 18.4 
Summary0000310: Level 5.2 Support
DescriptionAccording to the specification H264/AVC, 6.0 revision, it is possible to support level 5.2. The attached patch addresses this issue.
TagsNo tags attached.

Activities

Vittorio Giovara

2012-07-04 16:16

reporter  

level52.patch (6,265 bytes)   
Index: JM/lencod/src/conformance.c
===================================================================
--- JM/lencod/src/conformance.c	(revision 21)
+++ JM/lencod/src/conformance.c	(working copy)
@@ -19,17 +19,17 @@
 // Max Frame Size Limit
 // Level Limit                          -  -  -  -  -  -  -  -  -  1b  10  11   12   13   -  -  -  -  -  -  20   21   22    -  -  -  -  -  -  -
 static const unsigned int  MaxFs [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 99, 396, 396, 396, 0, 0, 0, 0, 0, 0, 396, 792, 1620, 0, 0, 0, 0, 0, 0, 0,  
-//                        30    31    32    -  -  -  -  -  -  -  40    41    42    -  -  -  -  -  -  -  50     51
-                          1620, 3600, 5120, 0, 0, 0, 0, 0, 0, 0, 8192, 8192, 8704, 0, 0, 0, 0, 0, 0, 0, 22080, 36864 };
+//                        30    31    32    -  -  -  -  -  -  -  40    41    42    -  -  -  -  -  -  -  50     51    52
+                          1620, 3600, 5120, 0, 0, 0, 0, 0, 0, 0, 8192, 8192, 8704, 0, 0, 0, 0, 0, 0, 0, 22080, 36864, 36864 };
 static const unsigned int  MinCR [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0,  2,  2,   2,   2,   2, 0, 0, 0, 0, 0, 0,   2,   2,   2, 0, 0, 0, 0, 0, 0, 0,  
-                             2,    4,    4, 0, 0, 0, 0, 0, 0, 0,    4,    2,    2, 0, 0, 0, 0, 0, 0, 0,     2,     2 };
+                             2,    4,    4, 0, 0, 0, 0, 0, 0, 0,    4,    2,    2, 0, 0, 0, 0, 0, 0, 0,     2,     2,     2 };
 static const unsigned int  MaxBR [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,128, 192, 384, 768, 0, 0, 0, 0, 0, 0,2000,4000,4000, 0, 0, 0, 0, 0, 0, 0,  
-                         10000,14000,20000, 0, 0, 0, 0, 0, 0, 0,20000,50000,50000, 0, 0, 0, 0, 0, 0, 0,135000,240000 };
+                         10000,14000,20000, 0, 0, 0, 0, 0, 0, 0,20000,50000,50000, 0, 0, 0, 0, 0, 0, 0,135000, 240000, 240000 };
 static const unsigned int  MaxCPB[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0,175,350, 500,1000,2000, 0, 0, 0, 0, 0, 0,2000,4000,4000, 0, 0, 0, 0, 0, 0, 0,  
-                         10000,14000,20000, 0, 0, 0, 0, 0, 0, 0,25000,62500,62500, 0, 0, 0, 0, 0, 0, 0,135000,240000 };
+                         10000,14000,20000, 0, 0, 0, 0, 0, 0, 0,25000,62500,62500, 0, 0, 0, 0, 0, 0, 0,135000, 240000, 240000 };
 // Max macroblock processing rate
 static const unsigned int MaxMBPS[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1485, 1485, 3000, 6000, 11880, 0, 0, 0, 0, 0, 0, 11880, 19800, 20250, 0, 0, 0, 0, 0, 0, 0,  
-                          40500, 108000, 216000, 0, 0, 0, 0, 0, 0, 0, 245760, 245760, 522240, 0, 0, 0, 0, 0, 0, 0, 589824, 983040 };
+                          40500, 108000, 216000, 0, 0, 0, 0, 0, 0, 0, 245760, 245760, 522240, 0, 0, 0, 0, 0, 0, 0, 589824, 983040, 2073600 };
 // Vertical MV Limits (integer/halfpel/quarterpel)
 // Currently only Integer Pel restrictions are used,
 // since the way values are specified
@@ -68,7 +68,7 @@
 {
   unsigned int ret;
 
-  if ( (levelIdc < 9) || (levelIdc > 51))
+  if ( (levelIdc < 9) || (levelIdc > 52))
     error ("getMaxFs: Unknown LevelIdc", 500);
 
   // in Baseline, Main and Extended: Level 1b is specified with LevelIdc==11 and constrained_set3_flag == 1
@@ -91,7 +91,7 @@
 {
   unsigned int ret;
 
-  if ( (levelIdc < 9) || (levelIdc > 51))
+  if ( (levelIdc < 9) || (levelIdc > 52))
     error ("getMaxMBPS: Unknown LevelIdc", 500);
 
   // in Baseline, Main and Extended: Level 1b is specified with LevelIdc==11 and constrained_set3_flag == 1
@@ -114,7 +114,7 @@
 {
   unsigned int ret;
 
-  if ( (levelIdc < 9) || (levelIdc > 51))
+  if ( (levelIdc < 9) || (levelIdc > 52))
     error ("getMinCR: Unknown LevelIdc", 500);
 
   // in Baseline, Main and Extended: Level 1b is specified with LevelIdc==11 and constrained_set3_flag == 1
@@ -137,7 +137,7 @@
 {
   unsigned int ret;
 
-  if ( (levelIdc < 9) || (levelIdc > 51))
+  if ( (levelIdc < 9) || (levelIdc > 52))
     error ("getMaxBR: Unknown LevelIdc", 500);
 
   // in Baseline, Main and Extended: Level 1b is specified with LevelIdc==11 and constrained_set3_flag == 1
@@ -160,7 +160,7 @@
 {
   unsigned int ret;
 
-  if ( (levelIdc < 9) || (levelIdc > 51))
+  if ( (levelIdc < 9) || (levelIdc > 52))
     error ("getMaxCPB: Unknown LevelIdc", 500);
 
   // in Baseline, Main and Extended: Level 1b is specified with LevelIdc==11 and constrained_set3_flag == 1
Index: JM/lencod/src/parset.c
===================================================================
--- JM/lencod/src/parset.c	(revision 21)
+++ JM/lencod/src/parset.c	(working copy)
@@ -1333,6 +1333,9 @@
   case 51:
     size = 70778880;
     break;
+  case 52:
+    size = 70778880;
+    break;
   default:
     error ("undefined level", 500);
     break;
Index: JM/lencod/src/mbuffer.c
===================================================================
--- JM/lencod/src/mbuffer.c	(revision 21)
+++ JM/lencod/src/mbuffer.c	(working copy)
@@ -156,6 +156,9 @@
   case 51:
     size = 70778880;
     break;
+  case 52:
+    size = 70778880;
+    break;
   default:
     error ("undefined level", 500);
     break;
Index: JM/lencod/src/lencod.c
===================================================================
--- JM/lencod/src/lencod.c	(revision 21)
+++ JM/lencod/src/lencod.c	(working copy)
@@ -2260,9 +2260,12 @@
   case 51:
     p_Vid->LevelIndex=16;
     break;
+  case 52:
+    p_Vid->LevelIndex=17;
+    break;
   default:
-    fprintf ( stderr, "Warning: unknown LevelIDC, using maximum level 5.1 \n" );
-    p_Vid->LevelIndex=16;
+    fprintf ( stderr, "Warning: unknown LevelIDC, using maximum level 5.2 \n" );
+    p_Vid->LevelIndex=17;
     break;
   }
 }
Index: JM/ldecod/src/parset.c
===================================================================
--- JM/ldecod/src/parset.c	(revision 21)
+++ JM/ldecod/src/parset.c	(working copy)
@@ -1564,6 +1565,9 @@
   case 51:
     size = 70778880;
     break;
+  case 52:
+    size = 70778880;
+    break;
   default:
     error ("undefined level", 500);
     break;
Index: JM/ldecod/src/mbuffer.c
===================================================================
--- JM/ldecod/src/mbuffer.c	(revision 21)
+++ JM/ldecod/src/mbuffer.c	(working copy)
@@ -154,6 +154,9 @@
   case 51:
     size = 70778880;
     break;
+  case 52:
+    size = 70778880;
+    break;
   default:
     error ("undefined level", 500);
     break;
level52.patch (6,265 bytes)   

Karsten Suehring

2012-07-19 10:58

administrator   ~0000542

The patch has been applied to the current development branch for inclusion into JM 18.4

Issue History

Date Modified Username Field Change
2012-07-04 16:16 Vittorio Giovara New Issue
2012-07-04 16:16 Vittorio Giovara File Added: level52.patch
2012-07-19 10:58 Karsten Suehring Note Added: 0000542
2012-07-19 10:58 Karsten Suehring Status new => resolved
2012-07-19 10:58 Karsten Suehring Fixed in Version => JM 18.4
2012-07-19 10:58 Karsten Suehring Resolution open => fixed
2012-07-19 10:58 Karsten Suehring Assigned To => Karsten Suehring