viddec3test: Set correct padding width height for MPEG4
authorRamprasad N <x0038811@ti.com>
Wed, 26 Jul 2017 04:39:46 +0000 (10:09 +0530)
committerKarthik Ramanan <a0393906@ti.com>
Fri, 28 Jul 2017 10:36:42 +0000 (16:06 +0530)
Signed-off-by: Ramprasad N <x0038811@ti.com>
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
viddec3test.c

index 8c57ed92fd6333ea185ed51bd559491c354a4a99..a187c40e071602f4ef61344d15f475327c9acfb1 100644 (file)
@@ -33,6 +33,8 @@
 #define PADX  32
 /* Padding for height as per Codec requirement (for h264)*/
 #define PADY  24
+/* Padding for height as per Codec requirement (for MPEG4)*/
+#define PADY_MPEG4  32
 /* omap drm device handle */
 struct omap_device *dev = NULL;
 
@@ -169,8 +171,10 @@ decoder_open(int argc, char **argv)
                if (decoder->demux->cc->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
                        padded_width = width;
                        padded_height= height;
-               }
-               else {
+               } else if (decoder->demux->cc->codec_id == AV_CODEC_ID_MPEG4) {
+                       padded_width  = ALIGN2 (width + PADX, 7);
+                       padded_height = height + PADY_MPEG4;
+               } else {
                        padded_width  = ALIGN2 (width + (2*PADX), 7);
                        padded_height = height + 4*PADY;
                }