|
1 |
| -// Copyright (c) 2018 Intel Corporation |
| 1 | +// Copyright (c) 2019 Intel Corporation |
2 | 2 | //
|
3 | 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 | 4 | // of this software and associated documentation files (the "Software"), to deal
|
@@ -4392,7 +4392,7 @@ mfxStatus MfxHwH264Encode::CheckVideoParamQueryLike(
|
4392 | 4392 |
|
4393 | 4393 | if (!CheckRangeDflt(extOpt2->SkipFrame, 0, 3, 0)) changed = true;
|
4394 | 4394 |
|
4395 |
| - if ( extOpt2->SkipFrame && hwCaps.SkipFrame == 0 && par.mfx.RateControlMethod != MFX_RATECONTROL_CQP && par.mfx.RateControlMethod != MFX_RATECONTROL_LA_HRD) |
| 4395 | + if ( extOpt2->SkipFrame && hwCaps.SkipFrame == 0 && par.mfx.RateControlMethod != MFX_RATECONTROL_CQP) |
4396 | 4396 | {
|
4397 | 4397 | extOpt2->SkipFrame = 0;
|
4398 | 4398 | changed = true;
|
@@ -4499,19 +4499,6 @@ mfxStatus MfxHwH264Encode::CheckVideoParamQueryLike(
|
4499 | 4499 | if (!CheckRangeDflt(extOpt2->MinQPP, 0, (extOpt2->MaxQPP ? extOpt2->MaxQPP : 51), 0)) changed = true;
|
4500 | 4500 | if (!CheckRangeDflt(extOpt2->MinQPB, 0, (extOpt2->MaxQPB ? extOpt2->MaxQPB : 51), 0)) changed = true;
|
4501 | 4501 | }
|
4502 |
| - if ((extOpt3->WinBRCSize > 0 && (par.mfx.RateControlMethod != MFX_RATECONTROL_VBR && par.mfx.RateControlMethod != MFX_RATECONTROL_QVBR)) || (par.mfx.RateControlMethod == MFX_RATECONTROL_LA_HRD)) |
4503 |
| - { |
4504 |
| - if (extOpt2->SkipFrame!=0 && extOpt2->SkipFrame != MFX_SKIPFRAME_INSERT_DUMMY) |
4505 |
| - { |
4506 |
| - extOpt2->SkipFrame = MFX_SKIPFRAME_INSERT_DUMMY; |
4507 |
| - changed = true; |
4508 |
| - } |
4509 |
| - if (extOpt2->BRefType != MFX_B_REF_OFF && extOpt2->BRefType != 0) |
4510 |
| - { |
4511 |
| - extOpt2->BRefType = MFX_B_REF_OFF; |
4512 |
| - changed = true; |
4513 |
| - } |
4514 |
| - } |
4515 | 4502 | if (!CheckTriStateOption(extOpt3->BRCPanicMode)) changed = true;
|
4516 | 4503 | if (IsOff(extOpt3->BRCPanicMode)
|
4517 | 4504 | && (bRateControlLA(par.mfx.RateControlMethod)
|
@@ -5215,11 +5202,6 @@ namespace
|
5215 | 5202 | return false;
|
5216 | 5203 | return true;
|
5217 | 5204 | }
|
5218 |
| - |
5219 |
| - bool IsPowerOf2(mfxU32 n) |
5220 |
| - { |
5221 |
| - return (n & (n - 1)) == 0; |
5222 |
| - } |
5223 | 5205 | };
|
5224 | 5206 |
|
5225 | 5207 | bool IsHRDBasedBRCMethod(mfxU16 RateControlMethod)
|
@@ -5426,11 +5408,6 @@ void MfxHwH264Encode::SetDefaults(
|
5426 | 5408 | }
|
5427 | 5409 | }
|
5428 | 5410 |
|
5429 |
| - if ((!extOpt2->SkipFrame) && ((extOpt3->WinBRCSize > 0 && (par.mfx.RateControlMethod != MFX_RATECONTROL_VBR && par.mfx.RateControlMethod != MFX_RATECONTROL_QVBR)) || par.mfx.RateControlMethod == MFX_RATECONTROL_LA_HRD)) |
5430 |
| - { |
5431 |
| - extOpt2->SkipFrame = MFX_SKIPFRAME_INSERT_DUMMY; |
5432 |
| - } |
5433 |
| - |
5434 | 5411 | //WA for MVC quality problem on progressive content.
|
5435 | 5412 | if (IsMvcProfile(par.mfx.CodecProfile)) {
|
5436 | 5413 | extDdi->NumActiveRefP = extDdi->NumActiveRefBL0 = extDdi->NumActiveRefBL1 = 1;
|
@@ -5509,9 +5486,7 @@ void MfxHwH264Encode::SetDefaults(
|
5509 | 5486 | if (platform >= MFX_HW_HSW && platform != MFX_HW_VLV &&
|
5510 | 5487 | IsDyadic(par.calcParam.scale, par.calcParam.numTemporalLayer) &&
|
5511 | 5488 | par.mfx.GopRefDist >= 4 &&
|
5512 |
| - IsPowerOf2(par.mfx.GopRefDist) && |
5513 |
| - par.mfx.GopPicSize % par.mfx.GopRefDist == 0 && |
5514 |
| - !bRateControlLA(par.mfx.RateControlMethod) && |
| 5489 | + par.mfx.RateControlMethod != MFX_RATECONTROL_LA_EXT && |
5515 | 5490 | (!par.mfx.NumRefFrame || par.mfx.NumRefFrame >= GetMinNumRefFrameForPyramid(par)))
|
5516 | 5491 | {
|
5517 | 5492 | extOpt2->BRefType = mfxU16(par.mfx.FrameInfo.PicStruct == MFX_PICSTRUCT_PROGRESSIVE ? MFX_B_REF_PYRAMID : MFX_B_REF_OFF);
|
|
0 commit comments