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
/** | |
* Performs a greedy algorithm on the chunk vmaf data to produce a list of cq values that maximizes the average vmaf of | |
* the entire encode without going over the [SIZE_LIMIT]. | |
* | |
* This is a variation of the 0-1 knapsack problem. Due to the extra constraint of needing one of each chunk, the | |
* pseudo-polynomial algorithm cannot be applied. Instead, we make the following assumptions to reach a good local | |
* maximum. | |
* | |
* For any chunk c and cq value q, | |
* - vmaf(c, q - 1) > vmaf(c, q) and |