-
Notifications
You must be signed in to change notification settings - Fork 460
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix your commits to make CI 100% pass.
MSDK_CHECK_ERROR(m_bInited, false, MFX_ERR_NOT_INITIALIZED); | ||
MSDK_CHECK_POINTER(pSurface, MFX_ERR_NULL_PTR); | ||
|
||
mfxFrameInfo &pInfo = pSurface->Info; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines looks to be identical. Are line feeds the same? Are there tabs/space difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you, please, make this change first in the series, not the last one. This will simplify review of other changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change and 3 next ones don't compile separately. Each commit should lead to compilable state otherwise we will have issues with potential bisects.
04fdf86
to
0a96bd3
Compare
@@ -71,11 +71,12 @@ mfxStatus CopyBitstream2(mfxBitstream *dest, mfxBitstream *src) | |||
CSmplYUVReader::CSmplYUVReader() | |||
{ | |||
m_bInited = false; | |||
m_ColorFormat = MFX_FOURCC_YV12; | |||
shouldShiftP010High = false; | |||
m_ColorFormat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, assign on a single line.
@@ -86,14 +87,21 @@ mfxStatus CSmplYUVReader::Init(std::list<msdk_string> inputs, mfxU32 ColorFormat | |||
MFX_FOURCC_RGB4 != ColorFormat && | |||
MFX_FOURCC_BGR4 != ColorFormat && | |||
MFX_FOURCC_P010 != ColorFormat && | |||
MFX_FOURCC_P210 != ColorFormat) | |||
MFX_FOURCC_P210 != ColorFormat && | |||
MFX_FOURCC_AYUV != ColorFormat && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alignment is wrong
{ | ||
return MFX_ERR_MORE_DATA; | ||
} | ||
} | ||
break; | ||
default: | ||
case MFX_FOURCC_AYUV: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alignment is wrong
@@ -912,9 +914,10 @@ mfxStatus CDecodingPipeline::InitVppParams() | |||
} | |||
|
|||
// P010 video surfaces should be shifted | |||
if (m_mfxVppVideoParams.vpp.Out.FourCC == MFX_FOURCC_P010 && m_memType != SYSTEM_MEMORY) | |||
if ((m_mfxVppVideoParams.vpp.Out.FourCC == MFX_FOURCC_P010 || m_mfxVppVideoParams.vpp.Out.FourCC == MFX_FOURCC_Y210) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Y210 is not covered by version check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still not resolved
MSDK_ZERO_MEMORY(VppRequest[0]); | ||
MSDK_ZERO_MEMORY(VppRequest[1]); | ||
|
||
sts = m_pmfxDEC->Query(&m_mfxVideoParams, &m_mfxVideoParams); | ||
MSDK_IGNORE_MFX_STS(sts, MFX_WRN_INCOMPATIBLE_VIDEO_PARAM); | ||
MSDK_CHECK_STATUS(sts, "m_pmfxDEC->Query failed"); | ||
|
||
// Workaround for VP9 codec | ||
if ((m_mfxVideoParams.mfx.FrameInfo.FourCC == MFX_FOURCC_P010 || m_mfxVideoParams.mfx.FrameInfo.FourCC == MFX_FOURCC_Y210) && m_mfxVideoParams.mfx.CodecId==MFX_CODEC_VP9) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Y210 is not covered by version check
AreGuidsEqual(pParams->pluginParams.pluginGuid, MFX_PLUGINID_HEVCE_HW); | ||
bool readerShift = m_pmfxVPP ? pParams->shouldUseShiftedP010VPP : pParams->shouldUseShiftedP010Enc; | ||
bool readerShift = false; | ||
if (pParams->FileInputFourCC == MFX_FOURCC_P010 || pParams->FileInputFourCC == MFX_FOURCC_P210 || pParams->FileInputFourCC == MFX_FOURCC_Y210) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Y210 is not covered by version check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not resolved, @fzhar. Why you closed the discussion?
@fzhar , any progress with addressing DmitryR concerns? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fzhar : there are few types of work which which we are doing here and few corresponding areas of responsibility:
- Engineering work, i.e. implement a feature(s) and make them functional
- Reviewer work, i.e. make sure that 1) feature is implemented correctly, 2) code is correctly structured, broken into commits, 3) code is "in a good shape"
- Maintainer work, i.e. cherry-pick changes to release branches if needed
It is important to recognize and respect all these types of works.
As of now your commits will lead to nightmare in a few aspects:
- Users will have issues in bisecting (for example, because you don't cover code with version checks initially and fix this later on)
- There will be issues with cherry-picking into release branches (for example, since changes are not isolated to specific commits)
I supplied only few reasons why there will be issues. There are other reasons as well.
Could you, please, try to refactor your commits following the following guidelines:
- Big non-functional changes should be isolated to separate commits. Each commit should change a code in a most trivial way. For example, if you change tabs to space then change only tabs and spaces and describe what you did in commit message. Do not attempt to change comments in the same commit - this will be unreviewable.
- Prepare code before your changes: separate out pre-requisite commits which don't introduce new features, but make some preliminary job. These commits should be first in the line. For example, this can be some tabs/whitespace change commits or isomorphic code refactoring.
- Address comments in the same commit where comments are given unless you explicitly asked to extracted something to a separate commit. Learn git --amend and git rebase -i HEAD~7. These are your best friends.
- Answer comments, don't silently close them. If you disagree - explain your point. We have a lot of code, it is difficult to remember everything and quite easy to misread. Some comments are actually clarifying questions.
- Feature changes should be structured: don't implement few significantly different changes in the same commit.
- Commits should be targeted: don't change the code which you actually don't need to change. I.e. avoid useless white space changes in feature commits - this gives issues in review.
Being said that, specifically for these changes:
- Commit which changes tabs to spaces - either drop it completely or pull it int he beginning of the series
- Last commit which fixes something in prev. commit - it should cease to exist. This should be done in the previous commits.
- Pay attention on the comments to extract bug fixes and avoid changes for which we got negative community feedback in the past.
2595f79
to
c12aeeb
Compare
|
||
if (MFX_FOURCC_YUY2 == pInfo.FourCC || MFX_FOURCC_RGB4 == pInfo.FourCC || MFX_FOURCC_BGR4 == pInfo.FourCC) | ||
if (MFX_FOURCC_YUY2 == pInfo.FourCC || MFX_FOURCC_RGB4 == pInfo.FourCC || MFX_FOURCC_BGR4 == pInfo.FourCC || pInfo.FourCC == MFX_FOURCC_Y210 || pInfo.FourCC == MFX_FOURCC_Y410) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Y210 and Y410 should be under version check
@@ -912,9 +914,10 @@ mfxStatus CDecodingPipeline::InitVppParams() | |||
} | |||
|
|||
// P010 video surfaces should be shifted | |||
if (m_mfxVppVideoParams.vpp.Out.FourCC == MFX_FOURCC_P010 && m_memType != SYSTEM_MEMORY) | |||
if ((m_mfxVppVideoParams.vpp.Out.FourCC == MFX_FOURCC_P010 || m_mfxVppVideoParams.vpp.Out.FourCC == MFX_FOURCC_Y210) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still not resolved
We returned almost to the same state which was when you first committed this PR. Comments not addressed. |
c12aeeb
to
7beba65
Compare
@dvrogozh , are your concerns addressed? |
@dmitryermilov : no, they were not addressed. |
7beba65
to
662d133
Compare
I don't see any of the comments addressed. |
ca60cd2
to
a50a30f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dvrogozh your call :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better with the alignment, but still PR is not structured. Please, make sure you have:
- Separate commits for the bugfixes (for those features which were already available)
- Separate commits for the feature enabling. If you have few significantly different features they should be in separate commits (VP9 and new color formats are significantly different features)
{ | ||
return MFX_ERR_UNSUPPORTED; | ||
} | ||
|
||
if(MFX_FOURCC_P010 == ColorFormat) | ||
if(MFX_FOURCC_P010 == ColorFormat || MFX_FOURCC_P210 == ColorFormat || MFX_FOURCC_Y210 == ColorFormat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (MFX_VERSION >= 1027) check for Y210 is missed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This indeed look inconsistent. Please add guard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
ptr = MSDK_MIN( MSDK_MIN(pData.R, pData.G), pData.B); | ||
ptr = ptr + pInfo.CropX + pInfo.CropY * pData.Pitch; | ||
case MFX_FOURCC_RGB4: | ||
case 100: //DXGI_FORMAT_AYUV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -179,20 +179,27 @@ mfxStatus CSmplYUVReader::LoadNextFrame(mfxFrameSurface1* pSurface) | |||
|
|||
mfxU32 nBytesPerPixel = (pInfo.FourCC == MFX_FOURCC_P010 || pInfo.FourCC == MFX_FOURCC_P210 ) ? 2 : 1; | |||
|
|||
if (MFX_FOURCC_YUY2 == pInfo.FourCC || MFX_FOURCC_RGB4 == pInfo.FourCC || MFX_FOURCC_BGR4 == pInfo.FourCC | |||
if ( MFX_FOURCC_YUY2 == pInfo.FourCC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
belongs to previous commit.
@@ -2450,8 +2442,16 @@ mfxU16 FourCCToChroma(mfxU32 fourCC) | |||
return MFX_CHROMAFORMAT_YUV420; | |||
case MFX_FOURCC_NV16: | |||
case MFX_FOURCC_P210: | |||
#if (MFX_VERSION >= 1027) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
belongs to prev. commit
#endif | ||
) | ||
{ | ||
//Packed format: Luminance and chrominance are on the same plane | ||
switch (m_ColorFormat) | ||
{ | ||
case MFX_FOURCC_A2RGB10: | ||
case MFX_FOURCC_AYUV: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't mix YUV and RGB color formats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Although it was fully working code, I've separated them to make it more readable
case MFX_FOURCC_RGB4: | ||
case MFX_FOURCC_BGR4: | ||
pitch = pData.Pitch; | ||
ptr = MSDK_MIN( MSDK_MIN(pData.R, pData.G), pData.B); | ||
ptr = ptr + pInfo.CropX + pInfo.CropY * pData.Pitch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate bug fix. Attach to the next commit?
{ | ||
PrintHelp(strInput[0], MSDK_STRING("Unknown codec")); | ||
return MFX_ERR_UNSUPPORTED; | ||
} | ||
|
||
if (MFX_CODEC_JPEG != pParams->CodecId && | ||
if (MFX_CODEC_JPEG != pParams->CodecId && MFX_CODEC_HEVC != pParams->CodecId && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks to be separate bug fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is integral part of this commit.
return MFX_ERR_UNSUPPORTED; | ||
} | ||
|
||
if (MFX_CODEC_HEVC != pParams->CodecId && (pParams->EncodeFourCC == MFX_FOURCC_P010) ) | ||
if (MFX_CODEC_HEVC != pParams->CodecId && MFX_CODEC_VP9 != pParams->CodecId && (pParams->EncodeFourCC == MFX_FOURCC_P010) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't very much like intermix of VP9 support enabling with color formats. Can we have separate commit for VP9, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of them uses same common code base changes in sample_common, so they are quite tightly bound
{ | ||
return MFX_ERR_UNSUPPORTED; | ||
} | ||
|
||
if(MFX_FOURCC_P010 == ColorFormat) | ||
if(MFX_FOURCC_P010 == ColorFormat || MFX_FOURCC_P210 == ColorFormat || MFX_FOURCC_Y210 == ColorFormat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This indeed look inconsistent. Please add guard.
ptr = MSDK_MIN( MSDK_MIN(pData.R, pData.G), pData.B); | ||
ptr = ptr + pInfo.CropX + pInfo.CropY * pData.Pitch; | ||
case MFX_FOURCC_RGB4: | ||
case 100: //DXGI_FORMAT_AYUV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
{ | ||
PrintHelp(strInput[0], MSDK_STRING("Unknown codec")); | ||
return MFX_ERR_UNSUPPORTED; | ||
} | ||
|
||
if (MFX_CODEC_JPEG != pParams->CodecId && | ||
if (MFX_CODEC_JPEG != pParams->CodecId && MFX_CODEC_HEVC != pParams->CodecId && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is integral part of this commit.
a50a30f
to
ebab829
Compare
Change-Id: I43225b55e8e1b0cfd69e8f156c401da2610f1463
Change-Id: I637010ff1856fa6550b64ac829a1aa55ceb09192
ebab829
to
5cfdc76
Compare
No description provided.