This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 169
Add crf ratecontrol support #70
Open
kirithika7
wants to merge
106
commits into
OpenVisualCloud:master
Choose a base branch
from
kirithika7:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
106 commits
Select commit
Hold shift + click to select a range
e2e977b
Add crf ratecontrol support
kirithika7 ac871ee
Merge branch 'master' into master
kirithika7 808457f
Add CLI support for vbv
bhavnahariMCW de97249
Enable vbv for abr mode
bhavnahariMCW 488721b
Added VBV frame level support
dinesh0603 8f74ea2
1. Fixed Index comparision to compare with current Index + lookAheadD…
dinesh0603 8f3b2a4
Enforce vbv buffer update to happen in decode order
kirithika7 f1e1a17
Add new cli -hrd (default 0) + enable flags to signal hrd
kirithika7 8c2f324
Add support for HRD SEI signalling
kirithika7 bfd35f2
Add support for Active Parameter Set SEI
kirithika7 38b744d
Control VBV bufferFill access using mutex
arunaMathes 853a45e
Add cli -vbv-init and remove hard-coded vbv buffer initialization
arunaMathes 87f7729
If rate control is ON, base layer picture will not be processed until…
anaghdin 708bd26
VBV Code clean up and made VBV as function call
dinesh0603 32dc411
Fix for the deadlock encoding frames fewer than 48
anaghdin 88d1bef
Move vbv algorithm before using picture Qp for other RC context updates
kirithika7 f4d19b8
Fix Warning: When NAL Unit is non-VCL NAL, TemporalId shall be greate…
kirithika7 cddec5a
Fix bug:The value of rbsp_stop_one_bit shall be equal to 1 in vps
kirithika7 96524c4
Fix cbr signalling
kirithika7 a199b68
Fix Hrd Issue
kirithika7 e692a04
Fix uninitialized BPnumber value error when hrd is disabled
kirithika7 c8a7166
Fix Hrd signalling for fixed GOP length
kirithika7 54eceb4
-Fix 1. encoded bitrate will be within target Bitrate limit 2. previo…
dinesh0603 429edb5
Add code to copy the pcs context into the Packetization Reorder Queue…
kirithika7 d857190
Add code to splice the bitstream and insert pic timing SEI
kirithika7 0d74be5
Fix bugs and cleanup
kirithika7 22f80ea
Refactor byte shifting code with memcpy+cleanup
kirithika7 5f52a2f
Add support for strict cbr to prevent hrd buffer overflow
kirithika7 dd24050
Add code to consider filler bits for RC
kirithika7 713643e
Merged Master to VBV-DEV branch
dinesh0603 6311c66
Merge branch 'master' tip into vbv_dev
dinesh0603 f268574
Update the filler bit error in the packetization feedback to rate con…
kirithika7 f1cd4c5
Added feedback from packetization to picturemanager to address a dead…
anaghdin 0b1103a
Fix the demux port
anaghdin 494cb24
update the pictureDemuxResultsProducerFifoPtrArray ports
anaghdin 7b70491
Revert the feedback of filler bits error to GOP's virtual Buffer level
kirithika7 07c3947
Fix for deadlock when vbv is not enabled
kirithika7 3df55f3
Fix compiler warnings
kirithika7 e3b304d
Fix for Final Bitrate is greater than TBR in Strict CBR
dinesh0603 603afa8
Fix:Remove the duplicated use of current frame bits for lookahead bas…
kirithika7 aa3d3f6
Add support for vbv-end and vbv-end-fr-adj
kirithika7 c82520c
Add proxy entropy coding call into Encdec process to support block le…
kirithika7 1397357
Create and initialize row stats structure
kirithika7 742a38e
Add code to assign baseqp for each LCU
kirithika7 6926341
Update rowstats based on the CU history
kirithika7 1d6bce7
Add code for Low level RC
kirithika7 c977220
Add code to estimate frame size at vbv checkpoints
kirithika7 9234146
Code clean up & removed warnings
dinesh0603 0560e9c
Add code to predict bits for each LCU
kirithika7 9703118
Fix Buffer Fill based on the lookahead buffer Fill for the current frame
kirithika7 01d52a4
Fix exception due to null frame rate
kirithika7 501e5a4
Move the low-level QP calculation after MD Fix the confromant part fo…
anaghdin 037d7c2
Add cli support to enable/disable low level vbv
kirithika7 d1b7dea
Add additional checks for -low-level-vbv introduced
kirithika7 5a8dc53
Fix the run time error "No RC interval found" when
kirithika7 d55a18b
Fix: Reset encodedBitsSoFar to 0 before recomputing frame size
kirithika7 e337b62
Merge branch with Master (Commit:97eafda)
dinesh0603 f7ebfc3
-Modified code as per review comments and coding guidelines
dinesh0603 c5cdcfe
Fix for Deadlock
dinesh0603 beda1ec
Remove the macro PACK_FEEDBACK
anaghdin d1386a6
Implement 16x16 SATD C and AVX2 functions.
LuanZhanKuangGe 2442880
Fix compiler errors on Linux.
LuanZhanKuangGe c8e2fcd
Fixed hrd 1 crash issues caused by writeUvlc long bits, memmove and S…
20e2bf9
Merge CRF branch with master
dinesh0603 6431e5c
Merge CRF with Master Tip(commit:054b1bf)
dinesh0603 80d1d8a
Modifed code as per coding guidelines
dinesh0603 8997bc3
Merge branch VBV Code with CRF
dinesh0603 8570171
Merge branch 'master' into master
tianjunwork ceb6347
Fix linux build errors
kavithasampath 5bb446b
Merge branch 'master' of https://github.com/OpenVisualCloud/SVT-HEVC
kirithika7 c9ce68b
Cleanup unused variables
kirithika7 5f95710
Update CMakeLists.txt
kirithika7 015a2bc
Merge branch 'master' of https://github.com/OpenVisualCloud/SVT-HEVC
kirithika7 1165741
Revert "Update CMakeLists.txt
"
kirithika7 5e6e924
Fix make error caught while linking math library
kirithika7 d3d530c
Fix SVT-HEVC ffmpeg integration error
kirithika7 85a36e2
Fix license header in newly added files
kirithika7 c5bd916
Fix initialization of Neighbor arrays in EstimateLcu()
kirithika7 e393fd0
Update Estimatelcu() to that of master
kirithika7 d499b4f
Fix the Encoder crash when Frames exceeds the CircularQueue length
kirithika7 c710fc5
Remove reassignment of lcu qp by Entropy process
kirithika7 84979ba
Fix reset of Row stats once per picture
kirithika7 b6ae721
Use Sad Interval Index updated by Motion Estimation Process for LCU b…
kirithika7 ce88bc4
Clean up
kirithika7 b07731f
Revert vbv-end and vbv end frame adjust option
kirithika7 1e85639
Merge branch 'master' of https://github.com/OpenVisualCloud/SVT-HEVC
kirithika7 ef9c29a
Cleanup unneccesary file changes
kirithika7 c849c55
Merge branch 'master' of https://github.com/OpenVisualCloud/SVT-HEVC
kirithika7 72a99e9
Cleanup the usage of a udeclared variable
kirithika7 c16092c
Enable Low level VBV only if frame level VBV is enabled and remove re…
kirithika7 c0b0ece
Fix inconsistent line endings in EbEncDecProcess.c
kirithika7 1335e73
Remove the SATD asm implementation
kirithika7 40a5f97
Move PredictBits() to a new file to remove redundant copy of it as Pr…
kirithika7 ce4672c
Remove unused variable rowIndex+Move tempCoeffPtr assignment after
kirithika7 3ee527f
Add Macro for Rc Tolerance and Step size values + Add VBV control to…
kirithika7 a5d6a00
Add code for planning VBV Buffer Fullness after lookahead VBV to use …
kirithika7 a984744
Restrict low level vbv when lookahead predictions are not done + enab…
kirithika7 8c2612f
Merge branch 'master' of https://github.com/OpenVisualCloud/SVT-HEVC
kirithika7 2e231e2
Fix build error + update BKC for frame level VBV
kirithika7 a218fa7
Remove -DPIC as it is not needed for SATD C implementation
kirithika7 93f6794
Merge branch 'master' into master
tianjunwork e93b4e9
Fixed the compiling errors/warnings for rebasing PR #70.
Austin-Hu b7effc8
Refined the CRF usage.
Austin-Hu 8ba809c
Update EbEncHandle.c
Austin-Hu 7135294
Fixed some rebasing errors in EbEncDecProcess.c
Austin-Hu 79f187c
Merge branch 'master' into master
Austin-Hu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Copyright(c) 2018 Intel Corporation | ||
* SPDX - License - Identifier: BSD - 2 - Clause - Patent | ||
*/ | ||
|
||
#include "EbMeSatdCalculation_C.h" | ||
|
||
#define BITS_PER_SUM (8 * sizeof(EB_U16)) | ||
|
||
static inline EB_U32 abs2(EB_U32 a) | ||
{ | ||
EB_U32 s = ((a >> (BITS_PER_SUM - 1)) & (((EB_U32)1 << BITS_PER_SUM) + 1)) * ((EB_U32)-1); | ||
|
||
return (a + s) ^ s; | ||
} | ||
|
||
#define HADAMARD4(d0, d1, d2, d3, s0, s1, s2, s3) { \ | ||
EB_U32 t0 = s0 + s1; \ | ||
EB_U32 t1 = s0 - s1; \ | ||
EB_U32 t2 = s2 + s3; \ | ||
EB_U32 t3 = s2 - s3; \ | ||
d0 = t0 + t2; \ | ||
d2 = t0 - t2; \ | ||
d1 = t1 + t3; \ | ||
d3 = t1 - t3; \ | ||
} | ||
|
||
/******************************************* | ||
Calcualte SATD for 8x4 sublcoks. | ||
*******************************************/ | ||
EB_U32 SatdCalculation_8x4( | ||
EB_U8 *src, | ||
EB_U32 srcStride, | ||
EB_U8 *ref, | ||
EB_U32 refStride) | ||
{ | ||
EB_U32 tmp[4][4]; | ||
EB_U32 a0, a1, a2, a3; | ||
EB_U32 sum = 0; | ||
|
||
for (EB_U64 i = 0; i < 4; i++, src += srcStride, ref += refStride) | ||
{ | ||
a0 = (src[0] - ref[0]) + ((EB_U32)(src[4] - ref[4]) << BITS_PER_SUM); | ||
a1 = (src[1] - ref[1]) + ((EB_U32)(src[5] - ref[5]) << BITS_PER_SUM); | ||
a2 = (src[2] - ref[2]) + ((EB_U32)(src[6] - ref[6]) << BITS_PER_SUM); | ||
a3 = (src[3] - ref[3]) + ((EB_U32)(src[7] - ref[7]) << BITS_PER_SUM); | ||
HADAMARD4(tmp[i][0], tmp[i][1], tmp[i][2], tmp[i][3], a0, a1, a2, a3); | ||
} | ||
|
||
for (EB_U64 i = 0; i < 4; i++) | ||
{ | ||
HADAMARD4(a0, a1, a2, a3, tmp[0][i], tmp[1][i], tmp[2][i], tmp[3][i]); | ||
sum += abs2(a0) + abs2(a1) + abs2(a2) + abs2(a3); | ||
} | ||
|
||
return (((EB_U16)sum) + (sum >> BITS_PER_SUM)) >> 1; | ||
} | ||
|
||
/******************************************* | ||
Calcualte SATD for 16x16 sublcoks. | ||
*******************************************/ | ||
EB_U32 SatdCalculation_16x16( | ||
EB_U8 *src, | ||
EB_U32 srcStride, | ||
EB_U8 *ref, | ||
EB_U32 refStride) | ||
{ | ||
EB_U32 satd = 0; | ||
|
||
for (EB_U64 row = 0; row < 16; row += 4) | ||
{ | ||
for (EB_U64 col = 0; col < 16; col += 8) | ||
{ | ||
satd += SatdCalculation_8x4(src + row * srcStride + col, srcStride, | ||
ref + row * refStride + col, refStride); | ||
} | ||
} | ||
|
||
return satd; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright(c) 2018 Intel Corporation | ||
* SPDX - License - Identifier: BSD - 2 - Clause - Patent | ||
*/ | ||
|
||
#ifndef EbMeSatdCalculation_C_h | ||
#define EbMeSatdCalculation_C_h | ||
|
||
#include "EbDefinitions.h" | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
EB_U32 SatdCalculation_16x16( | ||
EB_U8 *src, | ||
EB_U32 srcStride, | ||
EB_U8 *ref, | ||
EB_U32 refStride); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif // EbMeSadCalculation_C_h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
needed ?
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 included as CRF algorithm uses pow and log from math lib