Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Conversation

@dinesh0603
Copy link
Contributor

Hi Amir & Hassene,

I have created PR for VBV_dev code with https://github.com/OpenVisualCloud/SVT-HEVC.

Please let me know if you are facing any issues.

Thanks & Regards,
Dinesh

bhavnahariMCW and others added 30 commits January 31, 2019 10:51
…istance 2. Added Check for FrameIndex not exceding No of Frame to Encode
… the feedback of the previous base layer has arrived.

The impact on speed to be evaluated
…r than or equal to the TemporalId of the access unit containing the NAL unit
This fix ensures right signalling of Picture timing for keyframes>0
…usly It was going beyond target Bitrate and was within Max Bitrate, if Max rate is Greater than Target Bitrate
static void SetVbvBufsize (const char *value, EbConfig_t *cfg) { cfg->vbvBufsize = strtoul(value, NULL, 0); };
static void SetVbvBufInit (const char *value, EbConfig_t *cfg) { cfg->vbvBufInit = strtoul(value, NULL, 0); };
static void SetHrdFlag (const char *value, EbConfig_t *cfg) { cfg->hrdFlag = strtoul(value, NULL, 0); };
static void SetVbvMaxrate (const char *value, EbConfig_t *cfg) { cfg->vbvMaxRate = strtoul(value, NULL, 0); };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the necessary space here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified code as per review comments and pushed patch (Commit : 9db1593)

// VBV Parameters

/* Sets the maximum rate the VBV buffer should be assumed to refill at
* Default is zero */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the indent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved and pushed patch (Commit : 9db1593)

| **vbvBufsize** | -vbv-bufsize | Any Number | 0 | VBV BufferSize in bits / second. Only used when RateControlMode is set to 1 |
| **vbvBufInit** | -vbv-init | [0 - 100] | 90 | Sets how full the VBV buffer to be|
| **hrdFlag** | -hrd | [0,1] | 0 | HRD Flag, 0 = OFF, 1 = ON |When hrdFlag is set to 1 it requires vbvMaxrate and vbvBufsize to be greater than 0 |
| **MaxQpAllowed** | -max-qp | [0 - 51] | 48 | Maximum QP value allowed for rate control use. Only used when RateControlMode is set to 1. Has to be >= MinQpAllowed |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also update sample.cfg? Thx.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated and pushed (Commit : 9db1593)

README.md Outdated
[![Travis Build Status](https://travis-ci.com/OpenVisualCloud/SVT-HEVC.svg?branch=master)](https://travis-ci.com/OpenVisualCloud/SVT-HEVC)
[![Coverage Status](https://coveralls.io/repos/github/openvisualcloud/SVT-HEVC/badge.svg?branch=master)](https://coveralls.io/github/openvisualcloud/SVT-HEVC?branch=master)

[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/intel/SVT-HEVC?branch=master&svg=true)](https://ci.appveyor.com/project/intel/SVT-HEVC)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The left side openvisualcloud is the new one, please fix these.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed and pushed patch (Commit : 9db1593)

README.md Outdated
- [svt-hevc-encoder-user-guide](Docs/svt-hevc_encoder_user_guide.md)

- [SVT-HEVC Encoder User Guide](Docs/svt-hevc_encoder_user_guide.md)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove extra empty line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed empty line and pushed patch (Commit : 9db1593)

bitstreamPtr,
scsPtr->staticConfig.fpsInVps == 1 ? EB_TRUE : EB_FALSE);
if (scsPtr->staticConfig.fpsInVps == 1)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if() {
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified and pushed (Commit: 9db1593)

MIN_PU_SIZE,
&countNonZeroCoeffs);


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove extra line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified and pushed (Commit: 9db1593)

MIN_PU_SIZE,
&countNonZeroCoeffs);


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove extra line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified and pushed (Commit: 9db1593)

switch(lumaMode) {

case EB_INTRA_PLANAR:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove extra lines in this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified and pushed (Commit: 9db1593)

referenceEntryPtr->releaseEnable = EB_TRUE;
referenceEntryPtr->referenceAvailable = EB_FALSE;
referenceEntryPtr->isUsedAsReferenceFlag = pictureControlSetPtr->isUsedAsReferenceFlag;
referenceEntryPtr->feedbackArrived = EB_FALSE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix indent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified and pushed (Commit: 9db1593)

-Updated code as per review comments as per coding guidelines, Indendation etc
{
printf("Error Instance %u: hrdFlag must be [0 - 1]\n", channelNumber + 1);
printf("SVT [Error]: Instance %u: hrdFlag must be [0 - 1]\n", channelNumber + 1);
return_error = EB_ErrorBadParameter;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use "SVT_LOG("SVT [Error]:"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the coding style here.
if () {
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified and pushed (Commit: 9db1593)

if (config->hrdFlag == 1 && ((config->vbvBufsize <= 0) || (config->vbvMaxrate <= 0)))
{
printf("Error instance %u: hrd requires vbv max rate and vbv bufsize to be greater than 0 ", channelNumber + 1);
printf("SVT [Error]: Instance %u: hrd requires vbv max rate and vbv bufsize to be greater than 0 ", channelNumber + 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use "SVT_LOG("SVT [Error]:"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified and pushed (Commit: 9db1593)

{ SINGLE_INPUT, USE_QP_FILE_TOKEN, "UseQpFile", SetCfgUseQpFile },
{ SINGLE_INPUT, RATE_CONTROL_ENABLE_TOKEN, "RateControlMode", SetRateControlMode },
{ SINGLE_INPUT, LOOK_AHEAD_DIST_TOKEN, "LookAheadDistance", SetLookAheadDistance},
{ SINGLE_INPUT, TARGET_BIT_RATE_TOKEN, "TargetBitRate", SetTargetBitRate },
Copy link
Contributor

@tianjunwork tianjunwork Apr 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove duplicated code here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed Duplicate code, Commit : 5d0af0f


//Set required flags to signal vbv status when hrd is enabled
if (sequenceControlSetPtr->staticConfig.hrdFlag == 1) {
sequenceControlSetPtr->staticConfig.videoUsabilityInfo = 1;
Copy link
Contributor

@tianjunwork tianjunwork Apr 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the indent of your code changes in this file. Use space instead of tab.
Please review carefully the diff here, and fix all of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified code , Used space in place of tab, reviewed full EbEncHandle.c file, Commit : 5d0af0f

@tianjunwork tianjunwork added the enhancement New feature or request label May 4, 2019
Copy link
Contributor

@tianjunwork tianjunwork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dinesh0603 Sorry that I can't approve this commit. As you can see here, the indents are still messed up compared with original code.
Please also fix the indents in Source/API/EbApi.h. Read this file on github, you will know what is the difference. Please keep it same with original code.


// Quantization
{ SINGLE_INPUT, QP_TOKEN, "QP", SetCfgQp },
{ SINGLE_INPUT, USE_QP_FILE_TOKEN, "UseQpFile", SetCfgUseQpFile },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UseQpFile is duplicated. Pls clean up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed duplicate code and pushed code (commit:67f68d8)

@tianjunwork
Copy link
Contributor

Hi @dinesh0603, could you also provide some test commands or examples to demonstrate the usage of the new APIs?
How do they affect the output by setting the value for those APIs. The users may not be expert to encoder algorithm. Please help them to understand the usage.
You can either add in user guide appendix or add comment here.
Thank you.

@kelvinhu325
Copy link

@dinesh0603 , just tried to run vbv hrd(-hrd 1) test on my machine, but the generated bitstream gets crash for HM decoder, could you help take a look if there are errors on my cmdline? BTW, the same test with -hrd 0 works well.
cmdline is:
./SvtHevcEncApp -i ./Netflix_Boat_4096x2160_10bit_60Hz_P420.yuv -b Netflix_Boat_4096x2160_10bit_60Hz_P420_7_7500000.bin -w 4096 -h 2160 -bit-depth 10 -color-format 1 -encMode 7 -tune 0 -rc 1 -tbr 7500000 -vbv-maxrate 7500000 -vbv-bufsize 7500000 -hrd 1 -fps 60 -n 50 -nb 50
HM error info is:
HM software: Decoder Version [16.15] (including RExt)[Linux][GCC 5.4.0][64 bit]
TAppDecoderStaticd: /home/xxx/HM/build/linux/lib/TLibCommon/../../../../source/Lib/TLibCommon/TComBitStream.cpp:293: Void TComInputBitstream::read(UInt, UInt&): Assertion `m_fifo_idx + num_bytes_to_load < m_fifo.size()' failed.

Hu, Kelvin and others added 2 commits June 11, 2019 18:02
Fixed hrd 1 crash issues caused by writeUvlc long bits, memmove and
…into vbv_dev

# Conflicts:
#	Source/Lib/Codec/EbEncHandle.c
#	Source/Lib/Codec/EbEntropyCoding.c
#	Source/Lib/Codec/EbPacketizationProcess.c
This commit cleans up the unused variables in VBV code and add file
changes that got missed out while resolving conflicts

Signed-off-by: kirithika <[email protected]>
@tianjunwork
Copy link
Contributor

Hi, @kirithika7, could you add a sign-off line to your commit msg? Thx.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants