@webex/web-client-media-engine 3.29.3 → 3.29.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -7603,7 +7603,10 @@ function getFrameHeightByMaxFs(sourceAspectRatio, requestedMaxFs) {
|
|
|
7603
7603
|
const _gcd = gcd(sourceAspectRatio[0], sourceAspectRatio[1]);
|
|
7604
7604
|
const minNumberRatiosForWidth = sourceAspectRatio[0] / _gcd;
|
|
7605
7605
|
const minNumberRatiosForHeight = sourceAspectRatio[1] / _gcd;
|
|
7606
|
-
|
|
7606
|
+
const macroBlockSize = 16 * 16;
|
|
7607
|
+
const minRatioNumberByMaxFs = Math.sqrt((requestedMaxFs * macroBlockSize) / (minNumberRatiosForWidth * minNumberRatiosForHeight));
|
|
7608
|
+
const roundedMinRatioNumberByMaxFs = Math.max(Math.floor(minRatioNumberByMaxFs), 1.0);
|
|
7609
|
+
return roundedMinRatioNumberByMaxFs * minNumberRatiosForHeight;
|
|
7607
7610
|
}
|
|
7608
7611
|
function getScaleDownRatio(sourceWidth, sourceHeight, maxFs, maxWidth, maxHeight) {
|
|
7609
7612
|
if (!sourceWidth || !sourceHeight || !maxFs) {
|