[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-datatype-cvs
Subject: [Datatype-cvs] mp4/video/renderer mp4vdfmt.cpp, 1.18.8.9.2.30,
From: joeli () helixcommunity ! org
Date: 2011-10-27 10:18:22
[Download RAW message or body]
Update of /cvsroot/datatype/mp4/video/renderer
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv20366
Modified Files:
Tag: hxclient_3_6_1_atlas
mp4vdfmt.cpp mp4vdec.cpp
Log Message:
Modified by: joeli@real.com
Date: 10/17/2011
Project: RealPlayer for Android Smartphones
Synopsis: Enhance the frame width and height of H264 decoder parameter
For some h264 contents, due to missing opaque data or having wrong opaque data.
The frame size can ¡ ¯t be extracted from the opaque data.
While Qualcom 8060 chipset allocate the output port definition with default size \
1920x1080( while some times, its 1920x1084, 1920x1088) If we initial the mof with the \
default size, it will break the resolution checking of HW decoding(not more than \
1920x1080). So we used the tradition rule, get the framesize from streamheader or \
file header. And set it to decoder by PNStream_SetProperty. Then if decoder not agree \
it, then a port reconfig event will happened.
Files Added:
N/A
File Modified:
datatype/omx/video/decoder/COmxVideoDec.cpp
datatype/mp4/video/renderer/mp4vdec.cpp
datatype/mp4/video/renderer/mp4vdfmt.cpp
Image Size and Heap Use impact (Client -Only):
None
Platforms and Profiles Affected:
Platform: hxclient_3_6_1_atlas
Profile: helix-client-android-full
Distribution Libraries Affected:
None
Distribution library impact and planned action:
None
Index: mp4vdec.cpp
===================================================================
RCS file: /cvsroot/datatype/mp4/video/renderer/mp4vdec.cpp,v
retrieving revision 1.8.8.7.2.13
retrieving revision 1.8.8.7.2.14
diff -u -d -r1.8.8.7.2.13 -r1.8.8.7.2.14
--- mp4vdec.cpp 24 Jul 2011 00:54:53 -0000 1.8.8.7.2.13
+++ mp4vdec.cpp 27 Oct 2011 10:18:19 -0000 1.8.8.7.2.14
@@ -447,6 +447,7 @@
HX_FORMAT_IMAGE2 mofOut;
HXCODEC_INIT codecInit;
HX_RESULT retVal = HXR_OK;
+ UINT32 uHeight = 0,uWidth = 0;
if (SUCCEEDED(retVal))
{
@@ -481,6 +482,26 @@
retVal = m_pVideoFormat->GetStreamHeader(pHeader);
if (SUCCEEDED(retVal))
{
+ pHeader->GetPropertyULONG32("FrameWidth", uWidth);
+ pHeader->GetPropertyULONG32("FrameHeight", uHeight);
+ if(uWidth && uHeight)
+ {
+ mofOut.uiWidth = uWidth;
+ mofOut.uiHeight = uHeight;
+ }
+ else
+ {
+ pHeader->GetPropertyULONG32("Width", uWidth);
+ pHeader->GetPropertyULONG32("Height", uHeight);
+ if(uWidth && uHeight)
+ {
+ mofOut.uiWidth = uWidth;
+ mofOut.uiHeight = uHeight;
+ }
+ }
+ }
+ if (SUCCEEDED(retVal))
+ {
retVal = pHeader->GetPropertyCString("MimeType", pMimeType);
}
if (SUCCEEDED(retVal))
@@ -502,23 +523,34 @@
}
}
HX_RELEASE(pMimeType);
+ HX_RELEASE(pHeader);
}
+ else
#endif
- if((pMofIn->submoftag == 0x4d503456) || (pMofIn->submoftag == 0x4d504756))
{
IHXValues* pHeader = NULL;
- UINT32 uHeight = 0,uWidth = 0;
retVal = m_pVideoFormat->GetStreamHeader(pHeader);
if (SUCCEEDED(retVal))
{
- pHeader->GetPropertyULONG32("Width", uWidth);
- pHeader->GetPropertyULONG32("Height", uHeight);
+ pHeader->GetPropertyULONG32("FrameWidth", uWidth);
+ pHeader->GetPropertyULONG32("FrameHeight", uHeight);
if(uWidth && uHeight)
{
mofOut.uiWidth = uWidth;
mofOut.uiHeight = uHeight;
}
+ else
+ {
+ pHeader->GetPropertyULONG32("Width", uWidth);
+ pHeader->GetPropertyULONG32("Height", uHeight);
+ if(uWidth && uHeight)
+ {
+ mofOut.uiWidth = uWidth;
+ mofOut.uiHeight = uHeight;
+ }
+ }
}
+ HX_RELEASE(pHeader);
}
if ((m_pVideoFormat->GetBitstreamHeaderSize() > 0)&&
@@ -566,6 +598,11 @@
pStreamHdr->GetPropertyULONG32("FrameWidth", ulFrameWidth);
pStreamHdr->GetPropertyULONG32("FrameHeight", ulFrameHeight);
// If we have framewidth and frameheight, set them into the decoder
+ if(ulFrameWidth == 0 || ulFrameHeight == 0)
+ {
+ pStreamHdr->GetPropertyULONG32("Width", ulFrameWidth);
+ pStreamHdr->GetPropertyULONG32("Height", ulFrameHeight);
+ }
if (ulFrameWidth && ulFrameHeight)
{
m_pCodecLib->PNStream_SetProperty(m_pStream,
Index: mp4vdfmt.cpp
===================================================================
RCS file: /cvsroot/datatype/mp4/video/renderer/mp4vdfmt.cpp,v
retrieving revision 1.18.8.9.2.30
retrieving revision 1.18.8.9.2.31
diff -u -d -r1.18.8.9.2.30 -r1.18.8.9.2.31
--- mp4vdfmt.cpp 26 Oct 2011 16:07:16 -0000 1.18.8.9.2.30
+++ mp4vdfmt.cpp 27 Oct 2011 10:18:19 -0000 1.18.8.9.2.31
@@ -63,7 +63,7 @@
#define MAX_SUPPORTED_WIDTH 1280
#define MAX_SUPPORTED_HEIGHT 720
#define HW_MAX_SUPPORTED_WIDTH 1920
-#define HW_MAX_SUPPORTED_HEIGHT 1080
+#define HW_MAX_SUPPORTED_HEIGHT 1088
#define H264_EPS_FRAMES_ALLOWED_TO_SKIP 10
/****************************************************************************
@@ -257,6 +257,11 @@
UINT32 ulFrameHeight = 0;
m_pHeader->GetPropertyULONG32("FrameWidth", ulFrameWidth);
m_pHeader->GetPropertyULONG32("FrameHeight", ulFrameHeight);
+ if(ulFrameWidth == 0 || ulFrameHeight == 0)
+ {
+ m_pHeader->GetPropertyULONG32("Width", ulFrameWidth);
+ m_pHeader->GetPropertyULONG32("Height", ulFrameHeight);
+ }
CheckResolutionLimit(ulFrameWidth, HW_MAX_SUPPORTED_WIDTH, \
ulFrameHeight, HW_MAX_SUPPORTED_HEIGHT); }
#endif
_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic