зеркало из https://github.com/mozilla/gecko-dev.git
Merge autoland to mozilla-central. a=merge
This commit is contained in:
Коммит
bd0ebde417
|
@ -497,7 +497,7 @@ pref("browser.tabs.delayHidingAudioPlayingIconMS", 3000);
|
|||
// Pref to control whether we use a separate privileged content process
|
||||
// for certain mozilla webpages (which are listed in the pref
|
||||
// browser.tabs.remote.separatedMozillaDomains).
|
||||
pref("browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", false);
|
||||
pref("browser.tabs.remote.separatePrivilegedMozillaWebContentProcess", true);
|
||||
// This pref will cause assertions when a remoteType triggers a process switch
|
||||
// to a new remoteType it should not be able to trigger.
|
||||
pref("browser.tabs.remote.enforceRemoteTypeRestrictions", true);
|
||||
|
|
|
@ -36,8 +36,6 @@ const startupPhases = {
|
|||
"resource://gre/modules/MainProcessSingleton.jsm",
|
||||
"resource://gre/modules/XPCOMUtils.jsm",
|
||||
"resource://gre/modules/Services.jsm",
|
||||
// Bugs to fix: The following components shouldn't be initialized that early.
|
||||
"resource://gre/modules/PushComponents.jsm", // bug 1369436
|
||||
]),
|
||||
},
|
||||
},
|
||||
|
@ -95,6 +93,7 @@ const startupPhases = {
|
|||
"resource://gre/modules/FxAccountsStorage.jsm",
|
||||
"resource://gre/modules/PlacesBackups.jsm",
|
||||
"resource://gre/modules/PlacesSyncUtils.jsm",
|
||||
"resource://gre/modules/PushComponents.jsm",
|
||||
"resource://gre/modules/Sqlite.jsm",
|
||||
]),
|
||||
services: new Set([
|
||||
|
|
|
@ -20,6 +20,13 @@ ChromeUtils.defineModuleGetter(
|
|||
"resource://gre/modules/ActorManagerParent.jsm"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
this,
|
||||
"PushService",
|
||||
"@mozilla.org/push/Service;1",
|
||||
"nsIPushService"
|
||||
);
|
||||
|
||||
const PREF_PDFJS_ENABLED_CACHE_STATE = "pdfjs.enabledCache.state";
|
||||
|
||||
let ACTORS = {
|
||||
|
@ -1998,6 +2005,11 @@ BrowserGlue.prototype = {
|
|||
this._togglePermissionPromptTelemetry();
|
||||
});
|
||||
|
||||
// Begin listening for incoming push messages.
|
||||
Services.tm.idleDispatchToMainThread(() => {
|
||||
PushService.ensureReady();
|
||||
});
|
||||
|
||||
Services.tm.idleDispatchToMainThread(() => {
|
||||
this._recordContentBlockingTelemetry();
|
||||
});
|
||||
|
|
|
@ -20,47 +20,6 @@ const gElements = {
|
|||
|
||||
let numberOfLogins = 0;
|
||||
|
||||
let searchParamsChanged = false;
|
||||
let { protocol, pathname, searchParams } = new URL(document.location);
|
||||
|
||||
recordTelemetryEvent({
|
||||
method: "open_management",
|
||||
object: searchParams.get("entryPoint") || "direct",
|
||||
});
|
||||
|
||||
if (searchParams.has("entryPoint")) {
|
||||
// Remove this parameter from the URL (after recording above) to make it
|
||||
// cleaner for bookmarking and switch-to-tab and so that bookmarked values
|
||||
// don't skew telemetry.
|
||||
searchParams.delete("entryPoint");
|
||||
searchParamsChanged = true;
|
||||
}
|
||||
|
||||
if (searchParams.has("filter")) {
|
||||
let filter = searchParams.get("filter");
|
||||
if (!filter) {
|
||||
// Remove empty `filter` params to give a cleaner URL for bookmarking and
|
||||
// switch-to-tab
|
||||
searchParams.delete("filter");
|
||||
searchParamsChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (searchParamsChanged) {
|
||||
let newURL = protocol + pathname;
|
||||
let params = searchParams.toString();
|
||||
if (params) {
|
||||
newURL += "?" + params;
|
||||
}
|
||||
window.location.replace(newURL);
|
||||
} else if (searchParams.has("filter")) {
|
||||
// This must be after the `location.replace` so it doesn't cause telemetry to
|
||||
// record a filter event before the navigation to clean the URL.
|
||||
gElements.loginFilter.value = searchParams.get("filter");
|
||||
}
|
||||
|
||||
gElements.loginFilter.focus();
|
||||
|
||||
function updateNoLogins() {
|
||||
document.documentElement.classList.toggle("no-logins", numberOfLogins == 0);
|
||||
gElements.loginList.classList.toggle("no-logins", numberOfLogins == 0);
|
||||
|
@ -135,4 +94,50 @@ window.addEventListener("AboutLoginsChromeToContent", event => {
|
|||
}
|
||||
});
|
||||
|
||||
document.dispatchEvent(new CustomEvent("AboutLoginsInit", { bubbles: true }));
|
||||
// Begin code that executes on page load.
|
||||
|
||||
let searchParamsChanged = false;
|
||||
let { protocol, pathname, searchParams } = new URL(document.location);
|
||||
|
||||
recordTelemetryEvent({
|
||||
method: "open_management",
|
||||
object: searchParams.get("entryPoint") || "direct",
|
||||
});
|
||||
|
||||
if (searchParams.has("entryPoint")) {
|
||||
// Remove this parameter from the URL (after recording above) to make it
|
||||
// cleaner for bookmarking and switch-to-tab and so that bookmarked values
|
||||
// don't skew telemetry.
|
||||
searchParams.delete("entryPoint");
|
||||
searchParamsChanged = true;
|
||||
}
|
||||
|
||||
if (searchParams.has("filter")) {
|
||||
let filter = searchParams.get("filter");
|
||||
if (!filter) {
|
||||
// Remove empty `filter` params to give a cleaner URL for bookmarking and
|
||||
// switch-to-tab
|
||||
searchParams.delete("filter");
|
||||
searchParamsChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (searchParamsChanged) {
|
||||
let newURL = protocol + pathname;
|
||||
let params = searchParams.toString();
|
||||
if (params) {
|
||||
newURL += "?" + params;
|
||||
}
|
||||
// This redirect doesn't stop this script from running so ensure you guard
|
||||
// later code if it shouldn't run before and after the redirect.
|
||||
window.location.replace(newURL);
|
||||
} else if (searchParams.has("filter")) {
|
||||
// This must be after the `location.replace` so it doesn't cause telemetry to
|
||||
// record a filter event before the navigation to clean the URL.
|
||||
gElements.loginFilter.value = searchParams.get("filter");
|
||||
}
|
||||
|
||||
if (!searchParamsChanged) {
|
||||
gElements.loginFilter.focus();
|
||||
document.dispatchEvent(new CustomEvent("AboutLoginsInit", { bubbles: true }));
|
||||
}
|
||||
|
|
|
@ -188,20 +188,22 @@ this.DownloadsViewUI.DownloadElementShell.prototype = {
|
|||
</vbox>
|
||||
</hbox>
|
||||
<toolbarseparator />
|
||||
<button class="downloadButton"
|
||||
oncommand="DownloadsView.onDownloadButton(event);"/>
|
||||
<button class="downloadButton"/>
|
||||
`);
|
||||
gDownloadListItemFragments.set(document, downloadListItemFragment);
|
||||
}
|
||||
this.element.setAttribute("active", true);
|
||||
this.element.setAttribute("orient", "horizontal");
|
||||
this.element.setAttribute(
|
||||
"onclick",
|
||||
"DownloadsView.onDownloadClick(event);"
|
||||
);
|
||||
this.element.addEventListener("click", ev => {
|
||||
ev.target.ownerGlobal.DownloadsView.onDownloadClick(ev);
|
||||
});
|
||||
this.element.appendChild(
|
||||
document.importNode(downloadListItemFragment, true)
|
||||
);
|
||||
let downloadButton = this.element.querySelector(".downloadButton");
|
||||
downloadButton.addEventListener("command", function(event) {
|
||||
event.target.ownerGlobal.DownloadsView.onDownloadButton(event);
|
||||
});
|
||||
for (let [propertyName, selector] of [
|
||||
["_downloadTypeIcon", ".downloadTypeIcon"],
|
||||
["_downloadTarget", ".downloadTarget"],
|
||||
|
|
|
@ -170,7 +170,7 @@ HistoryDownloadElementShell.prototype = {
|
|||
/**
|
||||
* Relays commands from the download.xml binding to the selected items.
|
||||
*/
|
||||
const DownloadsView = {
|
||||
var DownloadsView = {
|
||||
onDownloadButton(event) {
|
||||
event.target.closest("richlistitem")._shell.onButton();
|
||||
},
|
||||
|
@ -808,3 +808,33 @@ function goUpdateDownloadCommands() {
|
|||
updateCommandsForObject(DownloadsPlacesView.prototype);
|
||||
updateCommandsForObject(HistoryDownloadElementShell.prototype);
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
let richtListBox = document.getElementById("downloadsRichListBox");
|
||||
richtListBox.addEventListener("scroll", function(event) {
|
||||
return this._placesView.onScroll();
|
||||
});
|
||||
richtListBox.addEventListener("keypress", function(event) {
|
||||
return this._placesView.onKeyPress(event);
|
||||
});
|
||||
richtListBox.addEventListener("dblclick", function(event) {
|
||||
return this._placesView.onDoubleClick(event);
|
||||
});
|
||||
richtListBox.addEventListener("contextmenu", function(event) {
|
||||
return this._placesView.onContextMenu(event);
|
||||
});
|
||||
richtListBox.addEventListener("dragstart", function(event) {
|
||||
this._placesView.onDragStart(event);
|
||||
});
|
||||
richtListBox.addEventListener("dragover", function(event) {
|
||||
this._placesView.onDragOver(event);
|
||||
});
|
||||
richtListBox.addEventListener("drop", function(event) {
|
||||
this._placesView.onDrop(event);
|
||||
});
|
||||
richtListBox.addEventListener("select", function(event) {
|
||||
this._placesView.onSelect();
|
||||
});
|
||||
richtListBox.addEventListener("focus", goUpdateDownloadCommands);
|
||||
richtListBox.addEventListener("blur", goUpdateDownloadCommands);
|
||||
});
|
||||
|
|
|
@ -21,3 +21,7 @@ var ContentAreaDownloadsView = {
|
|||
document.getElementById("downloadsRichListBox").focus();
|
||||
},
|
||||
};
|
||||
|
||||
window.onload = function() {
|
||||
ContentAreaDownloadsView.init();
|
||||
};
|
||||
|
|
|
@ -17,10 +17,14 @@
|
|||
%editMenuDTD;
|
||||
]>
|
||||
|
||||
<!-- @CSP: We have to whitelist the 'oncommand' handler for all the cmd_* fields within
|
||||
- editMenuOverlay.js until Bug 371900 is fixed using
|
||||
- sha512-4o5Uf4E4EG+90Mb820FH2YFDf4IuX4bfUwQC7reK1ZhgcXWJBKMK2330XIELaFJJ8HiPffS9mP60MPjuXMIrHA==
|
||||
-->
|
||||
<window id="contentAreaDownloadsView"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&downloads.title;"
|
||||
onload="ContentAreaDownloadsView.init();">
|
||||
csp="default-src chrome:; script-src chrome: 'sha512-4o5Uf4E4EG+90Mb820FH2YFDf4IuX4bfUwQC7reK1ZhgcXWJBKMK2330XIELaFJJ8HiPffS9mP60MPjuXMIrHA=='; img-src chrome: moz-icon:;">
|
||||
|
||||
<script src="chrome://global/content/globalOverlay.js"/>
|
||||
<script src="chrome://browser/content/downloads/contentAreaDownloadsView.js"/>
|
||||
|
@ -36,7 +40,10 @@
|
|||
#endif
|
||||
|
||||
<stack flex="1">
|
||||
#include downloadsRichListBox.inc.xul
|
||||
<richlistbox flex="1"
|
||||
seltype="multiple"
|
||||
id="downloadsRichListBox"
|
||||
context="downloadsContextMenu"/>
|
||||
<description id="downloadsListEmptyDescription"
|
||||
value="&downloadsListEmpty.label;"
|
||||
mousethrough="always"/>
|
||||
|
|
|
@ -2,30 +2,20 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
<script src="chrome://browser/content/downloads/downloadsCommands.js"/>
|
||||
|
||||
<commandset id="downloadCommands"
|
||||
commandupdater="true"
|
||||
events="focus,select,contextmenu"
|
||||
oncommandupdate="goUpdateDownloadCommands();">
|
||||
<command id="downloadsCmd_pauseResume"
|
||||
oncommand="goDoCommand('downloadsCmd_pauseResume')"/>
|
||||
<command id="downloadsCmd_cancel"
|
||||
oncommand="goDoCommand('downloadsCmd_cancel')"/>
|
||||
<command id="downloadsCmd_unblock"
|
||||
oncommand="goDoCommand('downloadsCmd_unblock')"/>
|
||||
<command id="downloadsCmd_chooseUnblock"
|
||||
oncommand="goDoCommand('downloadsCmd_chooseUnblock')"/>
|
||||
<command id="downloadsCmd_chooseOpen"
|
||||
oncommand="goDoCommand('downloadsCmd_chooseOpen')"/>
|
||||
<command id="downloadsCmd_confirmBlock"
|
||||
oncommand="goDoCommand('downloadsCmd_confirmBlock')"/>
|
||||
<command id="downloadsCmd_open"
|
||||
oncommand="goDoCommand('downloadsCmd_open')"/>
|
||||
<command id="downloadsCmd_show"
|
||||
oncommand="goDoCommand('downloadsCmd_show')"/>
|
||||
<command id="downloadsCmd_retry"
|
||||
oncommand="goDoCommand('downloadsCmd_retry')"/>
|
||||
<command id="downloadsCmd_openReferrer"
|
||||
oncommand="goDoCommand('downloadsCmd_openReferrer')"/>
|
||||
<command id="downloadsCmd_clearDownloads"
|
||||
oncommand="goDoCommand('downloadsCmd_clearDownloads')"/>
|
||||
events="focus,select,contextmenu">
|
||||
<command id="downloadsCmd_pauseResume"/>
|
||||
<command id="downloadsCmd_cancel"/>
|
||||
<command id="downloadsCmd_unblock"/>
|
||||
<command id="downloadsCmd_chooseUnblock"/>
|
||||
<command id="downloadsCmd_chooseOpen"/>
|
||||
<command id="downloadsCmd_confirmBlock"/>
|
||||
<command id="downloadsCmd_open"/>
|
||||
<command id="downloadsCmd_show"/>
|
||||
<command id="downloadsCmd_retry"/>
|
||||
<command id="downloadsCmd_openReferrer"/>
|
||||
<command id="downloadsCmd_clearDownloads"/>
|
||||
</commandset>
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* import-globals-from allDownloadsView.js */
|
||||
/* import-globals-from ../../../../toolkit/content/globalOverlay.js */
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
let downloadCommands = document.getElementById("downloadCommands");
|
||||
downloadCommands.addEventListener("commandupdate", function() {
|
||||
goUpdateDownloadCommands();
|
||||
});
|
||||
downloadCommands.addEventListener("command", function(event) {
|
||||
let { id } = event.target;
|
||||
goDoCommand(id);
|
||||
});
|
||||
});
|
|
@ -1,17 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
<richlistbox flex="1"
|
||||
seltype="multiple"
|
||||
id="downloadsRichListBox" context="downloadsContextMenu"
|
||||
onscroll="return this._placesView.onScroll();"
|
||||
onkeypress="return this._placesView.onKeyPress(event);"
|
||||
ondblclick="return this._placesView.onDoubleClick(event);"
|
||||
oncontextmenu="return this._placesView.onContextMenu(event);"
|
||||
ondragstart="this._placesView.onDragStart(event);"
|
||||
ondragover="this._placesView.onDragOver(event);"
|
||||
ondrop="this._placesView.onDrop(event);"
|
||||
onfocus="goUpdateDownloadCommands();"
|
||||
onselect="this._placesView.onSelect();"
|
||||
onblur="goUpdateDownloadCommands();"/>
|
|
@ -10,3 +10,4 @@ browser.jar:
|
|||
* content/browser/downloads/contentAreaDownloadsView.xul (content/contentAreaDownloadsView.xul)
|
||||
content/browser/downloads/contentAreaDownloadsView.js (content/contentAreaDownloadsView.js)
|
||||
content/browser/downloads/contentAreaDownloadsView.css (content/contentAreaDownloadsView.css)
|
||||
content/browser/downloads/downloadsCommands.js (content/downloadsCommands.js)
|
||||
|
|
|
@ -406,7 +406,10 @@
|
|||
</treecols>
|
||||
<treechildren flex="1" onclick="ContentTree.onClick(event);"/>
|
||||
</tree>
|
||||
#include ../../downloads/content/downloadsRichListBox.inc.xul
|
||||
<richlistbox flex="1"
|
||||
seltype="multiple"
|
||||
id="downloadsRichListBox"
|
||||
context="downloadsContextMenu"/>
|
||||
</deck>
|
||||
<deck id="detailsDeck" style="height: 11em;">
|
||||
<vbox id="itemsCountBox" align="center">
|
||||
|
|
|
@ -953,6 +953,16 @@ class UrlbarInput {
|
|||
return;
|
||||
}
|
||||
this.setAttribute("breakout-extend", "true");
|
||||
|
||||
// Enable the animation only after the first extend call to ensure it
|
||||
// doesn't run when opening a new window.
|
||||
if (!this.hasAttribute("breakout-extend-animate")) {
|
||||
this.window.promiseDocumentFlushed(() => {
|
||||
this.window.requestAnimationFrame(() => {
|
||||
this.setAttribute("breakout-extend-animate", "true");
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
endLayoutExtend(force) {
|
||||
|
|
|
@ -110,8 +110,8 @@
|
|||
transition-property: width, padding-inline;
|
||||
}
|
||||
|
||||
:root[sessionrestored] #urlbar[breakout],
|
||||
:root[sessionrestored] #urlbar[breakout] > #urlbar-input-container {
|
||||
#urlbar[breakout][breakout-extend-animate],
|
||||
#urlbar[breakout][breakout-extend-animate] > #urlbar-input-container {
|
||||
transition-duration: 250ms;
|
||||
transition-timing-function: var(--animation-easing-function);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
category app-startup PushServiceParent @mozilla.org/push/Service;1 process=main
|
||||
|
||||
# For immediate loading of PushService instead of delayed loading.
|
||||
category android-push-service PushServiceParent @mozilla.org/push/Service;1 process=main
|
||||
|
|
|
@ -69,7 +69,7 @@ PushServiceBase.prototype = {
|
|||
subscriptionChangeTopic: OBSERVER_TOPIC_SUBSCRIPTION_CHANGE,
|
||||
subscriptionModifiedTopic: OBSERVER_TOPIC_SUBSCRIPTION_MODIFIED,
|
||||
|
||||
_handleReady() {},
|
||||
ensureReady() {},
|
||||
|
||||
_addListeners() {
|
||||
for (let message of this._messages) {
|
||||
|
@ -82,18 +82,9 @@ PushServiceBase.prototype = {
|
|||
},
|
||||
|
||||
observe(subject, topic, data) {
|
||||
if (topic === "app-startup") {
|
||||
Services.obs.addObserver(this, "sessionstore-windows-restored", true);
|
||||
return;
|
||||
}
|
||||
if (topic === "sessionstore-windows-restored") {
|
||||
Services.obs.removeObserver(this, "sessionstore-windows-restored");
|
||||
this._handleReady();
|
||||
return;
|
||||
}
|
||||
if (topic === "android-push-service") {
|
||||
// Load PushService immediately.
|
||||
this._handleReady();
|
||||
this.ensureReady();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -265,7 +256,7 @@ Object.assign(PushServiceParent.prototype, {
|
|||
.catch(Cu.reportError);
|
||||
},
|
||||
|
||||
_handleReady() {
|
||||
ensureReady() {
|
||||
this.service.init();
|
||||
},
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ XPCOMUtils.defineLazyGetter(this, "gDOMBundle", () =>
|
|||
|
||||
XPCOMUtils.defineLazyGlobalGetters(this, ["crypto"]);
|
||||
|
||||
const EXPORTED_SYMBOLS = ["PushCrypto", "concatArray"];
|
||||
const EXPORTED_SYMBOLS = ["PushCrypto"];
|
||||
|
||||
const UTF8 = new TextEncoder("utf-8");
|
||||
|
||||
|
@ -603,6 +603,8 @@ class aesgcm128Decoder extends OldSchemeDecoder {
|
|||
}
|
||||
|
||||
var PushCrypto = {
|
||||
concatArray,
|
||||
|
||||
generateAuthenticationSecret() {
|
||||
return crypto.getRandomValues(new Uint8Array(16));
|
||||
},
|
||||
|
|
|
@ -20,22 +20,6 @@ const { XPCOMUtils } = ChromeUtils.import(
|
|||
|
||||
var PushServiceWebSocket, PushServiceHttp2;
|
||||
|
||||
const CONNECTION_PROTOCOLS = (function() {
|
||||
if ("android" != AppConstants.MOZ_WIDGET_TOOLKIT) {
|
||||
({ PushServiceWebSocket } = ChromeUtils.import(
|
||||
"resource://gre/modules/PushServiceWebSocket.jsm"
|
||||
));
|
||||
({ PushServiceHttp2 } = ChromeUtils.import(
|
||||
"resource://gre/modules/PushServiceHttp2.jsm"
|
||||
));
|
||||
return [PushServiceWebSocket, PushServiceHttp2];
|
||||
}
|
||||
const { PushServiceAndroidGCM } = ChromeUtils.import(
|
||||
"resource://gre/modules/PushServiceAndroidGCM.jsm"
|
||||
);
|
||||
return [PushServiceAndroidGCM];
|
||||
})();
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
this,
|
||||
"gPushNotifier",
|
||||
|
@ -58,6 +42,24 @@ ChromeUtils.defineModuleGetter(
|
|||
"PushCrypto",
|
||||
"resource://gre/modules/PushCrypto.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PushServiceAndroidGCM",
|
||||
"resource://gre/modules/PushServiceAndroidGCM.jsm"
|
||||
);
|
||||
|
||||
const CONNECTION_PROTOCOLS = (function() {
|
||||
if ("android" != AppConstants.MOZ_WIDGET_TOOLKIT) {
|
||||
({ PushServiceWebSocket } = ChromeUtils.import(
|
||||
"resource://gre/modules/PushServiceWebSocket.jsm"
|
||||
));
|
||||
({ PushServiceHttp2 } = ChromeUtils.import(
|
||||
"resource://gre/modules/PushServiceHttp2.jsm"
|
||||
));
|
||||
return [PushServiceWebSocket, PushServiceHttp2];
|
||||
}
|
||||
return [PushServiceAndroidGCM];
|
||||
})();
|
||||
|
||||
const EXPORTED_SYMBOLS = ["PushService"];
|
||||
|
||||
|
@ -100,6 +102,25 @@ const CHANGING_SERVICE_EVENT = 1;
|
|||
const STOPPING_SERVICE_EVENT = 2;
|
||||
const UNINIT_EVENT = 3;
|
||||
|
||||
// Returns the backend for the given server URI.
|
||||
function getServiceForServerURI(uri) {
|
||||
// Insecure server URLs are allowed for development and testing.
|
||||
let allowInsecure = prefs.get("testing.allowInsecureServerURL");
|
||||
if (AppConstants.MOZ_WIDGET_TOOLKIT == "android") {
|
||||
if (uri.scheme == "https" || (allowInsecure && uri.scheme == "http")) {
|
||||
return CONNECTION_PROTOCOLS;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (uri.scheme == "wss" || (allowInsecure && uri.scheme == "ws")) {
|
||||
return PushServiceWebSocket;
|
||||
}
|
||||
if (uri.scheme == "https" || (allowInsecure && uri.scheme == "http")) {
|
||||
return PushServiceHttp2;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Annotates an error with an XPCOM result code. We use this helper
|
||||
* instead of `Components.Exception` because the latter can assert in
|
||||
|
@ -408,14 +429,12 @@ var PushService = {
|
|||
_findService(serverURL) {
|
||||
console.debug("findService()");
|
||||
|
||||
let uri;
|
||||
let service;
|
||||
|
||||
if (!serverURL) {
|
||||
console.warn("findService: No dom.push.serverURL found");
|
||||
return [];
|
||||
}
|
||||
|
||||
let uri;
|
||||
try {
|
||||
uri = Services.io.newURI(serverURL);
|
||||
} catch (e) {
|
||||
|
@ -427,12 +446,7 @@ var PushService = {
|
|||
return [];
|
||||
}
|
||||
|
||||
for (let connProtocol of CONNECTION_PROTOCOLS) {
|
||||
if (connProtocol.validServerURI(uri)) {
|
||||
service = connProtocol;
|
||||
break;
|
||||
}
|
||||
}
|
||||
let service = getServiceForServerURI(uri);
|
||||
return [service, uri];
|
||||
},
|
||||
|
||||
|
|
|
@ -79,25 +79,6 @@ var PushServiceAndroidGCM = {
|
|||
);
|
||||
},
|
||||
|
||||
validServerURI(serverURI) {
|
||||
if (!serverURI) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (serverURI.scheme == "https") {
|
||||
return true;
|
||||
}
|
||||
if (serverURI.scheme == "http") {
|
||||
// Allow insecure server URLs for development and testing.
|
||||
return !!prefs.get("testing.allowInsecureServerURL");
|
||||
}
|
||||
console.info(
|
||||
"Unsupported Android GCM dom.push.serverURL scheme",
|
||||
serverURI.scheme
|
||||
);
|
||||
return false;
|
||||
},
|
||||
|
||||
observe(subject, topic, data) {
|
||||
switch (topic) {
|
||||
case "nsPref:changed":
|
||||
|
|
|
@ -18,7 +18,7 @@ const { clearTimeout, setTimeout } = ChromeUtils.import(
|
|||
"resource://gre/modules/Timer.jsm"
|
||||
);
|
||||
|
||||
const { PushCrypto, concatArray } = ChromeUtils.import(
|
||||
const { PushCrypto } = ChromeUtils.import(
|
||||
"resource://gre/modules/PushCrypto.jsm"
|
||||
);
|
||||
|
||||
|
@ -157,7 +157,7 @@ PushChannelListener.prototype = {
|
|||
encryption: getHeaderField(aRequest, "Encryption"),
|
||||
encoding: getHeaderField(aRequest, "Content-Encoding"),
|
||||
};
|
||||
let msg = concatArray(this._message);
|
||||
let msg = PushCrypto.concatArray(this._message);
|
||||
|
||||
this._mainListener._pushService._pushChannelOnStop(
|
||||
this._mainListener.uri,
|
||||
|
@ -425,13 +425,6 @@ var PushServiceHttp2 = {
|
|||
return this._mainPushService !== null;
|
||||
},
|
||||
|
||||
validServerURI(serverURI) {
|
||||
if (serverURI.scheme == "http") {
|
||||
return !!prefs.getBoolPref("testing.allowInsecureServerURL", false);
|
||||
}
|
||||
return serverURI.scheme == "https";
|
||||
},
|
||||
|
||||
async connect(broadcastListeners) {
|
||||
let subscriptions = await this._mainPushService.getAllUnexpired();
|
||||
this.startConnections(subscriptions);
|
||||
|
|
|
@ -254,13 +254,6 @@ var PushServiceWebSocket = {
|
|||
}
|
||||
},
|
||||
|
||||
validServerURI(serverURI) {
|
||||
if (serverURI.scheme == "ws") {
|
||||
return !!prefs.get("testing.allowInsecureServerURL");
|
||||
}
|
||||
return serverURI.scheme == "wss";
|
||||
},
|
||||
|
||||
get _UAID() {
|
||||
return prefs.get("userAgentID");
|
||||
},
|
||||
|
|
|
@ -1,211 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const { PushDB, PushService, PushServiceHttp2 } = serviceExports;
|
||||
|
||||
var serverPort = -1;
|
||||
|
||||
function run_test() {
|
||||
serverPort = getTestServerPort();
|
||||
|
||||
do_get_profile();
|
||||
setPrefs({
|
||||
"testing.allowInsecureServerURL": true,
|
||||
});
|
||||
// Set to allow the cert presented by our H2 server
|
||||
var oldPref = Services.prefs.getIntPref(
|
||||
"network.http.speculative-parallel-limit"
|
||||
);
|
||||
Services.prefs.setIntPref("network.http.speculative-parallel-limit", 0);
|
||||
Services.prefs.setBoolPref("dom.push.enabled", true);
|
||||
Services.prefs.setBoolPref("dom.push.connection.enabled", true);
|
||||
|
||||
trustHttp2CA();
|
||||
|
||||
Services.prefs.setIntPref("network.http.speculative-parallel-limit", oldPref);
|
||||
|
||||
run_next_test();
|
||||
}
|
||||
|
||||
add_task(async function test_pushNotifications() {
|
||||
// /pushNotifications/subscription1 will send a message with no rs and padding
|
||||
// length 1.
|
||||
// /pushNotifications/subscription2 will send a message with no rs and padding
|
||||
// length 16.
|
||||
// /pushNotifications/subscription3 will send a message with rs equal 24 and
|
||||
// padding length 16.
|
||||
// /pushNotifications/subscription4 will send a message with no rs and padding
|
||||
// length 256.
|
||||
|
||||
let db = PushServiceHttp2.newPushDB();
|
||||
registerCleanupFunction(() => {
|
||||
return db.drop().then(_ => db.close());
|
||||
});
|
||||
|
||||
var serverURL = "https://localhost:" + serverPort;
|
||||
|
||||
let records = [
|
||||
{
|
||||
subscriptionUri: serverURL + "/pushNotifications/subscription1",
|
||||
pushEndpoint: serverURL + "/pushEndpoint1",
|
||||
pushReceiptEndpoint: serverURL + "/pushReceiptEndpoint1",
|
||||
scope: "https://example.com/page/1",
|
||||
p256dhPublicKey:
|
||||
"BPCd4gNQkjwRah61LpdALdzZKLLnU5UAwDztQ5_h0QsT26jk0IFbqcK6-JxhHAm-rsHEwy0CyVJjtnfOcqc1tgA",
|
||||
p256dhPrivateKey: {
|
||||
crv: "P-256",
|
||||
d: "1jUPhzVsRkzV0vIzwL4ZEsOlKdNOWm7TmaTfzitJkgM",
|
||||
ext: true,
|
||||
key_ops: ["deriveBits"],
|
||||
kty: "EC",
|
||||
x: "8J3iA1CSPBFqHrUul0At3NkosudTlQDAPO1Dn-HRCxM",
|
||||
y: "26jk0IFbqcK6-JxhHAm-rsHEwy0CyVJjtnfOcqc1tgA",
|
||||
},
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
quota: Infinity,
|
||||
systemRecord: true,
|
||||
},
|
||||
{
|
||||
subscriptionUri: serverURL + "/pushNotifications/subscription2",
|
||||
pushEndpoint: serverURL + "/pushEndpoint2",
|
||||
pushReceiptEndpoint: serverURL + "/pushReceiptEndpoint2",
|
||||
scope: "https://example.com/page/2",
|
||||
p256dhPublicKey:
|
||||
"BPnWyUo7yMnuMlyKtERuLfWE8a09dtdjHSW2lpC9_BqR5TZ1rK8Ldih6ljyxVwnBA-nygQHGRpEmu1jV5K8437E",
|
||||
p256dhPrivateKey: {
|
||||
crv: "P-256",
|
||||
d: "lFm4nPsUKYgNGBJb5nXXKxl8bspCSp0bAhCYxbveqT4",
|
||||
ext: true,
|
||||
key_ops: ["deriveBits"],
|
||||
kty: "EC",
|
||||
x: "-dbJSjvIye4yXIq0RG4t9YTxrT1212MdJbaWkL38GpE",
|
||||
y: "5TZ1rK8Ldih6ljyxVwnBA-nygQHGRpEmu1jV5K8437E",
|
||||
},
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
quota: Infinity,
|
||||
systemRecord: true,
|
||||
},
|
||||
{
|
||||
subscriptionUri: serverURL + "/pushNotifications/subscription3",
|
||||
pushEndpoint: serverURL + "/pushEndpoint3",
|
||||
pushReceiptEndpoint: serverURL + "/pushReceiptEndpoint3",
|
||||
scope: "https://example.com/page/3",
|
||||
p256dhPublicKey:
|
||||
"BDhUHITSeVrWYybFnb7ylVTCDDLPdQWMpf8gXhcWwvaaJa6n3YH8TOcH8narDF6t8mKVvg2ioLW-8MH5O4dzGcI",
|
||||
p256dhPrivateKey: {
|
||||
crv: "P-256",
|
||||
d: "Q1_SE1NySTYzjbqgWwPgrYh7XRg3adqZLkQPsy319G8",
|
||||
ext: true,
|
||||
key_ops: ["deriveBits"],
|
||||
kty: "EC",
|
||||
x: "OFQchNJ5WtZjJsWdvvKVVMIMMs91BYyl_yBeFxbC9po",
|
||||
y: "Ja6n3YH8TOcH8narDF6t8mKVvg2ioLW-8MH5O4dzGcI",
|
||||
},
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
quota: Infinity,
|
||||
systemRecord: true,
|
||||
},
|
||||
{
|
||||
subscriptionUri: serverURL + "/pushNotifications/subscription4",
|
||||
pushEndpoint: serverURL + "/pushEndpoint4",
|
||||
pushReceiptEndpoint: serverURL + "/pushReceiptEndpoint4",
|
||||
scope: "https://example.com/page/4",
|
||||
p256dhPublicKey: ChromeUtils.base64URLDecode(
|
||||
"BEcvDzkWCrUtjU_wygL98sbQCQrW1lY9irtgGnlCc4B0JJXLCHB9MTM73qD6GZYfL0YOvKo8XLOflh-J4dMGklU",
|
||||
{
|
||||
padding: "reject",
|
||||
}
|
||||
),
|
||||
p256dhPrivateKey: {
|
||||
crv: "P-256",
|
||||
d: "fWi7tZaX0Pk6WnLrjQ3kiRq_g5XStL5pdH4pllNCqXw",
|
||||
ext: true,
|
||||
key_ops: ["deriveBits"],
|
||||
kty: "EC",
|
||||
x: "Ry8PORYKtS2NT_DKAv3yxtAJCtbWVj2Ku2AaeUJzgHQ",
|
||||
y: "JJXLCHB9MTM73qD6GZYfL0YOvKo8XLOflh-J4dMGklU",
|
||||
},
|
||||
authenticationSecret: ChromeUtils.base64URLDecode(
|
||||
"cwDVC1iwAn8E37mkR3tMSg",
|
||||
{
|
||||
padding: "reject",
|
||||
}
|
||||
),
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
quota: Infinity,
|
||||
systemRecord: true,
|
||||
},
|
||||
];
|
||||
|
||||
for (let record of records) {
|
||||
await db.put(record);
|
||||
}
|
||||
|
||||
let notifyPromise = Promise.all([
|
||||
promiseObserverNotification(PushServiceComponent.pushTopic, function(
|
||||
subject,
|
||||
data
|
||||
) {
|
||||
var message = subject.QueryInterface(Ci.nsIPushMessage).data;
|
||||
if (message && data == "https://example.com/page/1") {
|
||||
equal(message.text(), "Some message", "decoded message is incorrect");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}),
|
||||
promiseObserverNotification(PushServiceComponent.pushTopic, function(
|
||||
subject,
|
||||
data
|
||||
) {
|
||||
var message = subject.QueryInterface(Ci.nsIPushMessage).data;
|
||||
if (message && data == "https://example.com/page/2") {
|
||||
equal(message.text(), "Some message", "decoded message is incorrect");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}),
|
||||
promiseObserverNotification(PushServiceComponent.pushTopic, function(
|
||||
subject,
|
||||
data
|
||||
) {
|
||||
var message = subject.QueryInterface(Ci.nsIPushMessage).data;
|
||||
if (message && data == "https://example.com/page/3") {
|
||||
equal(message.text(), "Some message", "decoded message is incorrect");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}),
|
||||
promiseObserverNotification(PushServiceComponent.pushTopic, function(
|
||||
subject,
|
||||
data
|
||||
) {
|
||||
var message = subject.QueryInterface(Ci.nsIPushMessage).data;
|
||||
if (message && data == "https://example.com/page/4") {
|
||||
equal(
|
||||
message.text(),
|
||||
"Yet another message",
|
||||
"decoded message is incorrect"
|
||||
);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}),
|
||||
]);
|
||||
|
||||
PushService.init({
|
||||
serverURI: serverURL,
|
||||
db,
|
||||
});
|
||||
|
||||
await notifyPromise;
|
||||
});
|
|
@ -1,212 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const { PushDB, PushService, PushServiceHttp2 } = serviceExports;
|
||||
|
||||
var serverURL;
|
||||
|
||||
var serverPort = -1;
|
||||
|
||||
function run_test() {
|
||||
serverPort = getTestServerPort();
|
||||
|
||||
do_get_profile();
|
||||
|
||||
serverURL = "https://localhost:" + serverPort;
|
||||
|
||||
run_next_test();
|
||||
}
|
||||
|
||||
// Connection will fail because of the certificates.
|
||||
add_task(async function test_pushSubscriptionNoConnection() {
|
||||
let db = PushServiceHttp2.newPushDB();
|
||||
registerCleanupFunction(() => {
|
||||
return db.drop().then(_ => db.close());
|
||||
});
|
||||
|
||||
PushService.init({
|
||||
serverURI: serverURL + "/pushSubscriptionNoConnection/subscribe",
|
||||
db,
|
||||
});
|
||||
|
||||
await Assert.rejects(
|
||||
PushService.register({
|
||||
scope: "https://example.net/page/invalid-response",
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
}),
|
||||
/Registration error/,
|
||||
"Expected error for not being able to establish connecion."
|
||||
);
|
||||
|
||||
let record = await db.getAllKeyIDs();
|
||||
ok(
|
||||
record.length === 0,
|
||||
"Should not store records when connection couldn't be established."
|
||||
);
|
||||
PushService.uninit();
|
||||
});
|
||||
|
||||
add_task(async function test_TLS() {
|
||||
// Set to allow the cert presented by our H2 server
|
||||
var oldPref = Services.prefs.getIntPref(
|
||||
"network.http.speculative-parallel-limit"
|
||||
);
|
||||
Services.prefs.setIntPref("network.http.speculative-parallel-limit", 0);
|
||||
|
||||
trustHttp2CA();
|
||||
|
||||
Services.prefs.setIntPref("network.http.speculative-parallel-limit", oldPref);
|
||||
});
|
||||
|
||||
add_task(async function test_pushSubscriptionMissingLocation() {
|
||||
let db = PushServiceHttp2.newPushDB();
|
||||
registerCleanupFunction(() => {
|
||||
return db.drop().then(_ => db.close());
|
||||
});
|
||||
|
||||
PushService.init({
|
||||
serverURI: serverURL + "/pushSubscriptionMissingLocation/subscribe",
|
||||
db,
|
||||
});
|
||||
|
||||
await Assert.rejects(
|
||||
PushService.register({
|
||||
scope: "https://example.net/page/invalid-response",
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
}),
|
||||
/Registration error/,
|
||||
"Expected error for the missing location header."
|
||||
);
|
||||
|
||||
let record = await db.getAllKeyIDs();
|
||||
ok(
|
||||
record.length === 0,
|
||||
"Should not store records when the location header is missing."
|
||||
);
|
||||
PushService.uninit();
|
||||
});
|
||||
|
||||
add_task(async function test_pushSubscriptionMissingLink() {
|
||||
let db = PushServiceHttp2.newPushDB();
|
||||
registerCleanupFunction(() => {
|
||||
return db.drop().then(_ => db.close());
|
||||
});
|
||||
|
||||
PushService.init({
|
||||
serverURI: serverURL + "/pushSubscriptionMissingLink/subscribe",
|
||||
db,
|
||||
});
|
||||
|
||||
await Assert.rejects(
|
||||
PushService.register({
|
||||
scope: "https://example.net/page/invalid-response",
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
}),
|
||||
/Registration error/,
|
||||
"Expected error for the missing link header."
|
||||
);
|
||||
|
||||
let record = await db.getAllKeyIDs();
|
||||
ok(
|
||||
record.length === 0,
|
||||
"Should not store records when a link header is missing."
|
||||
);
|
||||
PushService.uninit();
|
||||
});
|
||||
|
||||
add_task(async function test_pushSubscriptionMissingLink1() {
|
||||
let db = PushServiceHttp2.newPushDB();
|
||||
registerCleanupFunction(() => {
|
||||
return db.drop().then(_ => db.close());
|
||||
});
|
||||
|
||||
PushService.init({
|
||||
serverURI: serverURL + "/pushSubscriptionMissingLink1/subscribe",
|
||||
db,
|
||||
});
|
||||
|
||||
await Assert.rejects(
|
||||
PushService.register({
|
||||
scope: "https://example.net/page/invalid-response",
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
}),
|
||||
/Registration error/,
|
||||
"Expected error for the missing push endpoint."
|
||||
);
|
||||
|
||||
let record = await db.getAllKeyIDs();
|
||||
ok(
|
||||
record.length === 0,
|
||||
"Should not store records when the push endpoint is missing."
|
||||
);
|
||||
PushService.uninit();
|
||||
});
|
||||
|
||||
add_task(async function test_pushSubscriptionLocationBogus() {
|
||||
let db = PushServiceHttp2.newPushDB();
|
||||
registerCleanupFunction(() => {
|
||||
return db.drop().then(_ => db.close());
|
||||
});
|
||||
|
||||
PushService.init({
|
||||
serverURI: serverURL + "/pushSubscriptionLocationBogus/subscribe",
|
||||
db,
|
||||
});
|
||||
|
||||
await Assert.rejects(
|
||||
PushService.register({
|
||||
scope: "https://example.net/page/invalid-response",
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
}),
|
||||
/Registration error/,
|
||||
"Expected error for the bogus location"
|
||||
);
|
||||
|
||||
let record = await db.getAllKeyIDs();
|
||||
ok(
|
||||
record.length === 0,
|
||||
"Should not store records when location header is bogus."
|
||||
);
|
||||
PushService.uninit();
|
||||
});
|
||||
|
||||
add_task(async function test_pushSubscriptionNot2xxCode() {
|
||||
let db = PushServiceHttp2.newPushDB();
|
||||
registerCleanupFunction(() => {
|
||||
return db.drop().then(_ => db.close());
|
||||
});
|
||||
|
||||
PushService.init({
|
||||
serverURI: serverURL + "/pushSubscriptionNot201Code/subscribe",
|
||||
db,
|
||||
});
|
||||
|
||||
await Assert.rejects(
|
||||
PushService.register({
|
||||
scope: "https://example.net/page/invalid-response",
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
}),
|
||||
/Registration error/,
|
||||
"Expected error for not 201 responce code."
|
||||
);
|
||||
|
||||
let record = await db.getAllKeyIDs();
|
||||
ok(
|
||||
record.length === 0,
|
||||
"Should not store records when respons code is not 201."
|
||||
);
|
||||
});
|
|
@ -1,157 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const { PushDB, PushService, PushServiceHttp2 } = serviceExports;
|
||||
|
||||
var serverURL;
|
||||
var serverPort = -1;
|
||||
var pushEnabled;
|
||||
var pushConnectionEnabled;
|
||||
var db;
|
||||
|
||||
function run_test() {
|
||||
serverPort = getTestServerPort();
|
||||
|
||||
do_get_profile();
|
||||
pushEnabled = Services.prefs.getBoolPref("dom.push.enabled");
|
||||
pushConnectionEnabled = Services.prefs.getBoolPref(
|
||||
"dom.push.connection.enabled"
|
||||
);
|
||||
|
||||
// Set to allow the cert presented by our H2 server
|
||||
var oldPref = Services.prefs.getIntPref(
|
||||
"network.http.speculative-parallel-limit"
|
||||
);
|
||||
Services.prefs.setIntPref("network.http.speculative-parallel-limit", 0);
|
||||
Services.prefs.setBoolPref("dom.push.enabled", true);
|
||||
Services.prefs.setBoolPref("dom.push.connection.enabled", true);
|
||||
|
||||
trustHttp2CA();
|
||||
|
||||
Services.prefs.setIntPref("network.http.speculative-parallel-limit", oldPref);
|
||||
|
||||
serverURL = "https://localhost:" + serverPort;
|
||||
|
||||
run_next_test();
|
||||
}
|
||||
|
||||
add_task(async function test_setup() {
|
||||
db = PushServiceHttp2.newPushDB();
|
||||
registerCleanupFunction(() => {
|
||||
return db.drop().then(_ => db.close());
|
||||
});
|
||||
});
|
||||
|
||||
add_task(async function test_pushSubscriptionSuccess() {
|
||||
PushService.init({
|
||||
serverURI: serverURL + "/pushSubscriptionSuccess/subscribe",
|
||||
db,
|
||||
});
|
||||
|
||||
let newRecord = await PushService.register({
|
||||
scope: "https://example.org/1",
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
});
|
||||
|
||||
var subscriptionUri = serverURL + "/pushSubscriptionSuccesss";
|
||||
var pushEndpoint = serverURL + "/pushEndpointSuccess";
|
||||
var pushReceiptEndpoint = serverURL + "/receiptPushEndpointSuccess";
|
||||
equal(
|
||||
newRecord.endpoint,
|
||||
pushEndpoint,
|
||||
"Wrong push endpoint in registration record"
|
||||
);
|
||||
|
||||
equal(
|
||||
newRecord.pushReceiptEndpoint,
|
||||
pushReceiptEndpoint,
|
||||
"Wrong push endpoint receipt in registration record"
|
||||
);
|
||||
|
||||
let record = await db.getByKeyID(subscriptionUri);
|
||||
equal(
|
||||
record.subscriptionUri,
|
||||
subscriptionUri,
|
||||
"Wrong subscription ID in database record"
|
||||
);
|
||||
equal(
|
||||
record.pushEndpoint,
|
||||
pushEndpoint,
|
||||
"Wrong push endpoint in database record"
|
||||
);
|
||||
equal(
|
||||
record.pushReceiptEndpoint,
|
||||
pushReceiptEndpoint,
|
||||
"Wrong push endpoint receipt in database record"
|
||||
);
|
||||
equal(
|
||||
record.scope,
|
||||
"https://example.org/1",
|
||||
"Wrong scope in database record"
|
||||
);
|
||||
|
||||
PushService.uninit();
|
||||
});
|
||||
|
||||
add_task(async function test_pushSubscriptionMissingLink2() {
|
||||
PushService.init({
|
||||
serverURI: serverURL + "/pushSubscriptionMissingLink2/subscribe",
|
||||
db,
|
||||
});
|
||||
|
||||
let newRecord = await PushService.register({
|
||||
scope: "https://example.org/no_receiptEndpoint",
|
||||
originAttributes: ChromeUtils.originAttributesToSuffix({
|
||||
inIsolatedMozBrowser: false,
|
||||
}),
|
||||
});
|
||||
|
||||
var subscriptionUri = serverURL + "/subscriptionMissingLink2";
|
||||
var pushEndpoint = serverURL + "/pushEndpointMissingLink2";
|
||||
var pushReceiptEndpoint = "";
|
||||
equal(
|
||||
newRecord.endpoint,
|
||||
pushEndpoint,
|
||||
"Wrong push endpoint in registration record"
|
||||
);
|
||||
|
||||
equal(
|
||||
newRecord.pushReceiptEndpoint,
|
||||
pushReceiptEndpoint,
|
||||
"Wrong push endpoint receipt in registration record"
|
||||
);
|
||||
|
||||
let record = await db.getByKeyID(subscriptionUri);
|
||||
equal(
|
||||
record.subscriptionUri,
|
||||
subscriptionUri,
|
||||
"Wrong subscription ID in database record"
|
||||
);
|
||||
equal(
|
||||
record.pushEndpoint,
|
||||
pushEndpoint,
|
||||
"Wrong push endpoint in database record"
|
||||
);
|
||||
equal(
|
||||
record.pushReceiptEndpoint,
|
||||
pushReceiptEndpoint,
|
||||
"Wrong push endpoint receipt in database record"
|
||||
);
|
||||
equal(
|
||||
record.scope,
|
||||
"https://example.org/no_receiptEndpoint",
|
||||
"Wrong scope in database record"
|
||||
);
|
||||
});
|
||||
|
||||
add_task(async function test_complete() {
|
||||
Services.prefs.setBoolPref("dom.push.enabled", pushEnabled);
|
||||
Services.prefs.setBoolPref(
|
||||
"dom.push.connection.enabled",
|
||||
pushConnectionEnabled
|
||||
);
|
||||
});
|
|
@ -63,42 +63,6 @@ skip-if = os == "linux" # Bug 1265233
|
|||
[test_resubscribe_listening_for_msg_error_http2.js]
|
||||
[test_register_5xxCode_http2.js]
|
||||
[test_updateRecordNoEncryptionKeys_http2.js]
|
||||
[test_register_success_http2.js]
|
||||
# This used to be hasNode, but that caused too many issues with tests being
|
||||
# silently disabled, so now we explicitly call out the platforms not known
|
||||
# to have node installed.
|
||||
skip-if = os == "android"
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_register_error_http2.js]
|
||||
# This used to be hasNode, but that caused too many issues with tests being
|
||||
# silently disabled, so now we explicitly call out the platforms not known
|
||||
# to have node installed.
|
||||
skip-if = os == "android"
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_unregister_success_http2.js]
|
||||
# This used to be hasNode, but that caused too many issues with tests being
|
||||
# silently disabled, so now we explicitly call out the platforms not known
|
||||
# to have node installed.
|
||||
skip-if = os == "android"
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_notification_http2.js]
|
||||
# This used to be hasNode, but that caused too many issues with tests being
|
||||
# silently disabled, so now we explicitly call out the platforms not known
|
||||
# to have node installed.
|
||||
skip-if = os == "android"
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_registration_success_http2.js]
|
||||
# This used to be hasNode, but that caused too many issues with tests being
|
||||
# silently disabled, so now we explicitly call out the platforms not known
|
||||
# to have node installed.
|
||||
skip-if = os == "android"
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_registration_error_http2.js]
|
||||
# This used to be hasNode, but that caused too many issues with tests being
|
||||
# silently disabled, so now we explicitly call out the platforms not known
|
||||
# to have node installed.
|
||||
skip-if = os == "android"
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
[test_clearAll_successful.js]
|
||||
# This used to be hasNode, but that caused too many issues with tests being
|
||||
# silently disabled, so now we explicitly call out the platforms not known
|
||||
|
|
|
@ -466,8 +466,6 @@ void nsContentSecurityUtils::AssertAboutPageHasCSP(Document* aDocument) {
|
|||
NS_LITERAL_CSTRING("about:sync-log"),
|
||||
// about:printpreview displays plain text only -> no CSP
|
||||
NS_LITERAL_CSTRING("about:printpreview"),
|
||||
// Bug 1497200: Apply Meta CSP to about:downloads
|
||||
NS_LITERAL_CSTRING("about:downloads"),
|
||||
# if defined(ANDROID)
|
||||
NS_LITERAL_CSTRING("about:config"),
|
||||
# endif
|
||||
|
|
|
@ -23,6 +23,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=629172
|
|||
/** Test for Bug 629172 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(async function() {
|
||||
dump("\n\n XXX TEST STARTS HERE \n\n");
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["test.events.async.enabled", true]],
|
||||
});
|
||||
|
|
|
@ -23,19 +23,7 @@ using namespace mozilla::layers;
|
|||
ProfilerScreenshots::ProfilerScreenshots()
|
||||
: mMutex("ProfilerScreenshots::mMutex"), mLiveSurfaceCount(0) {}
|
||||
|
||||
ProfilerScreenshots::~ProfilerScreenshots() {
|
||||
if (mThread) {
|
||||
// Shut down mThread. Do the actual shutdown on the main thread, because it
|
||||
// has to happen on an XPCOM thread, and ~ProfilerScreenshots() may not be
|
||||
// running on an XPCOM thread - it usually runs on the Compositor thread
|
||||
// which is a chromium thread.
|
||||
SystemGroup::Dispatch(
|
||||
TaskCategory::Other,
|
||||
NewRunnableMethod("ProfilerScreenshots::~ProfilerScreenshots", mThread,
|
||||
&nsIThread::AsyncShutdown));
|
||||
mThread = nullptr;
|
||||
}
|
||||
}
|
||||
ProfilerScreenshots::~ProfilerScreenshots() {}
|
||||
|
||||
/* static */
|
||||
bool ProfilerScreenshots::IsEnabled() {
|
||||
|
@ -68,18 +56,6 @@ void ProfilerScreenshots::SubmitScreenshot(
|
|||
return;
|
||||
}
|
||||
|
||||
if (!mThread) {
|
||||
nsresult rv = NS_NewNamedThread("ProfScreenshot", getter_AddRefs(mThread));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
PROFILER_ADD_MARKER(
|
||||
"NoCompositorScreenshot because ProfilerScreenshots thread creation "
|
||||
"failed",
|
||||
DOM);
|
||||
ReturnSurface(backingSurface);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int sourceThread = profiler_current_thread_id();
|
||||
uintptr_t windowIdentifier = aWindowIdentifier;
|
||||
IntSize originalSize = aOriginalSize;
|
||||
|
@ -88,7 +64,7 @@ void ProfilerScreenshots::SubmitScreenshot(
|
|||
|
||||
RefPtr<ProfilerScreenshots> self = this;
|
||||
|
||||
mThread->Dispatch(NS_NewRunnableFunction(
|
||||
NS_DispatchToBackgroundThread(NS_NewRunnableFunction(
|
||||
"ProfilerScreenshots::SubmitScreenshot",
|
||||
[self{std::move(self)}, backingSurface, sourceThread, windowIdentifier,
|
||||
originalSize, scaledSize, timeStamp]() {
|
||||
|
|
|
@ -95,8 +95,6 @@ class ProfilerScreenshots final {
|
|||
*/
|
||||
void ReturnSurface(gfx::DataSourceSurface* aSurface);
|
||||
|
||||
// The thread on which encoding happens.
|
||||
nsCOMPtr<nsIThread> mThread;
|
||||
// An array of surfaces ready to be recycled. Can be accessed from multiple
|
||||
// threads, protected by mMutex.
|
||||
nsTArray<RefPtr<gfx::DataSourceSurface>> mAvailableSurfaces;
|
||||
|
|
|
@ -1,37 +1,63 @@
|
|||
This directory contains files used in gecko builds from FFmpeg
|
||||
(http://ffmpeg.org). The current files are from FFmpeg as of
|
||||
revision n4.0.2-6-g2be51cbeea
|
||||
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
|
||||
git checkout n4.0.2-6-g2be51cbeea
|
||||
|
||||
All source files match their path from the library's source archive.
|
||||
|
||||
Currently, we only use the vp8 and vp9 portion of the library, and only on x86
|
||||
based platforms. If this changes, configuration files will most likely
|
||||
need to be updated.
|
||||
Currently, we only use the vp8, vp9, mp3, and flac portion of the library. If
|
||||
this changes, configuration files will most likely need to be updated.
|
||||
|
||||
AVX2 must be disabled on Linux 32 bits due to the use of yasm 1.1 on the build bots.
|
||||
Once yasm is upgraded to 1.2 or later, AVX2 code could be re-enabled.
|
||||
Add --disable-avx2 to configure on those platforms.
|
||||
|
||||
configuration files were generated as follow using the configure script:
|
||||
./configure --disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --disable-cuvid --disable-cuda
|
||||
./configure --disable-everything --disable-protocols --disable-demuxers \
|
||||
--disable-muxers --disable-filters --disable-programs \
|
||||
--disable-doc --disable-parsers --enable-parser=vp8 \
|
||||
--enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 \
|
||||
--disable-static --enable-shared --disable-debug --disable-sdl2 \
|
||||
--disable-libxcb --disable-securetransport --disable-iconv \
|
||||
--disable-swresample --disable-swscale --disable-avdevice \
|
||||
--disable-avfilter --disable-avformat --disable-d3d11va \
|
||||
--disable-dxva2 --disable-vaapi --disable-vdpau \
|
||||
--disable-videotoolbox --enable-decoder=flac --enable-asm \
|
||||
--enable-x86asm --disable-cuda --disable-cuvid \
|
||||
--enable-decoder=mp3
|
||||
|
||||
config*:
|
||||
replace: /HAVE_(MALLOC_H|ARC4RANDOM|LOCALTIME_R|MEMALIGN|POSIX_MEMALIGN)/d
|
||||
# sed -i bak -E '/HAVE_(MALLOC_H|ARC4RANDOM|LOCALTIME_R|MEMALIGN|POSIX_MEMALIGN)/d' config.h
|
||||
|
||||
config_unix32.h:
|
||||
add to configure command: --disable-asm --disable-x86asm --cc='clang -m32'
|
||||
|
||||
config_android.h:
|
||||
./configure --disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --disable-asm --disable-cuvid --disable-cuda --cross-prefix=~/.mozbuild/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --target-os=linux --arch=arm --enable-cross-compile --sysroot=~/.mozbuild/android-ndk-r15c/platforms/android-24/arch-arm
|
||||
config_android32.h:
|
||||
./configure --disable-everything --disable-protocols --disable-demuxers \
|
||||
--disable-muxers --disable-filters --disable-programs \
|
||||
--disable-doc --disable-parsers --disable-static --enable-shared \
|
||||
--disable-debug --disable-sdl2 --disable-libxcb \
|
||||
--disable-securetransport --disable-iconv --disable-swresample \
|
||||
--disable-swscale --disable-avdevice --disable-avfilter \
|
||||
--disable-avformat --disable-d3d11va --disable-dxva2 \
|
||||
--disable-vaapi --disable-vdpau --disable-videotoolbox \
|
||||
--enable-decoder=flac --disable-asm --disable-cuvid --disable-cuda \
|
||||
--cross-prefix=~/.mozbuild/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi- \
|
||||
--target-os=linux --arch=arm --enable-cross-compile \
|
||||
--sysroot=~/.mozbuild/android-ndk-r15c/platforms/android-24/arch-arm \
|
||||
--enable-decoder=mp3
|
||||
|
||||
config_unix32.h/config_unix64.h/config_unix64.asm:
|
||||
replace: s/HAVE_SYSCTL 1/HAVE_SYSCTL 0
|
||||
|
||||
config_win32/64.h/asm:
|
||||
config_win{32|64}.{h|asm}:
|
||||
add to configure command: --toolchain=msvc
|
||||
|
||||
Regenerate defaults_disabled.{h,asm} with:
|
||||
$ grep -E ".*_(INDEV|OUTDEV|DECODER|ENCODER|DEMUXER|MUXER|PARSER|FILTER|HWACCEL|PROTOCOL|ENCODERS|DECODERS|HWACCELS|INDEVS|OUTDEVS|FILTERS|DEMUXERS|MUXERS|PROTOCOLS|BSF) 0" config.h | sort -u > ~/Work/Mozilla/mozilla-central/media/ffvpx/defaults_disabled.h
|
||||
$ grep -E ".*_(INDEV|OUTDEV|DECODER|ENCODER|DEMUXER|MUXER|PARSER|FILTER|HWACCEL|PROTOCOL|ENCODERS|DECODERS|HWACCELS|INDEVS|OUTDEVS|FILTERS|DEMUXERS|MUXERS|PROTOCOLS|BSF) 0" config.asm | sort -u > ~/Work/Mozilla/mozilla-central/media/ffvpx/defaults_disabled.asm
|
||||
$ grep -E ".*_(INDEV|OUTDEV|DECODER|ENCODER|DEMUXER|MUXER|PARSER|FILTER|HWACCEL|PROTOCOL|ENCODERS|DECODERS|HWACCELS|INDEVS|OUTDEVS|FILTERS|DEMUXERS|MUXERS|PROTOCOLS|BSF) 0" config.h | sort -d -u > ~/Work/Mozilla/mozilla-central/media/ffvpx/defaults_disabled.h
|
||||
$ grep -E ".*_(INDEV|OUTDEV|DECODER|ENCODER|DEMUXER|MUXER|PARSER|FILTER|HWACCEL|PROTOCOL|ENCODERS|DECODERS|HWACCELS|INDEVS|OUTDEVS|FILTERS|DEMUXERS|MUXERS|PROTOCOLS|BSF) 0" config.asm | sort -d -u > ~/Work/Mozilla/mozilla-central/media/ffvpx/defaults_disabled.asm
|
||||
|
||||
The GNU comm utility is a useful tool to compare and extract only the changes.
|
||||
|
||||
|
|
|
@ -6,46 +6,49 @@
|
|||
|
||||
#ifndef MOZ_FFVPX_CONFIG_H
|
||||
#define MOZ_FFVPX_CONFIG_H
|
||||
#if defined(MOZ_FFVPX_FLACONLY)
|
||||
#if defined(MOZ_WIDGET_ANDROID) && defined(__arm__)
|
||||
#include "config_android32.h"
|
||||
#else
|
||||
#include "config_flac.h"
|
||||
#endif
|
||||
#else // MOZ_FFVPX_FLACONLY
|
||||
#if defined(XP_WIN)
|
||||
|
||||
#if defined(MOZ_FFVPX_AUDIOONLY)
|
||||
# if defined(MOZ_WIDGET_ANDROID) && defined(__arm__)
|
||||
# include "config_android32.h"
|
||||
# else
|
||||
# include "config_audio.h"
|
||||
# endif
|
||||
#else // MOZ_FFVPX_AUDIOONLY
|
||||
# if defined(XP_WIN)
|
||||
// Avoid conflicts with mozilla-config.h
|
||||
#if !defined(_MSC_VER)
|
||||
#undef HAVE_DIRENT_H
|
||||
#undef HAVE_UNISTD_H
|
||||
#endif
|
||||
#if defined(_ARM64_)
|
||||
#include "config_aarch64_win64.h"
|
||||
#else
|
||||
#if defined(HAVE_64BIT_BUILD)
|
||||
#include "config_win64.h"
|
||||
#else
|
||||
#include "config_win32.h"
|
||||
#endif
|
||||
#endif
|
||||
# if !defined(_MSC_VER)
|
||||
# undef HAVE_DIRENT_H
|
||||
# undef HAVE_UNISTD_H
|
||||
# endif
|
||||
# if defined(_ARM64_)
|
||||
# include "config_aarch64_win64.h"
|
||||
# else
|
||||
# if defined(HAVE_64BIT_BUILD)
|
||||
# include "config_win64.h"
|
||||
# else
|
||||
# include "config_win32.h"
|
||||
# endif
|
||||
# endif
|
||||
// Adjust configure defines for GCC
|
||||
#if !defined(_MSC_VER)
|
||||
#if !defined(HAVE_64BIT_BUILD)
|
||||
#undef HAVE_MM_EMPTY
|
||||
#define HAVE_MM_EMPTY 0
|
||||
#endif
|
||||
#undef HAVE_LIBC_MSVCRT
|
||||
#define HAVE_LIBC_MSVCRT 0
|
||||
#endif
|
||||
#elif defined(XP_DARWIN)
|
||||
#include "config_darwin64.h"
|
||||
#elif defined(XP_UNIX)
|
||||
#if defined(HAVE_64BIT_BUILD)
|
||||
#include "config_unix64.h"
|
||||
#else
|
||||
#include "config_unix32.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif // else MOZ_FFVPX_FLACONLY
|
||||
# if !defined(_MSC_VER)
|
||||
# if !defined(HAVE_64BIT_BUILD)
|
||||
# undef HAVE_MM_EMPTY
|
||||
# define HAVE_MM_EMPTY 0
|
||||
# endif
|
||||
# undef HAVE_LIBC_MSVCRT
|
||||
# define HAVE_LIBC_MSVCRT 0
|
||||
# endif
|
||||
# elif defined(XP_DARWIN)
|
||||
# include "config_darwin64.h"
|
||||
# elif defined(XP_UNIX)
|
||||
# if defined(HAVE_64BIT_BUILD)
|
||||
# include "config_unix64.h"
|
||||
# else
|
||||
# include "config_unix32.h"
|
||||
# endif
|
||||
# endif
|
||||
#endif // else MOZ_FFVPX_AUDIOONLY
|
||||
|
||||
#include "config_common.h"
|
||||
#endif // MOZ_FFVPX_CONFIG_H
|
||||
|
||||
#endif // MOZ_FFVPX_CONFIG_H
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Automatically generated by configure - do not modify! */
|
||||
#ifndef FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --toolchain=msvc --disable-cuda --disable-cuvid"
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --toolchain=msvc --disable-cuda --disable-cuvid --enable-decoder=mp3"
|
||||
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
|
||||
#define CONFIG_THIS_YEAR 2018
|
||||
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
|
||||
|
@ -544,7 +544,7 @@
|
|||
#define CONFIG_FFPLAY 0
|
||||
#define CONFIG_FFPROBE 0
|
||||
#define CONFIG_FFMPEG 0
|
||||
#define CONFIG_DCT 0
|
||||
#define CONFIG_DCT 1
|
||||
#define CONFIG_DWT 0
|
||||
#define CONFIG_ERROR_RESILIENCE 0
|
||||
#define CONFIG_FAAN 1
|
||||
|
@ -621,9 +621,9 @@
|
|||
#define CONFIG_LZF 0
|
||||
#define CONFIG_ME_CMP 0
|
||||
#define CONFIG_MPEG_ER 0
|
||||
#define CONFIG_MPEGAUDIO 0
|
||||
#define CONFIG_MPEGAUDIODSP 0
|
||||
#define CONFIG_MPEGAUDIOHEADER 0
|
||||
#define CONFIG_MPEGAUDIO 1
|
||||
#define CONFIG_MPEGAUDIODSP 1
|
||||
#define CONFIG_MPEGAUDIOHEADER 1
|
||||
#define CONFIG_MPEGVIDEO 0
|
||||
#define CONFIG_MPEGVIDEOENC 0
|
||||
#define CONFIG_MSS34DSP 0
|
||||
|
@ -662,4 +662,5 @@
|
|||
#define CONFIG_FLAC_DECODER 1
|
||||
#define CONFIG_VP8_PARSER 1
|
||||
#define CONFIG_VP9_PARSER 1
|
||||
#define CONFIG_MP3_DECODER 1
|
||||
#endif /* FFMPEG_CONFIG_H */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Automatically generated by configure - do not modify! */
|
||||
#ifndef FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIGURATION "--cross-prefix=/home/jyavenard/.mozbuild/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --target-os=linux --arch=arm --enable-cross-compile --sysroot=/home/jyavenard/.mozbuild/android-ndk-r15c/platforms/android-24/arch-arm --disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --disable-cuda --disable-cuvid"
|
||||
#define FFMPEG_CONFIGURATION "--cross-prefix=/home/jyavenard/.mozbuild/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --target-os=linux --arch=arm --enable-cross-compile --sysroot=/home/jyavenard/.mozbuild/android-ndk-r15c/platforms/android-24/arch-arm --disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --disable-cuda --disable-cuvid --enable-decoder=mp3"
|
||||
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
|
||||
#define CONFIG_THIS_YEAR 2017
|
||||
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
|
||||
|
@ -539,7 +539,7 @@
|
|||
#define CONFIG_FFPLAY 0
|
||||
#define CONFIG_FFPROBE 0
|
||||
#define CONFIG_FFMPEG 0
|
||||
#define CONFIG_DCT 0
|
||||
#define CONFIG_DCT 1
|
||||
#define CONFIG_DWT 0
|
||||
#define CONFIG_ERROR_RESILIENCE 0
|
||||
#define CONFIG_FAAN 1
|
||||
|
@ -614,9 +614,9 @@
|
|||
#define CONFIG_LZF 0
|
||||
#define CONFIG_ME_CMP 0
|
||||
#define CONFIG_MPEG_ER 0
|
||||
#define CONFIG_MPEGAUDIO 0
|
||||
#define CONFIG_MPEGAUDIODSP 0
|
||||
#define CONFIG_MPEGAUDIOHEADER 0
|
||||
#define CONFIG_MPEGAUDIO 1
|
||||
#define CONFIG_MPEGAUDIODSP 1
|
||||
#define CONFIG_MPEGAUDIOHEADER 1
|
||||
#define CONFIG_MPEGVIDEO 0
|
||||
#define CONFIG_MPEGVIDEOENC 0
|
||||
#define CONFIG_MSS34DSP 0
|
||||
|
@ -655,4 +655,5 @@
|
|||
#define CONFIG_FLAC_DECODER 1
|
||||
#define CONFIG_VP8_PARSER 0
|
||||
#define CONFIG_VP9_PARSER 0
|
||||
#define CONFIG_MP3_DECODER 1
|
||||
#endif /* FFMPEG_CONFIG_H */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Automatically generated by configure - do not modify! */
|
||||
#ifndef FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --disable-crystalhd --disable-asm --disable-cuda --disable-cuvid"
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --disable-crystalhd --disable-asm --disable-cuda --disable-cuvid --enable-decoder=mp3"
|
||||
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
|
||||
#define CONFIG_THIS_YEAR 2018
|
||||
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
|
||||
|
@ -539,7 +539,7 @@
|
|||
#define CONFIG_FFPLAY 0
|
||||
#define CONFIG_FFPROBE 0
|
||||
#define CONFIG_FFMPEG 0
|
||||
#define CONFIG_DCT 0
|
||||
#define CONFIG_DCT 1
|
||||
#define CONFIG_DWT 0
|
||||
#define CONFIG_ERROR_RESILIENCE 0
|
||||
#define CONFIG_FAAN 1
|
||||
|
@ -613,9 +613,9 @@
|
|||
#define CONFIG_LZF 0
|
||||
#define CONFIG_ME_CMP 0
|
||||
#define CONFIG_MPEG_ER 0
|
||||
#define CONFIG_MPEGAUDIO 0
|
||||
#define CONFIG_MPEGAUDIODSP 0
|
||||
#define CONFIG_MPEGAUDIOHEADER 0
|
||||
#define CONFIG_MPEGAUDIO 1
|
||||
#define CONFIG_MPEGAUDIODSP 1
|
||||
#define CONFIG_MPEGAUDIOHEADER 1
|
||||
#define CONFIG_MPEGVIDEO 0
|
||||
#define CONFIG_MPEGVIDEOENC 0
|
||||
#define CONFIG_MSS34DSP 0
|
||||
|
@ -654,4 +654,5 @@
|
|||
#define CONFIG_FLAC_DECODER 1
|
||||
#define CONFIG_VP8_PARSER 0
|
||||
#define CONFIG_VP9_PARSER 0
|
||||
#define CONFIG_MP3_DECODER 1
|
||||
#endif /* FFMPEG_CONFIG_H */
|
|
@ -524,7 +524,7 @@
|
|||
%define CONFIG_FFPLAY 0
|
||||
%define CONFIG_FFPROBE 0
|
||||
%define CONFIG_FFMPEG 0
|
||||
%define CONFIG_DCT 0
|
||||
%define CONFIG_DCT 1
|
||||
%define CONFIG_DWT 0
|
||||
%define CONFIG_ERROR_RESILIENCE 0
|
||||
%define CONFIG_FAAN 1
|
||||
|
@ -599,9 +599,9 @@
|
|||
%define CONFIG_LZF 0
|
||||
%define CONFIG_ME_CMP 0
|
||||
%define CONFIG_MPEG_ER 0
|
||||
%define CONFIG_MPEGAUDIO 0
|
||||
%define CONFIG_MPEGAUDIODSP 0
|
||||
%define CONFIG_MPEGAUDIOHEADER 0
|
||||
%define CONFIG_MPEGAUDIO 1
|
||||
%define CONFIG_MPEGAUDIODSP 1
|
||||
%define CONFIG_MPEGAUDIOHEADER 1
|
||||
%define CONFIG_MPEGVIDEO 0
|
||||
%define CONFIG_MPEGVIDEOENC 0
|
||||
%define CONFIG_MSS34DSP 0
|
||||
|
@ -640,3 +640,4 @@
|
|||
%define CONFIG_FLAC_DECODER 1
|
||||
%define CONFIG_VP8_PARSER 1
|
||||
%define CONFIG_VP9_PARSER 1
|
||||
%define CONFIG_MP3_DECODER 1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Automatically generated by configure - do not modify! */
|
||||
#ifndef FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --disable-cuda --disable-cuvid"
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --disable-cuda --disable-cuvid --enable-decoder=mp3"
|
||||
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
|
||||
#define CONFIG_THIS_YEAR 2018
|
||||
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
|
||||
|
@ -539,7 +539,7 @@
|
|||
#define CONFIG_FFPLAY 0
|
||||
#define CONFIG_FFPROBE 0
|
||||
#define CONFIG_FFMPEG 0
|
||||
#define CONFIG_DCT 0
|
||||
#define CONFIG_DCT 1
|
||||
#define CONFIG_DWT 0
|
||||
#define CONFIG_ERROR_RESILIENCE 0
|
||||
#define CONFIG_FAAN 1
|
||||
|
@ -614,9 +614,9 @@
|
|||
#define CONFIG_LZF 0
|
||||
#define CONFIG_ME_CMP 0
|
||||
#define CONFIG_MPEG_ER 0
|
||||
#define CONFIG_MPEGAUDIO 0
|
||||
#define CONFIG_MPEGAUDIODSP 0
|
||||
#define CONFIG_MPEGAUDIOHEADER 0
|
||||
#define CONFIG_MPEGAUDIO 1
|
||||
#define CONFIG_MPEGAUDIODSP 1
|
||||
#define CONFIG_MPEGAUDIOHEADER 1
|
||||
#define CONFIG_MPEGVIDEO 0
|
||||
#define CONFIG_MPEGVIDEOENC 0
|
||||
#define CONFIG_MSS34DSP 0
|
||||
|
@ -655,4 +655,5 @@
|
|||
#define CONFIG_FLAC_DECODER 1
|
||||
#define CONFIG_VP8_PARSER 1
|
||||
#define CONFIG_VP9_PARSER 1
|
||||
#define CONFIG_MP3_DECODER 1
|
||||
#endif /* FFMPEG_CONFIG_H */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Automatically generated by configure - do not modify! */
|
||||
#ifndef FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --disable-asm --disable-x86asm --disable-cuda --disable-cuvid"
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --disable-asm --disable-x86asm --disable-cuda --disable-cuvid --enable-decoder=mp3"
|
||||
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
|
||||
#define CONFIG_THIS_YEAR 2018
|
||||
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
|
||||
|
@ -539,7 +539,7 @@
|
|||
#define CONFIG_FFPLAY 0
|
||||
#define CONFIG_FFPROBE 0
|
||||
#define CONFIG_FFMPEG 0
|
||||
#define CONFIG_DCT 0
|
||||
#define CONFIG_DCT 1
|
||||
#define CONFIG_DWT 0
|
||||
#define CONFIG_ERROR_RESILIENCE 0
|
||||
#define CONFIG_FAAN 1
|
||||
|
@ -614,9 +614,9 @@
|
|||
#define CONFIG_LZF 0
|
||||
#define CONFIG_ME_CMP 0
|
||||
#define CONFIG_MPEG_ER 0
|
||||
#define CONFIG_MPEGAUDIO 0
|
||||
#define CONFIG_MPEGAUDIODSP 0
|
||||
#define CONFIG_MPEGAUDIOHEADER 0
|
||||
#define CONFIG_MPEGAUDIO 1
|
||||
#define CONFIG_MPEGAUDIODSP 1
|
||||
#define CONFIG_MPEGAUDIOHEADER 1
|
||||
#define CONFIG_MPEGVIDEO 0
|
||||
#define CONFIG_MPEGVIDEOENC 0
|
||||
#define CONFIG_MSS34DSP 0
|
||||
|
@ -655,4 +655,5 @@
|
|||
#define CONFIG_FLAC_DECODER 1
|
||||
#define CONFIG_VP8_PARSER 1
|
||||
#define CONFIG_VP9_PARSER 1
|
||||
#define CONFIG_MP3_DECODER 1
|
||||
#endif /* FFMPEG_CONFIG_H */
|
||||
|
|
|
@ -524,7 +524,7 @@
|
|||
%define CONFIG_FFPLAY 0
|
||||
%define CONFIG_FFPROBE 0
|
||||
%define CONFIG_FFMPEG 0
|
||||
%define CONFIG_DCT 0
|
||||
%define CONFIG_DCT 1
|
||||
%define CONFIG_DWT 0
|
||||
%define CONFIG_ERROR_RESILIENCE 0
|
||||
%define CONFIG_FAAN 1
|
||||
|
@ -599,9 +599,9 @@
|
|||
%define CONFIG_LZF 0
|
||||
%define CONFIG_ME_CMP 0
|
||||
%define CONFIG_MPEG_ER 0
|
||||
%define CONFIG_MPEGAUDIO 0
|
||||
%define CONFIG_MPEGAUDIODSP 0
|
||||
%define CONFIG_MPEGAUDIOHEADER 0
|
||||
%define CONFIG_MPEGAUDIO 1
|
||||
%define CONFIG_MPEGAUDIODSP 1
|
||||
%define CONFIG_MPEGAUDIOHEADER 1
|
||||
%define CONFIG_MPEGVIDEO 0
|
||||
%define CONFIG_MPEGVIDEOENC 0
|
||||
%define CONFIG_MSS34DSP 0
|
||||
|
@ -640,3 +640,4 @@
|
|||
%define CONFIG_FLAC_DECODER 1
|
||||
%define CONFIG_VP8_PARSER 1
|
||||
%define CONFIG_VP9_PARSER 1
|
||||
%define CONFIG_MP3_DECODER 1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Automatically generated by configure - do not modify! */
|
||||
#ifndef FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --disable-cuda --disable-cuvid"
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --disable-cuda --disable-cuvid --enable-decoder=mp3"
|
||||
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
|
||||
#define CONFIG_THIS_YEAR 2018
|
||||
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
|
||||
|
@ -539,7 +539,7 @@
|
|||
#define CONFIG_FFPLAY 0
|
||||
#define CONFIG_FFPROBE 0
|
||||
#define CONFIG_FFMPEG 0
|
||||
#define CONFIG_DCT 0
|
||||
#define CONFIG_DCT 1
|
||||
#define CONFIG_DWT 0
|
||||
#define CONFIG_ERROR_RESILIENCE 0
|
||||
#define CONFIG_FAAN 1
|
||||
|
@ -614,9 +614,9 @@
|
|||
#define CONFIG_LZF 0
|
||||
#define CONFIG_ME_CMP 0
|
||||
#define CONFIG_MPEG_ER 0
|
||||
#define CONFIG_MPEGAUDIO 0
|
||||
#define CONFIG_MPEGAUDIODSP 0
|
||||
#define CONFIG_MPEGAUDIOHEADER 0
|
||||
#define CONFIG_MPEGAUDIO 1
|
||||
#define CONFIG_MPEGAUDIODSP 1
|
||||
#define CONFIG_MPEGAUDIOHEADER 1
|
||||
#define CONFIG_MPEGVIDEO 0
|
||||
#define CONFIG_MPEGVIDEOENC 0
|
||||
#define CONFIG_MSS34DSP 0
|
||||
|
@ -655,4 +655,5 @@
|
|||
#define CONFIG_FLAC_DECODER 1
|
||||
#define CONFIG_VP8_PARSER 1
|
||||
#define CONFIG_VP9_PARSER 1
|
||||
#define CONFIG_MP3_DECODER 1
|
||||
#endif /* FFMPEG_CONFIG_H */
|
||||
|
|
|
@ -529,7 +529,7 @@
|
|||
%define CONFIG_FFPLAY 0
|
||||
%define CONFIG_FFPROBE 0
|
||||
%define CONFIG_FFMPEG 0
|
||||
%define CONFIG_DCT 0
|
||||
%define CONFIG_DCT 1
|
||||
%define CONFIG_DWT 0
|
||||
%define CONFIG_ERROR_RESILIENCE 0
|
||||
%define CONFIG_FAAN 1
|
||||
|
@ -606,9 +606,9 @@
|
|||
%define CONFIG_LZF 0
|
||||
%define CONFIG_ME_CMP 0
|
||||
%define CONFIG_MPEG_ER 0
|
||||
%define CONFIG_MPEGAUDIO 0
|
||||
%define CONFIG_MPEGAUDIODSP 0
|
||||
%define CONFIG_MPEGAUDIOHEADER 0
|
||||
%define CONFIG_MPEGAUDIO 1
|
||||
%define CONFIG_MPEGAUDIODSP 1
|
||||
%define CONFIG_MPEGAUDIOHEADER 1
|
||||
%define CONFIG_MPEGVIDEO 0
|
||||
%define CONFIG_MPEGVIDEOENC 0
|
||||
%define CONFIG_MSS34DSP 0
|
||||
|
@ -647,3 +647,4 @@
|
|||
%define CONFIG_FLAC_DECODER 1
|
||||
%define CONFIG_VP8_PARSER 1
|
||||
%define CONFIG_VP9_PARSER 1
|
||||
%define CONFIG_MP3_DECODER 1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Automatically generated by configure - do not modify! */
|
||||
#ifndef FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --disable-cuda --disable-cuvid --toolchain=msvc"
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --disable-cuda --disable-cuvid --enable-decoder=mp3 --toolchain=msvc"
|
||||
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
|
||||
#define CONFIG_THIS_YEAR 2018
|
||||
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
|
||||
|
@ -544,7 +544,7 @@
|
|||
#define CONFIG_FFPLAY 0
|
||||
#define CONFIG_FFPROBE 0
|
||||
#define CONFIG_FFMPEG 0
|
||||
#define CONFIG_DCT 0
|
||||
#define CONFIG_DCT 1
|
||||
#define CONFIG_DWT 0
|
||||
#define CONFIG_ERROR_RESILIENCE 0
|
||||
#define CONFIG_FAAN 1
|
||||
|
@ -621,9 +621,9 @@
|
|||
#define CONFIG_LZF 0
|
||||
#define CONFIG_ME_CMP 0
|
||||
#define CONFIG_MPEG_ER 0
|
||||
#define CONFIG_MPEGAUDIO 0
|
||||
#define CONFIG_MPEGAUDIODSP 0
|
||||
#define CONFIG_MPEGAUDIOHEADER 0
|
||||
#define CONFIG_MPEGAUDIO 1
|
||||
#define CONFIG_MPEGAUDIODSP 1
|
||||
#define CONFIG_MPEGAUDIOHEADER 1
|
||||
#define CONFIG_MPEGVIDEO 0
|
||||
#define CONFIG_MPEGVIDEOENC 0
|
||||
#define CONFIG_MSS34DSP 0
|
||||
|
@ -662,4 +662,5 @@
|
|||
#define CONFIG_FLAC_DECODER 1
|
||||
#define CONFIG_VP8_PARSER 1
|
||||
#define CONFIG_VP9_PARSER 1
|
||||
#define CONFIG_MP3_DECODER 1
|
||||
#endif /* FFMPEG_CONFIG_H */
|
||||
|
|
|
@ -529,7 +529,7 @@
|
|||
%define CONFIG_FFPLAY 0
|
||||
%define CONFIG_FFPROBE 0
|
||||
%define CONFIG_FFMPEG 0
|
||||
%define CONFIG_DCT 0
|
||||
%define CONFIG_DCT 1
|
||||
%define CONFIG_DWT 0
|
||||
%define CONFIG_ERROR_RESILIENCE 0
|
||||
%define CONFIG_FAAN 1
|
||||
|
@ -606,9 +606,9 @@
|
|||
%define CONFIG_LZF 0
|
||||
%define CONFIG_ME_CMP 0
|
||||
%define CONFIG_MPEG_ER 0
|
||||
%define CONFIG_MPEGAUDIO 0
|
||||
%define CONFIG_MPEGAUDIODSP 0
|
||||
%define CONFIG_MPEGAUDIOHEADER 0
|
||||
%define CONFIG_MPEGAUDIO 1
|
||||
%define CONFIG_MPEGAUDIODSP 1
|
||||
%define CONFIG_MPEGAUDIOHEADER 1
|
||||
%define CONFIG_MPEGVIDEO 0
|
||||
%define CONFIG_MPEGVIDEOENC 0
|
||||
%define CONFIG_MSS34DSP 0
|
||||
|
@ -647,3 +647,4 @@
|
|||
%define CONFIG_FLAC_DECODER 1
|
||||
%define CONFIG_VP8_PARSER 1
|
||||
%define CONFIG_VP9_PARSER 1
|
||||
%define CONFIG_MP3_DECODER 1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Automatically generated by configure - do not modify! */
|
||||
#ifndef FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --toolchain=msvc --disable-cuda --disable-cuvid"
|
||||
#define FFMPEG_CONFIGURATION "--disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm --toolchain=msvc --disable-cuda --disable-cuvid --enable-decoder=mp3"
|
||||
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
|
||||
#define CONFIG_THIS_YEAR 2018
|
||||
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
|
||||
|
@ -544,7 +544,7 @@
|
|||
#define CONFIG_FFPLAY 0
|
||||
#define CONFIG_FFPROBE 0
|
||||
#define CONFIG_FFMPEG 0
|
||||
#define CONFIG_DCT 0
|
||||
#define CONFIG_DCT 1
|
||||
#define CONFIG_DWT 0
|
||||
#define CONFIG_ERROR_RESILIENCE 0
|
||||
#define CONFIG_FAAN 1
|
||||
|
@ -621,9 +621,9 @@
|
|||
#define CONFIG_LZF 0
|
||||
#define CONFIG_ME_CMP 0
|
||||
#define CONFIG_MPEG_ER 0
|
||||
#define CONFIG_MPEGAUDIO 0
|
||||
#define CONFIG_MPEGAUDIODSP 0
|
||||
#define CONFIG_MPEGAUDIOHEADER 0
|
||||
#define CONFIG_MPEGAUDIO 1
|
||||
#define CONFIG_MPEGAUDIODSP 1
|
||||
#define CONFIG_MPEGAUDIOHEADER 1
|
||||
#define CONFIG_MPEGVIDEO 0
|
||||
#define CONFIG_MPEGVIDEOENC 0
|
||||
#define CONFIG_MSS34DSP 0
|
||||
|
@ -662,4 +662,5 @@
|
|||
#define CONFIG_FLAC_DECODER 1
|
||||
#define CONFIG_VP8_PARSER 1
|
||||
#define CONFIG_VP9_PARSER 1
|
||||
#define CONFIG_MP3_DECODER 1
|
||||
#endif /* FFMPEG_CONFIG_H */
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
%define CONFIG_AAC_LATM_DECODER 0
|
||||
%define CONFIG_AAC_LATM_PARSER 0
|
||||
%define CONFIG_AAC_PARSER 0
|
||||
%define CONFIG_AASC_DECODER 0
|
||||
%define CONFIG_AA_DEMUXER 0
|
||||
%define CONFIG_AASC_DECODER 0
|
||||
%define CONFIG_ABENCH_FILTER 0
|
||||
%define CONFIG_ABITSCOPE_FILTER 0
|
||||
%define CONFIG_AC3_AT_DECODER 0
|
||||
|
@ -47,10 +47,10 @@
|
|||
%define CONFIG_ADPCM_EA_XAS_DECODER 0
|
||||
%define CONFIG_ADPCM_G722_DECODER 0
|
||||
%define CONFIG_ADPCM_G722_ENCODER 0
|
||||
%define CONFIG_ADPCM_G726LE_DECODER 0
|
||||
%define CONFIG_ADPCM_G726LE_ENCODER 0
|
||||
%define CONFIG_ADPCM_G726_DECODER 0
|
||||
%define CONFIG_ADPCM_G726_ENCODER 0
|
||||
%define CONFIG_ADPCM_G726LE_DECODER 0
|
||||
%define CONFIG_ADPCM_G726LE_ENCODER 0
|
||||
%define CONFIG_ADPCM_IMA_AMV_DECODER 0
|
||||
%define CONFIG_ADPCM_IMA_APC_DECODER 0
|
||||
%define CONFIG_ADPCM_IMA_DAT4_DECODER 0
|
||||
|
@ -93,8 +93,8 @@
|
|||
%define CONFIG_AEA_DEMUXER 0
|
||||
%define CONFIG_AECHO_FILTER 0
|
||||
%define CONFIG_AEMPHASIS_FILTER 0
|
||||
%define CONFIG_AEVALSRC_FILTER 0
|
||||
%define CONFIG_AEVAL_FILTER 0
|
||||
%define CONFIG_AEVALSRC_FILTER 0
|
||||
%define CONFIG_AFADE_FILTER 0
|
||||
%define CONFIG_AFC_DEMUXER 0
|
||||
%define CONFIG_AFFTFILT_FILTER 0
|
||||
|
@ -129,13 +129,13 @@
|
|||
%define CONFIG_AMETADATA_FILTER 0
|
||||
%define CONFIG_AMIX_FILTER 0
|
||||
%define CONFIG_AMOVIE_FILTER 0
|
||||
%define CONFIG_AMR_DEMUXER 0
|
||||
%define CONFIG_AMR_MUXER 0
|
||||
%define CONFIG_AMR_NB_AT_DECODER 0
|
||||
%define CONFIG_AMRNB_DECODER 0
|
||||
%define CONFIG_AMRNB_DEMUXER 0
|
||||
%define CONFIG_AMRWB_DECODER 0
|
||||
%define CONFIG_AMRWB_DEMUXER 0
|
||||
%define CONFIG_AMR_DEMUXER 0
|
||||
%define CONFIG_AMR_MUXER 0
|
||||
%define CONFIG_AMR_NB_AT_DECODER 0
|
||||
%define CONFIG_AMV_DECODER 0
|
||||
%define CONFIG_AMV_ENCODER 0
|
||||
%define CONFIG_ANDROID_CAMERA_INDEV 0
|
||||
|
@ -144,14 +144,14 @@
|
|||
%define CONFIG_ANM_DEMUXER 0
|
||||
%define CONFIG_ANOISESRC_FILTER 0
|
||||
%define CONFIG_ANSI_DECODER 0
|
||||
%define CONFIG_ANULL_FILTER 0
|
||||
%define CONFIG_ANULLSINK_FILTER 0
|
||||
%define CONFIG_ANULLSRC_FILTER 0
|
||||
%define CONFIG_ANULL_FILTER 0
|
||||
%define CONFIG_APAD_FILTER 0
|
||||
%define CONFIG_APC_DEMUXER 0
|
||||
%define CONFIG_APERMS_FILTER 0
|
||||
%define CONFIG_APE_DECODER 0
|
||||
%define CONFIG_APE_DEMUXER 0
|
||||
%define CONFIG_APERMS_FILTER 0
|
||||
%define CONFIG_APHASEMETER_FILTER 0
|
||||
%define CONFIG_APHASER_FILTER 0
|
||||
%define CONFIG_APNG_DECODER 0
|
||||
|
@ -190,9 +190,9 @@
|
|||
%define CONFIG_ASS_FILTER 0
|
||||
%define CONFIG_ASS_MUXER 0
|
||||
%define CONFIG_ASTATS_FILTER 0
|
||||
%define CONFIG_ASTREAMSELECT_FILTER 0
|
||||
%define CONFIG_AST_DEMUXER 0
|
||||
%define CONFIG_AST_MUXER 0
|
||||
%define CONFIG_ASTREAMSELECT_FILTER 0
|
||||
%define CONFIG_ASV1_DECODER 0
|
||||
%define CONFIG_ASV1_ENCODER 0
|
||||
%define CONFIG_ASV2_DECODER 0
|
||||
|
@ -202,26 +202,26 @@
|
|||
%define CONFIG_ATEMPO_FILTER 0
|
||||
%define CONFIG_ATRAC1_DECODER 0
|
||||
%define CONFIG_ATRAC3AL_DECODER 0
|
||||
%define CONFIG_ATRAC3_DECODER 0
|
||||
%define CONFIG_ATRAC3PAL_DECODER 0
|
||||
%define CONFIG_ATRAC3P_DECODER 0
|
||||
%define CONFIG_ATRAC3_DECODER 0
|
||||
%define CONFIG_ATRIM_FILTER 0
|
||||
%define CONFIG_AURA2_DECODER 0
|
||||
%define CONFIG_AURA_DECODER 0
|
||||
%define CONFIG_AU_DEMUXER 0
|
||||
%define CONFIG_AU_MUXER 0
|
||||
%define CONFIG_AURA2_DECODER 0
|
||||
%define CONFIG_AURA_DECODER 0
|
||||
%define CONFIG_AVECTORSCOPE_FILTER 0
|
||||
%define CONFIG_AVFOUNDATION_INDEV 0
|
||||
%define CONFIG_AVGBLUR_FILTER 0
|
||||
%define CONFIG_AVGBLUR_OPENCL_FILTER 0
|
||||
%define CONFIG_AVISYNTH_DEMUXER 0
|
||||
%define CONFIG_AVI_DEMUXER 0
|
||||
%define CONFIG_AVI_MUXER 0
|
||||
%define CONFIG_AVISYNTH_DEMUXER 0
|
||||
%define CONFIG_AVM2_MUXER 0
|
||||
%define CONFIG_AVR_DEMUXER 0
|
||||
%define CONFIG_AVRN_DECODER 0
|
||||
%define CONFIG_AVRP_DECODER 0
|
||||
%define CONFIG_AVRP_ENCODER 0
|
||||
%define CONFIG_AVR_DEMUXER 0
|
||||
%define CONFIG_AVS_DECODER 0
|
||||
%define CONFIG_AVS_DEMUXER 0
|
||||
%define CONFIG_AVUI_DECODER 0
|
||||
|
@ -246,10 +246,10 @@
|
|||
%define CONFIG_BINTEXT_DECODER 0
|
||||
%define CONFIG_BINTEXT_DEMUXER 0
|
||||
%define CONFIG_BIQUAD_FILTER 0
|
||||
%define CONFIG_BITPACKED_DECODER 0
|
||||
%define CONFIG_BITPLANENOISE_FILTER 0
|
||||
%define CONFIG_BIT_DEMUXER 0
|
||||
%define CONFIG_BIT_MUXER 0
|
||||
%define CONFIG_BITPACKED_DECODER 0
|
||||
%define CONFIG_BITPLANENOISE_FILTER 0
|
||||
%define CONFIG_BKTR_INDEV 0
|
||||
%define CONFIG_BLACKDETECT_FILTER 0
|
||||
%define CONFIG_BLACKFRAME_FILTER 0
|
||||
|
@ -273,13 +273,13 @@
|
|||
%define CONFIG_CACHE_PROTOCOL 0
|
||||
%define CONFIG_CAF_DEMUXER 0
|
||||
%define CONFIG_CAF_MUXER 0
|
||||
%define CONFIG_CAVS_DECODER 0
|
||||
%define CONFIG_CAVSVIDEO_DEMUXER 0
|
||||
%define CONFIG_CAVSVIDEO_MUXER 0
|
||||
%define CONFIG_CAVSVIDEO_PARSER 0
|
||||
%define CONFIG_CAVS_DECODER 0
|
||||
%define CONFIG_CCAPTION_DECODER 0
|
||||
%define CONFIG_CDGRAPHICS_DECODER 0
|
||||
%define CONFIG_CDG_DEMUXER 0
|
||||
%define CONFIG_CDGRAPHICS_DECODER 0
|
||||
%define CONFIG_CDXL_DECODER 0
|
||||
%define CONFIG_CDXL_DEMUXER 0
|
||||
%define CONFIG_CELLAUTO_FILTER 0
|
||||
|
@ -291,25 +291,25 @@
|
|||
%define CONFIG_CHROMAKEY_FILTER 0
|
||||
%define CONFIG_CHROMAPRINT_MUXER 0
|
||||
%define CONFIG_CIESCOPE_FILTER 0
|
||||
%define CONFIG_CINE_DEMUXER 0
|
||||
%define CONFIG_CINEPAK_DECODER 0
|
||||
%define CONFIG_CINEPAK_ENCODER 0
|
||||
%define CONFIG_CINE_DEMUXER 0
|
||||
%define CONFIG_CLEARVIDEO_DECODER 0
|
||||
%define CONFIG_CLJR_DECODER 0
|
||||
%define CONFIG_CLJR_ENCODER 0
|
||||
%define CONFIG_CLLC_DECODER 0
|
||||
%define CONFIG_CODEC2RAW_DEMUXER 0
|
||||
%define CONFIG_CODEC2RAW_MUXER 0
|
||||
%define CONFIG_CODEC2_DEMUXER 0
|
||||
%define CONFIG_CODEC2_MUXER 0
|
||||
%define CONFIG_CODEC2RAW_DEMUXER 0
|
||||
%define CONFIG_CODEC2RAW_MUXER 0
|
||||
%define CONFIG_CODECVIEW_FILTER 0
|
||||
%define CONFIG_COLORBALANCE_FILTER 0
|
||||
%define CONFIG_COLORCHANNELMIXER_FILTER 0
|
||||
%define CONFIG_COLOR_FILTER 0
|
||||
%define CONFIG_COLORKEY_FILTER 0
|
||||
%define CONFIG_COLORLEVELS_FILTER 0
|
||||
%define CONFIG_COLORMATRIX_FILTER 0
|
||||
%define CONFIG_COLORSPACE_FILTER 0
|
||||
%define CONFIG_COLOR_FILTER 0
|
||||
%define CONFIG_COMFORTNOISE_DECODER 0
|
||||
%define CONFIG_COMFORTNOISE_ENCODER 0
|
||||
%define CONFIG_COMPAND_FILTER 0
|
||||
|
@ -323,8 +323,8 @@
|
|||
%define CONFIG_COOK_DECODER 0
|
||||
%define CONFIG_COOK_PARSER 0
|
||||
%define CONFIG_COPY_FILTER 0
|
||||
%define CONFIG_COREIMAGESRC_FILTER 0
|
||||
%define CONFIG_COREIMAGE_FILTER 0
|
||||
%define CONFIG_COREIMAGESRC_FILTER 0
|
||||
%define CONFIG_COVER_RECT_FILTER 0
|
||||
%define CONFIG_CPIA_DECODER 0
|
||||
%define CONFIG_CRC_MUXER 0
|
||||
|
@ -338,10 +338,10 @@
|
|||
%define CONFIG_CYUV_DECODER 0
|
||||
%define CONFIG_DASH_DEMUXER 0
|
||||
%define CONFIG_DASH_MUXER 0
|
||||
%define CONFIG_DATASCOPE_FILTER 0
|
||||
%define CONFIG_DATA_DEMUXER 0
|
||||
%define CONFIG_DATA_MUXER 0
|
||||
%define CONFIG_DATA_PROTOCOL 0
|
||||
%define CONFIG_DATASCOPE_FILTER 0
|
||||
%define CONFIG_DAUD_DEMUXER 0
|
||||
%define CONFIG_DAUD_MUXER 0
|
||||
%define CONFIG_DCA_CORE_BSF 0
|
||||
|
@ -398,13 +398,13 @@
|
|||
%define CONFIG_DSF_DEMUXER 0
|
||||
%define CONFIG_DSHOW_INDEV 0
|
||||
%define CONFIG_DSICINAUDIO_DECODER 0
|
||||
%define CONFIG_DSICINVIDEO_DECODER 0
|
||||
%define CONFIG_DSICIN_DEMUXER 0
|
||||
%define CONFIG_DSICINVIDEO_DECODER 0
|
||||
%define CONFIG_DSS_DEMUXER 0
|
||||
%define CONFIG_DSS_SP_DECODER 0
|
||||
%define CONFIG_DST_DECODER 0
|
||||
%define CONFIG_DTSHD_DEMUXER 0
|
||||
%define CONFIG_DTS_DEMUXER 0
|
||||
%define CONFIG_DTSHD_DEMUXER 0
|
||||
%define CONFIG_DTS_MUXER 0
|
||||
%define CONFIG_DUMP_EXTRADATA_BSF 0
|
||||
%define CONFIG_DVAUDIO_DECODER 0
|
||||
|
@ -414,14 +414,14 @@
|
|||
%define CONFIG_DVBSUB_ENCODER 0
|
||||
%define CONFIG_DVBSUB_PARSER 0
|
||||
%define CONFIG_DVBTXT_DEMUXER 0
|
||||
%define CONFIG_DV_DEMUXER 0
|
||||
%define CONFIG_DVD_NAV_PARSER 0
|
||||
%define CONFIG_DVDSUB_DECODER 0
|
||||
%define CONFIG_DVDSUB_ENCODER 0
|
||||
%define CONFIG_DVDSUB_PARSER 0
|
||||
%define CONFIG_DVD_NAV_PARSER 0
|
||||
%define CONFIG_DV_MUXER 0
|
||||
%define CONFIG_DVVIDEO_DECODER 0
|
||||
%define CONFIG_DVVIDEO_ENCODER 0
|
||||
%define CONFIG_DV_DEMUXER 0
|
||||
%define CONFIG_DV_MUXER 0
|
||||
%define CONFIG_DXA_DECODER 0
|
||||
%define CONFIG_DXA_DEMUXER 0
|
||||
%define CONFIG_DXTORY_DECODER 0
|
||||
|
@ -433,14 +433,14 @@
|
|||
%define CONFIG_EAC3_DEMUXER 0
|
||||
%define CONFIG_EAC3_ENCODER 0
|
||||
%define CONFIG_EAC3_MUXER 0
|
||||
%define CONFIG_EA_CDATA_DEMUXER 0
|
||||
%define CONFIG_EACMV_DECODER 0
|
||||
%define CONFIG_EA_DEMUXER 0
|
||||
%define CONFIG_EAMAD_DECODER 0
|
||||
%define CONFIG_EARWAX_FILTER 0
|
||||
%define CONFIG_EATGQ_DECODER 0
|
||||
%define CONFIG_EATGV_DECODER 0
|
||||
%define CONFIG_EATQI_DECODER 0
|
||||
%define CONFIG_EA_CDATA_DEMUXER 0
|
||||
%define CONFIG_EA_DEMUXER 0
|
||||
%define CONFIG_EBUR128_FILTER 0
|
||||
%define CONFIG_EDGEDETECT_FILTER 0
|
||||
%define CONFIG_EIGHTBPS_DECODER 0
|
||||
|
@ -450,15 +450,15 @@
|
|||
%define CONFIG_ENCODERS 0
|
||||
%define CONFIG_ENTROPY_FILTER 0
|
||||
%define CONFIG_EPAF_DEMUXER 0
|
||||
%define CONFIG_EQUALIZER_FILTER 0
|
||||
%define CONFIG_EQ_FILTER 0
|
||||
%define CONFIG_EQUALIZER_FILTER 0
|
||||
%define CONFIG_EROSION_FILTER 0
|
||||
%define CONFIG_ESCAPE124_DECODER 0
|
||||
%define CONFIG_ESCAPE130_DECODER 0
|
||||
%define CONFIG_EVRC_DECODER 0
|
||||
%define CONFIG_EXR_DECODER 0
|
||||
%define CONFIG_EXTRACTPLANES_FILTER 0
|
||||
%define CONFIG_EXTRACT_EXTRADATA_BSF 0
|
||||
%define CONFIG_EXTRACTPLANES_FILTER 0
|
||||
%define CONFIG_EXTRASTEREO_FILTER 0
|
||||
%define CONFIG_F4V_MUXER 0
|
||||
%define CONFIG_FADE_FILTER 0
|
||||
|
@ -475,10 +475,10 @@
|
|||
%define CONFIG_FFVHUFF_ENCODER 0
|
||||
%define CONFIG_FFWAVESYNTH_DECODER 0
|
||||
%define CONFIG_FIC_DECODER 0
|
||||
%define CONFIG_FIELD_FILTER 0
|
||||
%define CONFIG_FIELDHINT_FILTER 0
|
||||
%define CONFIG_FIELDMATCH_FILTER 0
|
||||
%define CONFIG_FIELDORDER_FILTER 0
|
||||
%define CONFIG_FIELD_FILTER 0
|
||||
%define CONFIG_FIFO_FILTER 0
|
||||
%define CONFIG_FIFO_MUXER 0
|
||||
%define CONFIG_FIFO_TEST_MUXER 0
|
||||
|
@ -538,9 +538,9 @@
|
|||
%define CONFIG_G723_1_DEMUXER 0
|
||||
%define CONFIG_G723_1_ENCODER 0
|
||||
%define CONFIG_G723_1_MUXER 0
|
||||
%define CONFIG_G726_DEMUXER 0
|
||||
%define CONFIG_G726LE_DEMUXER 0
|
||||
%define CONFIG_G726LE_MUXER 0
|
||||
%define CONFIG_G726_DEMUXER 0
|
||||
%define CONFIG_G726_MUXER 0
|
||||
%define CONFIG_G729_DECODER 0
|
||||
%define CONFIG_G729_DEMUXER 0
|
||||
|
@ -571,14 +571,14 @@
|
|||
%define CONFIG_H261_ENCODER 0
|
||||
%define CONFIG_H261_MUXER 0
|
||||
%define CONFIG_H261_PARSER 0
|
||||
%define CONFIG_H263I_DECODER 0
|
||||
%define CONFIG_H263P_DECODER 0
|
||||
%define CONFIG_H263P_ENCODER 0
|
||||
%define CONFIG_H263_DECODER 0
|
||||
%define CONFIG_H263_DEMUXER 0
|
||||
%define CONFIG_H263_ENCODER 0
|
||||
%define CONFIG_H263I_DECODER 0
|
||||
%define CONFIG_H263_MUXER 0
|
||||
%define CONFIG_H263_PARSER 0
|
||||
%define CONFIG_H263P_DECODER 0
|
||||
%define CONFIG_H263P_ENCODER 0
|
||||
%define CONFIG_H263_V4L2M2M_DECODER 0
|
||||
%define CONFIG_H263_V4L2M2M_ENCODER 0
|
||||
%define CONFIG_H263_VAAPI_HWACCEL 0
|
||||
|
@ -612,11 +612,11 @@
|
|||
%define CONFIG_H264_VIDEOTOOLBOX_ENCODER 0
|
||||
%define CONFIG_H264_VIDEOTOOLBOX_HWACCEL 0
|
||||
%define CONFIG_HAAS_FILTER 0
|
||||
%define CONFIG_HALDCLUTSRC_FILTER 0
|
||||
%define CONFIG_HALDCLUT_FILTER 0
|
||||
%define CONFIG_HAPQA_EXTRACT_BSF 0
|
||||
%define CONFIG_HALDCLUTSRC_FILTER 0
|
||||
%define CONFIG_HAP_DECODER 0
|
||||
%define CONFIG_HAP_ENCODER 0
|
||||
%define CONFIG_HAPQA_EXTRACT_BSF 0
|
||||
%define CONFIG_HASH_MUXER 0
|
||||
%define CONFIG_HDCD_FILTER 0
|
||||
%define CONFIG_HDS_MUXER 0
|
||||
|
@ -656,13 +656,13 @@
|
|||
%define CONFIG_HNM4_VIDEO_DECODER 0
|
||||
%define CONFIG_HNM_DEMUXER 0
|
||||
%define CONFIG_HQDN3D_FILTER 0
|
||||
%define CONFIG_HQ_HQA_DECODER 0
|
||||
%define CONFIG_HQX_DECODER 0
|
||||
%define CONFIG_HQX_FILTER 0
|
||||
%define CONFIG_HQ_HQA_DECODER 0
|
||||
%define CONFIG_HSTACK_FILTER 0
|
||||
%define CONFIG_HTTP_PROTOCOL 0
|
||||
%define CONFIG_HTTPPROXY_PROTOCOL 0
|
||||
%define CONFIG_HTTPS_PROTOCOL 0
|
||||
%define CONFIG_HTTP_PROTOCOL 0
|
||||
%define CONFIG_HUE_FILTER 0
|
||||
%define CONFIG_HUFFYUV_DECODER 0
|
||||
%define CONFIG_HUFFYUV_ENCODER 0
|
||||
|
@ -689,12 +689,12 @@
|
|||
%define CONFIG_ILBC_DEMUXER 0
|
||||
%define CONFIG_ILBC_MUXER 0
|
||||
%define CONFIG_IL_FILTER 0
|
||||
%define CONFIG_IMAGE2PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE2PIPE_MUXER 0
|
||||
%define CONFIG_IMAGE2_ALIAS_PIX_DEMUXER 0
|
||||
%define CONFIG_IMAGE2_BRENDER_PIX_DEMUXER 0
|
||||
%define CONFIG_IMAGE2_DEMUXER 0
|
||||
%define CONFIG_IMAGE2_MUXER 0
|
||||
%define CONFIG_IMAGE2PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE2PIPE_MUXER 0
|
||||
%define CONFIG_IMAGE_BMP_PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE_DDS_PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE_DPX_PIPE_DEMUXER 0
|
||||
|
@ -705,8 +705,8 @@
|
|||
%define CONFIG_IMAGE_PAM_PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE_PBM_PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE_PCX_PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE_PGMYUV_PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE_PGM_PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE_PGMYUV_PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE_PICTOR_PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE_PNG_PIPE_DEMUXER 0
|
||||
%define CONFIG_IMAGE_PPM_PIPE_DEMUXER 0
|
||||
|
@ -795,10 +795,10 @@
|
|||
%define CONFIG_LIBOPUS_ENCODER 0
|
||||
%define CONFIG_LIBRSVG_DECODER 0
|
||||
%define CONFIG_LIBRTMPE_PROTOCOL 0
|
||||
%define CONFIG_LIBRTMP_PROTOCOL 0
|
||||
%define CONFIG_LIBRTMPS_PROTOCOL 0
|
||||
%define CONFIG_LIBRTMPTE_PROTOCOL 0
|
||||
%define CONFIG_LIBRTMPT_PROTOCOL 0
|
||||
%define CONFIG_LIBRTMP_PROTOCOL 0
|
||||
%define CONFIG_LIBSHINE_ENCODER 0
|
||||
%define CONFIG_LIBSMBCLIENT_PROTOCOL 0
|
||||
%define CONFIG_LIBSPEEX_DECODER 0
|
||||
|
@ -808,9 +808,9 @@
|
|||
%define CONFIG_LIBTHEORA_ENCODER 0
|
||||
%define CONFIG_LIBTWOLAME_ENCODER 0
|
||||
%define CONFIG_LIBVMAF_FILTER 0
|
||||
%define CONFIG_LIBVO_AMRWBENC_ENCODER 0
|
||||
%define CONFIG_LIBVORBIS_DECODER 0
|
||||
%define CONFIG_LIBVORBIS_ENCODER 0
|
||||
%define CONFIG_LIBVO_AMRWBENC_ENCODER 0
|
||||
%define CONFIG_LIBVPX_VP8_DECODER 0
|
||||
%define CONFIG_LIBVPX_VP8_ENCODER 0
|
||||
%define CONFIG_LIBVPX_VP9_DECODER 0
|
||||
|
@ -819,8 +819,8 @@
|
|||
%define CONFIG_LIBWEBP_ANIM_ENCODER 0
|
||||
%define CONFIG_LIBWEBP_ENCODER 0
|
||||
%define CONFIG_LIBX262_ENCODER 0
|
||||
%define CONFIG_LIBX264RGB_ENCODER 0
|
||||
%define CONFIG_LIBX264_ENCODER 0
|
||||
%define CONFIG_LIBX264RGB_ENCODER 0
|
||||
%define CONFIG_LIBX265_ENCODER 0
|
||||
%define CONFIG_LIBXAVS_ENCODER 0
|
||||
%define CONFIG_LIBXVID_ENCODER 0
|
||||
|
@ -840,9 +840,9 @@
|
|||
%define CONFIG_LUMAKEY_FILTER 0
|
||||
%define CONFIG_LUT2_FILTER 0
|
||||
%define CONFIG_LUT3D_FILTER 0
|
||||
%define CONFIG_LUT_FILTER 0
|
||||
%define CONFIG_LUTRGB_FILTER 0
|
||||
%define CONFIG_LUTYUV_FILTER 0
|
||||
%define CONFIG_LUT_FILTER 0
|
||||
%define CONFIG_LV2_FILTER 0
|
||||
%define CONFIG_LVF_DEMUXER 0
|
||||
%define CONFIG_LXF_DEMUXER 0
|
||||
|
@ -876,10 +876,10 @@
|
|||
%define CONFIG_MIMIC_DECODER 0
|
||||
%define CONFIG_MINTERPOLATE_FILTER 0
|
||||
%define CONFIG_MIX_FILTER 0
|
||||
%define CONFIG_MJPEG_2000_DEMUXER 0
|
||||
%define CONFIG_MJPEG2JPEG_BSF 0
|
||||
%define CONFIG_MJPEGA_DUMP_HEADER_BSF 0
|
||||
%define CONFIG_MJPEGB_DECODER 0
|
||||
%define CONFIG_MJPEG_2000_DEMUXER 0
|
||||
%define CONFIG_MJPEG_CUVID_DECODER 0
|
||||
%define CONFIG_MJPEG_DECODER 0
|
||||
%define CONFIG_MJPEG_DEMUXER 0
|
||||
|
@ -897,65 +897,59 @@
|
|||
%define CONFIG_MLP_MUXER 0
|
||||
%define CONFIG_MLP_PARSER 0
|
||||
%define CONFIG_MLV_DEMUXER 0
|
||||
%define CONFIG_MM_DEMUXER 0
|
||||
%define CONFIG_MMF_DEMUXER 0
|
||||
%define CONFIG_MMF_MUXER 0
|
||||
%define CONFIG_MMSH_PROTOCOL 0
|
||||
%define CONFIG_MMST_PROTOCOL 0
|
||||
%define CONFIG_MMVIDEO_DECODER 0
|
||||
%define CONFIG_MM_DEMUXER 0
|
||||
%define CONFIG_MOTIONPIXELS_DECODER 0
|
||||
%define CONFIG_MOV2TEXTSUB_BSF 0
|
||||
%define CONFIG_MOV_DEMUXER 0
|
||||
%define CONFIG_MOVIE_FILTER 0
|
||||
%define CONFIG_MOV_MUXER 0
|
||||
%define CONFIG_MOVTEXT_DECODER 0
|
||||
%define CONFIG_MOVTEXT_ENCODER 0
|
||||
%define CONFIG_MOV_DEMUXER 0
|
||||
%define CONFIG_MOV_MUXER 0
|
||||
%define CONFIG_MP1FLOAT_DECODER 0
|
||||
%define CONFIG_MP1_AT_DECODER 0
|
||||
%define CONFIG_MP1_DECODER 0
|
||||
%define CONFIG_MP2FIXED_ENCODER 0
|
||||
%define CONFIG_MP2FLOAT_DECODER 0
|
||||
%define CONFIG_MP1FLOAT_DECODER 0
|
||||
%define CONFIG_MP2_AT_DECODER 0
|
||||
%define CONFIG_MP2_DECODER 0
|
||||
%define CONFIG_MP2_ENCODER 0
|
||||
%define CONFIG_MP2FIXED_ENCODER 0
|
||||
%define CONFIG_MP2FLOAT_DECODER 0
|
||||
%define CONFIG_MP2_MUXER 0
|
||||
%define CONFIG_MP3ADUFLOAT_DECODER 0
|
||||
%define CONFIG_MP3ADU_DECODER 0
|
||||
%define CONFIG_MP3FLOAT_DECODER 0
|
||||
%define CONFIG_MP3ON4FLOAT_DECODER 0
|
||||
%define CONFIG_MP3ON4_DECODER 0
|
||||
%define CONFIG_MP3ADUFLOAT_DECODER 0
|
||||
%define CONFIG_MP3_AT_DECODER 0
|
||||
%define CONFIG_MP3_DECODER 0
|
||||
%define CONFIG_MP3_DEMUXER 0
|
||||
%define CONFIG_MP3FLOAT_DECODER 0
|
||||
%define CONFIG_MP3_HEADER_DECOMPRESS_BSF 0
|
||||
%define CONFIG_MP3_MUXER 0
|
||||
%define CONFIG_MP3ON4_DECODER 0
|
||||
%define CONFIG_MP3ON4FLOAT_DECODER 0
|
||||
%define CONFIG_MP4_MUXER 0
|
||||
%define CONFIG_MPC7_DECODER 0
|
||||
%define CONFIG_MPC8_DECODER 0
|
||||
%define CONFIG_MPC8_DEMUXER 0
|
||||
%define CONFIG_MPC_DEMUXER 0
|
||||
%define CONFIG_MPDECIMATE_FILTER 0
|
||||
%define CONFIG_MPEG1_CUVID_DECODER 0
|
||||
%define CONFIG_MPEG1_NVDEC_HWACCEL 0
|
||||
%define CONFIG_MPEG1SYSTEM_MUXER 0
|
||||
%define CONFIG_MPEG1_V4L2M2M_DECODER 0
|
||||
%define CONFIG_MPEG1VCD_MUXER 0
|
||||
%define CONFIG_MPEG1_VDPAU_HWACCEL 0
|
||||
%define CONFIG_MPEG1VIDEO_DECODER 0
|
||||
%define CONFIG_MPEG1VIDEO_ENCODER 0
|
||||
%define CONFIG_MPEG1VIDEO_MUXER 0
|
||||
%define CONFIG_MPEG1_CUVID_DECODER 0
|
||||
%define CONFIG_MPEG1_NVDEC_HWACCEL 0
|
||||
%define CONFIG_MPEG1_V4L2M2M_DECODER 0
|
||||
%define CONFIG_MPEG1_VDPAU_HWACCEL 0
|
||||
%define CONFIG_MPEG1_VIDEOTOOLBOX_HWACCEL 0
|
||||
%define CONFIG_MPEG1_XVMC_HWACCEL 0
|
||||
%define CONFIG_MPEG2DVD_MUXER 0
|
||||
%define CONFIG_MPEG2SVCD_MUXER 0
|
||||
%define CONFIG_MPEG2VIDEO_DECODER 0
|
||||
%define CONFIG_MPEG2VIDEO_ENCODER 0
|
||||
%define CONFIG_MPEG2VIDEO_MUXER 0
|
||||
%define CONFIG_MPEG2VOB_MUXER 0
|
||||
%define CONFIG_MPEG2_CRYSTALHD_DECODER 0
|
||||
%define CONFIG_MPEG2_CUVID_DECODER 0
|
||||
%define CONFIG_MPEG2_D3D11VA2_HWACCEL 0
|
||||
%define CONFIG_MPEG2_D3D11VA_HWACCEL 0
|
||||
%define CONFIG_MPEG2DVD_MUXER 0
|
||||
%define CONFIG_MPEG2_DXVA2_HWACCEL 0
|
||||
%define CONFIG_MPEG2_MEDIACODEC_DECODER 0
|
||||
%define CONFIG_MPEG2_METADATA_BSF 0
|
||||
|
@ -963,13 +957,17 @@
|
|||
%define CONFIG_MPEG2_NVDEC_HWACCEL 0
|
||||
%define CONFIG_MPEG2_QSV_DECODER 0
|
||||
%define CONFIG_MPEG2_QSV_ENCODER 0
|
||||
%define CONFIG_MPEG2SVCD_MUXER 0
|
||||
%define CONFIG_MPEG2_V4L2M2M_DECODER 0
|
||||
%define CONFIG_MPEG2_VAAPI_ENCODER 0
|
||||
%define CONFIG_MPEG2_VAAPI_HWACCEL 0
|
||||
%define CONFIG_MPEG2_VDPAU_HWACCEL 0
|
||||
%define CONFIG_MPEG2VIDEO_DECODER 0
|
||||
%define CONFIG_MPEG2VIDEO_ENCODER 0
|
||||
%define CONFIG_MPEG2VIDEO_MUXER 0
|
||||
%define CONFIG_MPEG2_VIDEOTOOLBOX_HWACCEL 0
|
||||
%define CONFIG_MPEG2VOB_MUXER 0
|
||||
%define CONFIG_MPEG2_XVMC_HWACCEL 0
|
||||
%define CONFIG_MPEG4VIDEO_PARSER 0
|
||||
%define CONFIG_MPEG4_CRYSTALHD_DECODER 0
|
||||
%define CONFIG_MPEG4_CUVID_DECODER 0
|
||||
%define CONFIG_MPEG4_DECODER 0
|
||||
|
@ -982,12 +980,13 @@
|
|||
%define CONFIG_MPEG4_V4L2M2M_ENCODER 0
|
||||
%define CONFIG_MPEG4_VAAPI_HWACCEL 0
|
||||
%define CONFIG_MPEG4_VDPAU_HWACCEL 0
|
||||
%define CONFIG_MPEG4VIDEO_PARSER 0
|
||||
%define CONFIG_MPEG4_VIDEOTOOLBOX_HWACCEL 0
|
||||
%define CONFIG_MPEGAUDIO_PARSER 0
|
||||
%define CONFIG_MPEGPS_DEMUXER 0
|
||||
%define CONFIG_MPEGTSRAW_DEMUXER 0
|
||||
%define CONFIG_MPEGTS_DEMUXER 0
|
||||
%define CONFIG_MPEGTS_MUXER 0
|
||||
%define CONFIG_MPEGTSRAW_DEMUXER 0
|
||||
%define CONFIG_MPEGVIDEO_DECODER 0
|
||||
%define CONFIG_MPEGVIDEO_DEMUXER 0
|
||||
%define CONFIG_MPEGVIDEO_PARSER 0
|
||||
|
@ -1000,12 +999,12 @@
|
|||
%define CONFIG_MSA1_DECODER 0
|
||||
%define CONFIG_MSCC_DECODER 0
|
||||
%define CONFIG_MSF_DEMUXER 0
|
||||
%define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0
|
||||
%define CONFIG_MSMPEG4V1_DECODER 0
|
||||
%define CONFIG_MSMPEG4V2_DECODER 0
|
||||
%define CONFIG_MSMPEG4V2_ENCODER 0
|
||||
%define CONFIG_MSMPEG4V3_DECODER 0
|
||||
%define CONFIG_MSMPEG4V3_ENCODER 0
|
||||
%define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0
|
||||
%define CONFIG_MSNWC_TCP_DEMUXER 0
|
||||
%define CONFIG_MSRLE_DECODER 0
|
||||
%define CONFIG_MSS1_DECODER 0
|
||||
|
@ -1020,8 +1019,8 @@
|
|||
%define CONFIG_MUXERS 0
|
||||
%define CONFIG_MVC1_DECODER 0
|
||||
%define CONFIG_MVC2_DECODER 0
|
||||
%define CONFIG_MVI_DEMUXER 0
|
||||
%define CONFIG_MV_DEMUXER 0
|
||||
%define CONFIG_MVI_DEMUXER 0
|
||||
%define CONFIG_MXF_D10_MUXER 0
|
||||
%define CONFIG_MXF_DEMUXER 0
|
||||
%define CONFIG_MXF_MUXER 0
|
||||
|
@ -1041,10 +1040,10 @@
|
|||
%define CONFIG_NORMALIZE_FILTER 0
|
||||
%define CONFIG_NSP_DEMUXER 0
|
||||
%define CONFIG_NSV_DEMUXER 0
|
||||
%define CONFIG_NULLSINK_FILTER 0
|
||||
%define CONFIG_NULLSRC_FILTER 0
|
||||
%define CONFIG_NULL_FILTER 0
|
||||
%define CONFIG_NULL_MUXER 0
|
||||
%define CONFIG_NULLSINK_FILTER 0
|
||||
%define CONFIG_NULLSRC_FILTER 0
|
||||
%define CONFIG_NUT_DEMUXER 0
|
||||
%define CONFIG_NUT_MUXER 0
|
||||
%define CONFIG_NUV_DECODER 0
|
||||
|
@ -1197,10 +1196,10 @@
|
|||
%define CONFIG_PCX_ENCODER 0
|
||||
%define CONFIG_PERMS_FILTER 0
|
||||
%define CONFIG_PERSPECTIVE_FILTER 0
|
||||
%define CONFIG_PGMYUV_DECODER 0
|
||||
%define CONFIG_PGMYUV_ENCODER 0
|
||||
%define CONFIG_PGM_DECODER 0
|
||||
%define CONFIG_PGM_ENCODER 0
|
||||
%define CONFIG_PGMYUV_DECODER 0
|
||||
%define CONFIG_PGMYUV_ENCODER 0
|
||||
%define CONFIG_PGSSUB_DECODER 0
|
||||
%define CONFIG_PHASE_FILTER 0
|
||||
%define CONFIG_PICTOR_DECODER 0
|
||||
|
@ -1216,9 +1215,9 @@
|
|||
%define CONFIG_PNG_PARSER 0
|
||||
%define CONFIG_PNM_PARSER 0
|
||||
%define CONFIG_PP7_FILTER 0
|
||||
%define CONFIG_PP_FILTER 0
|
||||
%define CONFIG_PPM_DECODER 0
|
||||
%define CONFIG_PPM_ENCODER 0
|
||||
%define CONFIG_PP_FILTER 0
|
||||
%define CONFIG_PREMULTIPLY_FILTER 0
|
||||
%define CONFIG_PREWITT_FILTER 0
|
||||
%define CONFIG_PROCAMP_VAAPI_FILTER 0
|
||||
|
@ -1256,15 +1255,15 @@
|
|||
%define CONFIG_R210_DECODER 0
|
||||
%define CONFIG_R210_ENCODER 0
|
||||
%define CONFIG_R3D_DEMUXER 0
|
||||
%define CONFIG_RA_144_DECODER 0
|
||||
%define CONFIG_RA_144_ENCODER 0
|
||||
%define CONFIG_RA_288_DECODER 0
|
||||
%define CONFIG_RALF_DECODER 0
|
||||
%define CONFIG_RANDOM_FILTER 0
|
||||
%define CONFIG_RAWVIDEO_DECODER 0
|
||||
%define CONFIG_RAWVIDEO_DEMUXER 0
|
||||
%define CONFIG_RAWVIDEO_ENCODER 0
|
||||
%define CONFIG_RAWVIDEO_MUXER 0
|
||||
%define CONFIG_RA_144_DECODER 0
|
||||
%define CONFIG_RA_144_ENCODER 0
|
||||
%define CONFIG_RA_288_DECODER 0
|
||||
%define CONFIG_READEIA608_FILTER 0
|
||||
%define CONFIG_READVITC_FILTER 0
|
||||
%define CONFIG_REALTEXT_DECODER 0
|
||||
|
@ -1272,9 +1271,9 @@
|
|||
%define CONFIG_REALTIME_FILTER 0
|
||||
%define CONFIG_REDSPARK_DEMUXER 0
|
||||
%define CONFIG_REMAP_FILTER 0
|
||||
%define CONFIG_REMOVE_EXTRADATA_BSF 0
|
||||
%define CONFIG_REMOVEGRAIN_FILTER 0
|
||||
%define CONFIG_REMOVELOGO_FILTER 0
|
||||
%define CONFIG_REMOVE_EXTRADATA_BSF 0
|
||||
%define CONFIG_REPEATFIELDS_FILTER 0
|
||||
%define CONFIG_REPLAYGAIN_FILTER 0
|
||||
%define CONFIG_RESAMPLE_FILTER 0
|
||||
|
@ -1299,11 +1298,11 @@
|
|||
%define CONFIG_RSO_DEMUXER 0
|
||||
%define CONFIG_RSO_MUXER 0
|
||||
%define CONFIG_RTMPE_PROTOCOL 0
|
||||
%define CONFIG_RTMP_PROTOCOL 0
|
||||
%define CONFIG_RTMPS_PROTOCOL 0
|
||||
%define CONFIG_RTMPTE_PROTOCOL 0
|
||||
%define CONFIG_RTMPTS_PROTOCOL 0
|
||||
%define CONFIG_RTMPT_PROTOCOL 0
|
||||
%define CONFIG_RTMP_PROTOCOL 0
|
||||
%define CONFIG_RTMPTS_PROTOCOL 0
|
||||
%define CONFIG_RTP_DEMUXER 0
|
||||
%define CONFIG_RTP_MPEGTS_MUXER 0
|
||||
%define CONFIG_RTP_MUXER 0
|
||||
|
@ -1354,8 +1353,8 @@
|
|||
%define CONFIG_SEGAFILM_DEMUXER 0
|
||||
%define CONFIG_SEGAFILM_MUXER 0
|
||||
%define CONFIG_SEGMENT_MUXER 0
|
||||
%define CONFIG_SELECTIVECOLOR_FILTER 0
|
||||
%define CONFIG_SELECT_FILTER 0
|
||||
%define CONFIG_SELECTIVECOLOR_FILTER 0
|
||||
%define CONFIG_SENDCMD_FILTER 0
|
||||
%define CONFIG_SEPARATEFIELDS_FILTER 0
|
||||
%define CONFIG_SETDAR_FILTER 0
|
||||
|
@ -1364,9 +1363,9 @@
|
|||
%define CONFIG_SETRANGE_FILTER 0
|
||||
%define CONFIG_SETSAR_FILTER 0
|
||||
%define CONFIG_SETTB_FILTER 0
|
||||
%define CONFIG_SGIRLE_DECODER 0
|
||||
%define CONFIG_SGI_DECODER 0
|
||||
%define CONFIG_SGI_ENCODER 0
|
||||
%define CONFIG_SGIRLE_DECODER 0
|
||||
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
|
||||
%define CONFIG_SHEERVIDEO_DECODER 0
|
||||
%define CONFIG_SHORTEN_DECODER 0
|
||||
|
@ -1375,11 +1374,11 @@
|
|||
%define CONFIG_SHOWFREQS_FILTER 0
|
||||
%define CONFIG_SHOWINFO_FILTER 0
|
||||
%define CONFIG_SHOWPALETTE_FILTER 0
|
||||
%define CONFIG_SHOWSPECTRUMPIC_FILTER 0
|
||||
%define CONFIG_SHOWSPECTRUM_FILTER 0
|
||||
%define CONFIG_SHOWSPECTRUMPIC_FILTER 0
|
||||
%define CONFIG_SHOWVOLUME_FILTER 0
|
||||
%define CONFIG_SHOWWAVESPIC_FILTER 0
|
||||
%define CONFIG_SHOWWAVES_FILTER 0
|
||||
%define CONFIG_SHOWWAVESPIC_FILTER 0
|
||||
%define CONFIG_SHUFFLEFRAMES_FILTER 0
|
||||
%define CONFIG_SHUFFLEPLANES_FILTER 0
|
||||
%define CONFIG_SIDECHAINCOMPRESS_FILTER 0
|
||||
|
@ -1429,11 +1428,11 @@
|
|||
%define CONFIG_SPP_FILTER 0
|
||||
%define CONFIG_SPX_MUXER 0
|
||||
%define CONFIG_SRGC_DECODER 0
|
||||
%define CONFIG_SRTP_PROTOCOL 0
|
||||
%define CONFIG_SRT_DECODER 0
|
||||
%define CONFIG_SRT_DEMUXER 0
|
||||
%define CONFIG_SRT_ENCODER 0
|
||||
%define CONFIG_SRT_MUXER 0
|
||||
%define CONFIG_SRTP_PROTOCOL 0
|
||||
%define CONFIG_SSA_DECODER 0
|
||||
%define CONFIG_SSA_ENCODER 0
|
||||
%define CONFIG_SSIM_FILTER 0
|
||||
|
@ -1442,9 +1441,9 @@
|
|||
%define CONFIG_STEREOWIDEN_FILTER 0
|
||||
%define CONFIG_STL_DECODER 0
|
||||
%define CONFIG_STL_DEMUXER 0
|
||||
%define CONFIG_STREAMSELECT_FILTER 0
|
||||
%define CONFIG_STREAM_SEGMENT_MUXER 0
|
||||
%define CONFIG_STR_DEMUXER 0
|
||||
%define CONFIG_STREAM_SEGMENT_MUXER 0
|
||||
%define CONFIG_STREAMSELECT_FILTER 0
|
||||
%define CONFIG_SUBFILE_PROTOCOL 0
|
||||
%define CONFIG_SUBRIP_DECODER 0
|
||||
%define CONFIG_SUBRIP_ENCODER 0
|
||||
|
@ -1455,9 +1454,9 @@
|
|||
%define CONFIG_SUBVIEWER_DEMUXER 0
|
||||
%define CONFIG_SUNRAST_DECODER 0
|
||||
%define CONFIG_SUNRAST_ENCODER 0
|
||||
%define CONFIG_SUP_DEMUXER 0
|
||||
%define CONFIG_SUPER2XSAI_FILTER 0
|
||||
%define CONFIG_SUPEREQUALIZER_FILTER 0
|
||||
%define CONFIG_SUP_DEMUXER 0
|
||||
%define CONFIG_SUP_MUXER 0
|
||||
%define CONFIG_SURROUND_FILTER 0
|
||||
%define CONFIG_SVAG_DEMUXER 0
|
||||
|
@ -1495,8 +1494,8 @@
|
|||
%define CONFIG_THRESHOLD_FILTER 0
|
||||
%define CONFIG_THUMBNAIL_CUDA_FILTER 0
|
||||
%define CONFIG_THUMBNAIL_FILTER 0
|
||||
%define CONFIG_TIERTEXSEQVIDEO_DECODER 0
|
||||
%define CONFIG_TIERTEXSEQ_DEMUXER 0
|
||||
%define CONFIG_TIERTEXSEQVIDEO_DECODER 0
|
||||
%define CONFIG_TIFF_DECODER 0
|
||||
%define CONFIG_TIFF_ENCODER 0
|
||||
%define CONFIG_TILE_FILTER 0
|
||||
|
@ -1516,8 +1515,8 @@
|
|||
%define CONFIG_TRUEHD_ENCODER 0
|
||||
%define CONFIG_TRUEHD_MUXER 0
|
||||
%define CONFIG_TRUEMOTION1_DECODER 0
|
||||
%define CONFIG_TRUEMOTION2RT_DECODER 0
|
||||
%define CONFIG_TRUEMOTION2_DECODER 0
|
||||
%define CONFIG_TRUEMOTION2RT_DECODER 0
|
||||
%define CONFIG_TRUESPEECH_DECODER 0
|
||||
%define CONFIG_TSCC2_DECODER 0
|
||||
%define CONFIG_TSCC_DECODER 0
|
||||
|
@ -1541,11 +1540,11 @@
|
|||
%define CONFIG_USPP_FILTER 0
|
||||
%define CONFIG_UTVIDEO_DECODER 0
|
||||
%define CONFIG_UTVIDEO_ENCODER 0
|
||||
%define CONFIG_V210X_DECODER 0
|
||||
%define CONFIG_V210X_DEMUXER 0
|
||||
%define CONFIG_V210_DECODER 0
|
||||
%define CONFIG_V210_DEMUXER 0
|
||||
%define CONFIG_V210_ENCODER 0
|
||||
%define CONFIG_V210X_DECODER 0
|
||||
%define CONFIG_V210X_DEMUXER 0
|
||||
%define CONFIG_V308_DECODER 0
|
||||
%define CONFIG_V308_ENCODER 0
|
||||
%define CONFIG_V408_DECODER 0
|
||||
|
@ -1554,13 +1553,10 @@
|
|||
%define CONFIG_V410_ENCODER 0
|
||||
%define CONFIG_V4L2_INDEV 0
|
||||
%define CONFIG_V4L2_OUTDEV 0
|
||||
%define CONFIG_VAGUEDENOISER_FILTER 0
|
||||
%define CONFIG_VAG_DEMUXER 0
|
||||
%define CONFIG_VBLE_DECODER 0
|
||||
%define CONFIG_VAGUEDENOISER_FILTER 0
|
||||
%define CONFIG_VB_DECODER 0
|
||||
%define CONFIG_VC1IMAGE_DECODER 0
|
||||
%define CONFIG_VC1T_DEMUXER 0
|
||||
%define CONFIG_VC1T_MUXER 0
|
||||
%define CONFIG_VBLE_DECODER 0
|
||||
%define CONFIG_VC1_CRYSTALHD_DECODER 0
|
||||
%define CONFIG_VC1_CUVID_DECODER 0
|
||||
%define CONFIG_VC1_D3D11VA2_HWACCEL 0
|
||||
|
@ -1568,11 +1564,14 @@
|
|||
%define CONFIG_VC1_DECODER 0
|
||||
%define CONFIG_VC1_DEMUXER 0
|
||||
%define CONFIG_VC1_DXVA2_HWACCEL 0
|
||||
%define CONFIG_VC1IMAGE_DECODER 0
|
||||
%define CONFIG_VC1_MMAL_DECODER 0
|
||||
%define CONFIG_VC1_MUXER 0
|
||||
%define CONFIG_VC1_NVDEC_HWACCEL 0
|
||||
%define CONFIG_VC1_PARSER 0
|
||||
%define CONFIG_VC1_QSV_DECODER 0
|
||||
%define CONFIG_VC1T_DEMUXER 0
|
||||
%define CONFIG_VC1T_MUXER 0
|
||||
%define CONFIG_VC1_V4L2M2M_DECODER 0
|
||||
%define CONFIG_VC1_VAAPI_HWACCEL 0
|
||||
%define CONFIG_VC1_VDPAU_HWACCEL 0
|
||||
|
@ -1589,8 +1588,8 @@
|
|||
%define CONFIG_VIVO_DEMUXER 0
|
||||
%define CONFIG_VMAFMOTION_FILTER 0
|
||||
%define CONFIG_VMDAUDIO_DECODER 0
|
||||
%define CONFIG_VMDVIDEO_DECODER 0
|
||||
%define CONFIG_VMD_DEMUXER 0
|
||||
%define CONFIG_VMDVIDEO_DECODER 0
|
||||
%define CONFIG_VMNC_DECODER 0
|
||||
%define CONFIG_VOBSUB_DEMUXER 0
|
||||
%define CONFIG_VOC_DEMUXER 0
|
||||
|
@ -1604,8 +1603,8 @@
|
|||
%define CONFIG_VP3_PARSER 0
|
||||
%define CONFIG_VP5_DECODER 0
|
||||
%define CONFIG_VP6A_DECODER 0
|
||||
%define CONFIG_VP6F_DECODER 0
|
||||
%define CONFIG_VP6_DECODER 0
|
||||
%define CONFIG_VP6F_DECODER 0
|
||||
%define CONFIG_VP7_DECODER 0
|
||||
%define CONFIG_VP8_CUVID_DECODER 0
|
||||
%define CONFIG_VP8_MEDIACODEC_DECODER 0
|
||||
|
@ -1638,11 +1637,11 @@
|
|||
%define CONFIG_W3FDIF_FILTER 0
|
||||
%define CONFIG_W64_DEMUXER 0
|
||||
%define CONFIG_W64_MUXER 0
|
||||
%define CONFIG_WAV_DEMUXER 0
|
||||
%define CONFIG_WAVEFORM_FILTER 0
|
||||
%define CONFIG_WAV_MUXER 0
|
||||
%define CONFIG_WAVPACK_DECODER 0
|
||||
%define CONFIG_WAVPACK_ENCODER 0
|
||||
%define CONFIG_WAV_DEMUXER 0
|
||||
%define CONFIG_WAV_MUXER 0
|
||||
%define CONFIG_WC3_DEMUXER 0
|
||||
%define CONFIG_WEAVE_FILTER 0
|
||||
%define CONFIG_WEBM_CHUNK_MUXER 0
|
||||
|
@ -1666,12 +1665,12 @@
|
|||
%define CONFIG_WMV1_ENCODER 0
|
||||
%define CONFIG_WMV2_DECODER 0
|
||||
%define CONFIG_WMV2_ENCODER 0
|
||||
%define CONFIG_WMV3IMAGE_DECODER 0
|
||||
%define CONFIG_WMV3_CRYSTALHD_DECODER 0
|
||||
%define CONFIG_WMV3_D3D11VA2_HWACCEL 0
|
||||
%define CONFIG_WMV3_D3D11VA_HWACCEL 0
|
||||
%define CONFIG_WMV3_DECODER 0
|
||||
%define CONFIG_WMV3_DXVA2_HWACCEL 0
|
||||
%define CONFIG_WMV3IMAGE_DECODER 0
|
||||
%define CONFIG_WMV3_NVDEC_HWACCEL 0
|
||||
%define CONFIG_WMV3_VAAPI_HWACCEL 0
|
||||
%define CONFIG_WMV3_VDPAU_HWACCEL 0
|
||||
|
@ -1680,17 +1679,17 @@
|
|||
%define CONFIG_WRAPPED_AVFRAME_ENCODER 0
|
||||
%define CONFIG_WSAUD_DEMUXER 0
|
||||
%define CONFIG_WSD_DEMUXER 0
|
||||
%define CONFIG_WSVQA_DEMUXER 0
|
||||
%define CONFIG_WS_SND1_DECODER 0
|
||||
%define CONFIG_WSVQA_DEMUXER 0
|
||||
%define CONFIG_WTV_DEMUXER 0
|
||||
%define CONFIG_WTV_MUXER 0
|
||||
%define CONFIG_WVE_DEMUXER 0
|
||||
%define CONFIG_WV_DEMUXER 0
|
||||
%define CONFIG_WVE_DEMUXER 0
|
||||
%define CONFIG_WV_MUXER 0
|
||||
%define CONFIG_XA_DEMUXER 0
|
||||
%define CONFIG_XAN_DPCM_DECODER 0
|
||||
%define CONFIG_XAN_WC3_DECODER 0
|
||||
%define CONFIG_XAN_WC4_DECODER 0
|
||||
%define CONFIG_XA_DEMUXER 0
|
||||
%define CONFIG_XBIN_DECODER 0
|
||||
%define CONFIG_XBIN_DEMUXER 0
|
||||
%define CONFIG_XBM_DECODER 0
|
||||
|
@ -1718,10 +1717,10 @@
|
|||
%define CONFIG_YLC_DECODER 0
|
||||
%define CONFIG_YOP_DECODER 0
|
||||
%define CONFIG_YOP_DEMUXER 0
|
||||
%define CONFIG_YUV4MPEGPIPE_DEMUXER 0
|
||||
%define CONFIG_YUV4MPEGPIPE_MUXER 0
|
||||
%define CONFIG_YUV4_DECODER 0
|
||||
%define CONFIG_YUV4_ENCODER 0
|
||||
%define CONFIG_YUV4MPEGPIPE_DEMUXER 0
|
||||
%define CONFIG_YUV4MPEGPIPE_MUXER 0
|
||||
%define CONFIG_YUVTESTSRC_FILTER 0
|
||||
%define CONFIG_ZERO12V_DECODER 0
|
||||
%define CONFIG_ZEROCODEC_DECODER 0
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
#define CONFIG_AAC_LATM_DECODER 0
|
||||
#define CONFIG_AAC_LATM_PARSER 0
|
||||
#define CONFIG_AAC_PARSER 0
|
||||
#define CONFIG_AASC_DECODER 0
|
||||
#define CONFIG_AA_DEMUXER 0
|
||||
#define CONFIG_AASC_DECODER 0
|
||||
#define CONFIG_ABENCH_FILTER 0
|
||||
#define CONFIG_ABITSCOPE_FILTER 0
|
||||
#define CONFIG_AC3_AT_DECODER 0
|
||||
|
@ -47,10 +47,10 @@
|
|||
#define CONFIG_ADPCM_EA_XAS_DECODER 0
|
||||
#define CONFIG_ADPCM_G722_DECODER 0
|
||||
#define CONFIG_ADPCM_G722_ENCODER 0
|
||||
#define CONFIG_ADPCM_G726LE_DECODER 0
|
||||
#define CONFIG_ADPCM_G726LE_ENCODER 0
|
||||
#define CONFIG_ADPCM_G726_DECODER 0
|
||||
#define CONFIG_ADPCM_G726_ENCODER 0
|
||||
#define CONFIG_ADPCM_G726LE_DECODER 0
|
||||
#define CONFIG_ADPCM_G726LE_ENCODER 0
|
||||
#define CONFIG_ADPCM_IMA_AMV_DECODER 0
|
||||
#define CONFIG_ADPCM_IMA_APC_DECODER 0
|
||||
#define CONFIG_ADPCM_IMA_DAT4_DECODER 0
|
||||
|
@ -93,8 +93,8 @@
|
|||
#define CONFIG_AEA_DEMUXER 0
|
||||
#define CONFIG_AECHO_FILTER 0
|
||||
#define CONFIG_AEMPHASIS_FILTER 0
|
||||
#define CONFIG_AEVALSRC_FILTER 0
|
||||
#define CONFIG_AEVAL_FILTER 0
|
||||
#define CONFIG_AEVALSRC_FILTER 0
|
||||
#define CONFIG_AFADE_FILTER 0
|
||||
#define CONFIG_AFC_DEMUXER 0
|
||||
#define CONFIG_AFFTFILT_FILTER 0
|
||||
|
@ -129,13 +129,13 @@
|
|||
#define CONFIG_AMETADATA_FILTER 0
|
||||
#define CONFIG_AMIX_FILTER 0
|
||||
#define CONFIG_AMOVIE_FILTER 0
|
||||
#define CONFIG_AMR_DEMUXER 0
|
||||
#define CONFIG_AMR_MUXER 0
|
||||
#define CONFIG_AMR_NB_AT_DECODER 0
|
||||
#define CONFIG_AMRNB_DECODER 0
|
||||
#define CONFIG_AMRNB_DEMUXER 0
|
||||
#define CONFIG_AMRWB_DECODER 0
|
||||
#define CONFIG_AMRWB_DEMUXER 0
|
||||
#define CONFIG_AMR_DEMUXER 0
|
||||
#define CONFIG_AMR_MUXER 0
|
||||
#define CONFIG_AMR_NB_AT_DECODER 0
|
||||
#define CONFIG_AMV_DECODER 0
|
||||
#define CONFIG_AMV_ENCODER 0
|
||||
#define CONFIG_ANDROID_CAMERA_INDEV 0
|
||||
|
@ -144,14 +144,14 @@
|
|||
#define CONFIG_ANM_DEMUXER 0
|
||||
#define CONFIG_ANOISESRC_FILTER 0
|
||||
#define CONFIG_ANSI_DECODER 0
|
||||
#define CONFIG_ANULL_FILTER 0
|
||||
#define CONFIG_ANULLSINK_FILTER 0
|
||||
#define CONFIG_ANULLSRC_FILTER 0
|
||||
#define CONFIG_ANULL_FILTER 0
|
||||
#define CONFIG_APAD_FILTER 0
|
||||
#define CONFIG_APC_DEMUXER 0
|
||||
#define CONFIG_APERMS_FILTER 0
|
||||
#define CONFIG_APE_DECODER 0
|
||||
#define CONFIG_APE_DEMUXER 0
|
||||
#define CONFIG_APERMS_FILTER 0
|
||||
#define CONFIG_APHASEMETER_FILTER 0
|
||||
#define CONFIG_APHASER_FILTER 0
|
||||
#define CONFIG_APNG_DECODER 0
|
||||
|
@ -190,9 +190,9 @@
|
|||
#define CONFIG_ASS_FILTER 0
|
||||
#define CONFIG_ASS_MUXER 0
|
||||
#define CONFIG_ASTATS_FILTER 0
|
||||
#define CONFIG_ASTREAMSELECT_FILTER 0
|
||||
#define CONFIG_AST_DEMUXER 0
|
||||
#define CONFIG_AST_MUXER 0
|
||||
#define CONFIG_ASTREAMSELECT_FILTER 0
|
||||
#define CONFIG_ASV1_DECODER 0
|
||||
#define CONFIG_ASV1_ENCODER 0
|
||||
#define CONFIG_ASV2_DECODER 0
|
||||
|
@ -202,26 +202,26 @@
|
|||
#define CONFIG_ATEMPO_FILTER 0
|
||||
#define CONFIG_ATRAC1_DECODER 0
|
||||
#define CONFIG_ATRAC3AL_DECODER 0
|
||||
#define CONFIG_ATRAC3_DECODER 0
|
||||
#define CONFIG_ATRAC3PAL_DECODER 0
|
||||
#define CONFIG_ATRAC3P_DECODER 0
|
||||
#define CONFIG_ATRAC3_DECODER 0
|
||||
#define CONFIG_ATRIM_FILTER 0
|
||||
#define CONFIG_AURA2_DECODER 0
|
||||
#define CONFIG_AURA_DECODER 0
|
||||
#define CONFIG_AU_DEMUXER 0
|
||||
#define CONFIG_AU_MUXER 0
|
||||
#define CONFIG_AURA2_DECODER 0
|
||||
#define CONFIG_AURA_DECODER 0
|
||||
#define CONFIG_AVECTORSCOPE_FILTER 0
|
||||
#define CONFIG_AVFOUNDATION_INDEV 0
|
||||
#define CONFIG_AVGBLUR_FILTER 0
|
||||
#define CONFIG_AVGBLUR_OPENCL_FILTER 0
|
||||
#define CONFIG_AVISYNTH_DEMUXER 0
|
||||
#define CONFIG_AVI_DEMUXER 0
|
||||
#define CONFIG_AVI_MUXER 0
|
||||
#define CONFIG_AVISYNTH_DEMUXER 0
|
||||
#define CONFIG_AVM2_MUXER 0
|
||||
#define CONFIG_AVR_DEMUXER 0
|
||||
#define CONFIG_AVRN_DECODER 0
|
||||
#define CONFIG_AVRP_DECODER 0
|
||||
#define CONFIG_AVRP_ENCODER 0
|
||||
#define CONFIG_AVR_DEMUXER 0
|
||||
#define CONFIG_AVS_DECODER 0
|
||||
#define CONFIG_AVS_DEMUXER 0
|
||||
#define CONFIG_AVUI_DECODER 0
|
||||
|
@ -246,10 +246,10 @@
|
|||
#define CONFIG_BINTEXT_DECODER 0
|
||||
#define CONFIG_BINTEXT_DEMUXER 0
|
||||
#define CONFIG_BIQUAD_FILTER 0
|
||||
#define CONFIG_BITPACKED_DECODER 0
|
||||
#define CONFIG_BITPLANENOISE_FILTER 0
|
||||
#define CONFIG_BIT_DEMUXER 0
|
||||
#define CONFIG_BIT_MUXER 0
|
||||
#define CONFIG_BITPACKED_DECODER 0
|
||||
#define CONFIG_BITPLANENOISE_FILTER 0
|
||||
#define CONFIG_BKTR_INDEV 0
|
||||
#define CONFIG_BLACKDETECT_FILTER 0
|
||||
#define CONFIG_BLACKFRAME_FILTER 0
|
||||
|
@ -273,13 +273,13 @@
|
|||
#define CONFIG_CACHE_PROTOCOL 0
|
||||
#define CONFIG_CAF_DEMUXER 0
|
||||
#define CONFIG_CAF_MUXER 0
|
||||
#define CONFIG_CAVS_DECODER 0
|
||||
#define CONFIG_CAVSVIDEO_DEMUXER 0
|
||||
#define CONFIG_CAVSVIDEO_MUXER 0
|
||||
#define CONFIG_CAVSVIDEO_PARSER 0
|
||||
#define CONFIG_CAVS_DECODER 0
|
||||
#define CONFIG_CCAPTION_DECODER 0
|
||||
#define CONFIG_CDGRAPHICS_DECODER 0
|
||||
#define CONFIG_CDG_DEMUXER 0
|
||||
#define CONFIG_CDGRAPHICS_DECODER 0
|
||||
#define CONFIG_CDXL_DECODER 0
|
||||
#define CONFIG_CDXL_DEMUXER 0
|
||||
#define CONFIG_CELLAUTO_FILTER 0
|
||||
|
@ -291,25 +291,25 @@
|
|||
#define CONFIG_CHROMAKEY_FILTER 0
|
||||
#define CONFIG_CHROMAPRINT_MUXER 0
|
||||
#define CONFIG_CIESCOPE_FILTER 0
|
||||
#define CONFIG_CINE_DEMUXER 0
|
||||
#define CONFIG_CINEPAK_DECODER 0
|
||||
#define CONFIG_CINEPAK_ENCODER 0
|
||||
#define CONFIG_CINE_DEMUXER 0
|
||||
#define CONFIG_CLEARVIDEO_DECODER 0
|
||||
#define CONFIG_CLJR_DECODER 0
|
||||
#define CONFIG_CLJR_ENCODER 0
|
||||
#define CONFIG_CLLC_DECODER 0
|
||||
#define CONFIG_CODEC2RAW_DEMUXER 0
|
||||
#define CONFIG_CODEC2RAW_MUXER 0
|
||||
#define CONFIG_CODEC2_DEMUXER 0
|
||||
#define CONFIG_CODEC2_MUXER 0
|
||||
#define CONFIG_CODEC2RAW_DEMUXER 0
|
||||
#define CONFIG_CODEC2RAW_MUXER 0
|
||||
#define CONFIG_CODECVIEW_FILTER 0
|
||||
#define CONFIG_COLORBALANCE_FILTER 0
|
||||
#define CONFIG_COLORCHANNELMIXER_FILTER 0
|
||||
#define CONFIG_COLOR_FILTER 0
|
||||
#define CONFIG_COLORKEY_FILTER 0
|
||||
#define CONFIG_COLORLEVELS_FILTER 0
|
||||
#define CONFIG_COLORMATRIX_FILTER 0
|
||||
#define CONFIG_COLORSPACE_FILTER 0
|
||||
#define CONFIG_COLOR_FILTER 0
|
||||
#define CONFIG_COMFORTNOISE_DECODER 0
|
||||
#define CONFIG_COMFORTNOISE_ENCODER 0
|
||||
#define CONFIG_COMPAND_FILTER 0
|
||||
|
@ -323,8 +323,8 @@
|
|||
#define CONFIG_COOK_DECODER 0
|
||||
#define CONFIG_COOK_PARSER 0
|
||||
#define CONFIG_COPY_FILTER 0
|
||||
#define CONFIG_COREIMAGESRC_FILTER 0
|
||||
#define CONFIG_COREIMAGE_FILTER 0
|
||||
#define CONFIG_COREIMAGESRC_FILTER 0
|
||||
#define CONFIG_COVER_RECT_FILTER 0
|
||||
#define CONFIG_CPIA_DECODER 0
|
||||
#define CONFIG_CRC_MUXER 0
|
||||
|
@ -338,10 +338,10 @@
|
|||
#define CONFIG_CYUV_DECODER 0
|
||||
#define CONFIG_DASH_DEMUXER 0
|
||||
#define CONFIG_DASH_MUXER 0
|
||||
#define CONFIG_DATASCOPE_FILTER 0
|
||||
#define CONFIG_DATA_DEMUXER 0
|
||||
#define CONFIG_DATA_MUXER 0
|
||||
#define CONFIG_DATA_PROTOCOL 0
|
||||
#define CONFIG_DATASCOPE_FILTER 0
|
||||
#define CONFIG_DAUD_DEMUXER 0
|
||||
#define CONFIG_DAUD_MUXER 0
|
||||
#define CONFIG_DCA_CORE_BSF 0
|
||||
|
@ -398,13 +398,13 @@
|
|||
#define CONFIG_DSF_DEMUXER 0
|
||||
#define CONFIG_DSHOW_INDEV 0
|
||||
#define CONFIG_DSICINAUDIO_DECODER 0
|
||||
#define CONFIG_DSICINVIDEO_DECODER 0
|
||||
#define CONFIG_DSICIN_DEMUXER 0
|
||||
#define CONFIG_DSICINVIDEO_DECODER 0
|
||||
#define CONFIG_DSS_DEMUXER 0
|
||||
#define CONFIG_DSS_SP_DECODER 0
|
||||
#define CONFIG_DST_DECODER 0
|
||||
#define CONFIG_DTSHD_DEMUXER 0
|
||||
#define CONFIG_DTS_DEMUXER 0
|
||||
#define CONFIG_DTSHD_DEMUXER 0
|
||||
#define CONFIG_DTS_MUXER 0
|
||||
#define CONFIG_DUMP_EXTRADATA_BSF 0
|
||||
#define CONFIG_DVAUDIO_DECODER 0
|
||||
|
@ -414,14 +414,14 @@
|
|||
#define CONFIG_DVBSUB_ENCODER 0
|
||||
#define CONFIG_DVBSUB_PARSER 0
|
||||
#define CONFIG_DVBTXT_DEMUXER 0
|
||||
#define CONFIG_DV_DEMUXER 0
|
||||
#define CONFIG_DVD_NAV_PARSER 0
|
||||
#define CONFIG_DVDSUB_DECODER 0
|
||||
#define CONFIG_DVDSUB_ENCODER 0
|
||||
#define CONFIG_DVDSUB_PARSER 0
|
||||
#define CONFIG_DVD_NAV_PARSER 0
|
||||
#define CONFIG_DV_MUXER 0
|
||||
#define CONFIG_DVVIDEO_DECODER 0
|
||||
#define CONFIG_DVVIDEO_ENCODER 0
|
||||
#define CONFIG_DV_DEMUXER 0
|
||||
#define CONFIG_DV_MUXER 0
|
||||
#define CONFIG_DXA_DECODER 0
|
||||
#define CONFIG_DXA_DEMUXER 0
|
||||
#define CONFIG_DXTORY_DECODER 0
|
||||
|
@ -433,14 +433,14 @@
|
|||
#define CONFIG_EAC3_DEMUXER 0
|
||||
#define CONFIG_EAC3_ENCODER 0
|
||||
#define CONFIG_EAC3_MUXER 0
|
||||
#define CONFIG_EA_CDATA_DEMUXER 0
|
||||
#define CONFIG_EACMV_DECODER 0
|
||||
#define CONFIG_EA_DEMUXER 0
|
||||
#define CONFIG_EAMAD_DECODER 0
|
||||
#define CONFIG_EARWAX_FILTER 0
|
||||
#define CONFIG_EATGQ_DECODER 0
|
||||
#define CONFIG_EATGV_DECODER 0
|
||||
#define CONFIG_EATQI_DECODER 0
|
||||
#define CONFIG_EA_CDATA_DEMUXER 0
|
||||
#define CONFIG_EA_DEMUXER 0
|
||||
#define CONFIG_EBUR128_FILTER 0
|
||||
#define CONFIG_EDGEDETECT_FILTER 0
|
||||
#define CONFIG_EIGHTBPS_DECODER 0
|
||||
|
@ -450,15 +450,15 @@
|
|||
#define CONFIG_ENCODERS 0
|
||||
#define CONFIG_ENTROPY_FILTER 0
|
||||
#define CONFIG_EPAF_DEMUXER 0
|
||||
#define CONFIG_EQUALIZER_FILTER 0
|
||||
#define CONFIG_EQ_FILTER 0
|
||||
#define CONFIG_EQUALIZER_FILTER 0
|
||||
#define CONFIG_EROSION_FILTER 0
|
||||
#define CONFIG_ESCAPE124_DECODER 0
|
||||
#define CONFIG_ESCAPE130_DECODER 0
|
||||
#define CONFIG_EVRC_DECODER 0
|
||||
#define CONFIG_EXR_DECODER 0
|
||||
#define CONFIG_EXTRACTPLANES_FILTER 0
|
||||
#define CONFIG_EXTRACT_EXTRADATA_BSF 0
|
||||
#define CONFIG_EXTRACTPLANES_FILTER 0
|
||||
#define CONFIG_EXTRASTEREO_FILTER 0
|
||||
#define CONFIG_F4V_MUXER 0
|
||||
#define CONFIG_FADE_FILTER 0
|
||||
|
@ -475,10 +475,10 @@
|
|||
#define CONFIG_FFVHUFF_ENCODER 0
|
||||
#define CONFIG_FFWAVESYNTH_DECODER 0
|
||||
#define CONFIG_FIC_DECODER 0
|
||||
#define CONFIG_FIELD_FILTER 0
|
||||
#define CONFIG_FIELDHINT_FILTER 0
|
||||
#define CONFIG_FIELDMATCH_FILTER 0
|
||||
#define CONFIG_FIELDORDER_FILTER 0
|
||||
#define CONFIG_FIELD_FILTER 0
|
||||
#define CONFIG_FIFO_FILTER 0
|
||||
#define CONFIG_FIFO_MUXER 0
|
||||
#define CONFIG_FIFO_TEST_MUXER 0
|
||||
|
@ -538,9 +538,9 @@
|
|||
#define CONFIG_G723_1_DEMUXER 0
|
||||
#define CONFIG_G723_1_ENCODER 0
|
||||
#define CONFIG_G723_1_MUXER 0
|
||||
#define CONFIG_G726_DEMUXER 0
|
||||
#define CONFIG_G726LE_DEMUXER 0
|
||||
#define CONFIG_G726LE_MUXER 0
|
||||
#define CONFIG_G726_DEMUXER 0
|
||||
#define CONFIG_G726_MUXER 0
|
||||
#define CONFIG_G729_DECODER 0
|
||||
#define CONFIG_G729_DEMUXER 0
|
||||
|
@ -571,14 +571,14 @@
|
|||
#define CONFIG_H261_ENCODER 0
|
||||
#define CONFIG_H261_MUXER 0
|
||||
#define CONFIG_H261_PARSER 0
|
||||
#define CONFIG_H263I_DECODER 0
|
||||
#define CONFIG_H263P_DECODER 0
|
||||
#define CONFIG_H263P_ENCODER 0
|
||||
#define CONFIG_H263_DECODER 0
|
||||
#define CONFIG_H263_DEMUXER 0
|
||||
#define CONFIG_H263_ENCODER 0
|
||||
#define CONFIG_H263I_DECODER 0
|
||||
#define CONFIG_H263_MUXER 0
|
||||
#define CONFIG_H263_PARSER 0
|
||||
#define CONFIG_H263P_DECODER 0
|
||||
#define CONFIG_H263P_ENCODER 0
|
||||
#define CONFIG_H263_V4L2M2M_DECODER 0
|
||||
#define CONFIG_H263_V4L2M2M_ENCODER 0
|
||||
#define CONFIG_H263_VAAPI_HWACCEL 0
|
||||
|
@ -612,11 +612,11 @@
|
|||
#define CONFIG_H264_VIDEOTOOLBOX_ENCODER 0
|
||||
#define CONFIG_H264_VIDEOTOOLBOX_HWACCEL 0
|
||||
#define CONFIG_HAAS_FILTER 0
|
||||
#define CONFIG_HALDCLUTSRC_FILTER 0
|
||||
#define CONFIG_HALDCLUT_FILTER 0
|
||||
#define CONFIG_HAPQA_EXTRACT_BSF 0
|
||||
#define CONFIG_HALDCLUTSRC_FILTER 0
|
||||
#define CONFIG_HAP_DECODER 0
|
||||
#define CONFIG_HAP_ENCODER 0
|
||||
#define CONFIG_HAPQA_EXTRACT_BSF 0
|
||||
#define CONFIG_HASH_MUXER 0
|
||||
#define CONFIG_HDCD_FILTER 0
|
||||
#define CONFIG_HDS_MUXER 0
|
||||
|
@ -656,13 +656,13 @@
|
|||
#define CONFIG_HNM4_VIDEO_DECODER 0
|
||||
#define CONFIG_HNM_DEMUXER 0
|
||||
#define CONFIG_HQDN3D_FILTER 0
|
||||
#define CONFIG_HQ_HQA_DECODER 0
|
||||
#define CONFIG_HQX_DECODER 0
|
||||
#define CONFIG_HQX_FILTER 0
|
||||
#define CONFIG_HQ_HQA_DECODER 0
|
||||
#define CONFIG_HSTACK_FILTER 0
|
||||
#define CONFIG_HTTP_PROTOCOL 0
|
||||
#define CONFIG_HTTPPROXY_PROTOCOL 0
|
||||
#define CONFIG_HTTPS_PROTOCOL 0
|
||||
#define CONFIG_HTTP_PROTOCOL 0
|
||||
#define CONFIG_HUE_FILTER 0
|
||||
#define CONFIG_HUFFYUV_DECODER 0
|
||||
#define CONFIG_HUFFYUV_ENCODER 0
|
||||
|
@ -689,12 +689,12 @@
|
|||
#define CONFIG_ILBC_DEMUXER 0
|
||||
#define CONFIG_ILBC_MUXER 0
|
||||
#define CONFIG_IL_FILTER 0
|
||||
#define CONFIG_IMAGE2PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE2PIPE_MUXER 0
|
||||
#define CONFIG_IMAGE2_ALIAS_PIX_DEMUXER 0
|
||||
#define CONFIG_IMAGE2_BRENDER_PIX_DEMUXER 0
|
||||
#define CONFIG_IMAGE2_DEMUXER 0
|
||||
#define CONFIG_IMAGE2_MUXER 0
|
||||
#define CONFIG_IMAGE2PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE2PIPE_MUXER 0
|
||||
#define CONFIG_IMAGE_BMP_PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE_DDS_PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE_DPX_PIPE_DEMUXER 0
|
||||
|
@ -705,8 +705,8 @@
|
|||
#define CONFIG_IMAGE_PAM_PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE_PBM_PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE_PCX_PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE_PGMYUV_PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE_PGM_PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE_PGMYUV_PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE_PICTOR_PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE_PNG_PIPE_DEMUXER 0
|
||||
#define CONFIG_IMAGE_PPM_PIPE_DEMUXER 0
|
||||
|
@ -795,10 +795,10 @@
|
|||
#define CONFIG_LIBOPUS_ENCODER 0
|
||||
#define CONFIG_LIBRSVG_DECODER 0
|
||||
#define CONFIG_LIBRTMPE_PROTOCOL 0
|
||||
#define CONFIG_LIBRTMP_PROTOCOL 0
|
||||
#define CONFIG_LIBRTMPS_PROTOCOL 0
|
||||
#define CONFIG_LIBRTMPTE_PROTOCOL 0
|
||||
#define CONFIG_LIBRTMPT_PROTOCOL 0
|
||||
#define CONFIG_LIBRTMP_PROTOCOL 0
|
||||
#define CONFIG_LIBSHINE_ENCODER 0
|
||||
#define CONFIG_LIBSMBCLIENT_PROTOCOL 0
|
||||
#define CONFIG_LIBSPEEX_DECODER 0
|
||||
|
@ -808,9 +808,9 @@
|
|||
#define CONFIG_LIBTHEORA_ENCODER 0
|
||||
#define CONFIG_LIBTWOLAME_ENCODER 0
|
||||
#define CONFIG_LIBVMAF_FILTER 0
|
||||
#define CONFIG_LIBVO_AMRWBENC_ENCODER 0
|
||||
#define CONFIG_LIBVORBIS_DECODER 0
|
||||
#define CONFIG_LIBVORBIS_ENCODER 0
|
||||
#define CONFIG_LIBVO_AMRWBENC_ENCODER 0
|
||||
#define CONFIG_LIBVPX_VP8_DECODER 0
|
||||
#define CONFIG_LIBVPX_VP8_ENCODER 0
|
||||
#define CONFIG_LIBVPX_VP9_DECODER 0
|
||||
|
@ -819,8 +819,8 @@
|
|||
#define CONFIG_LIBWEBP_ANIM_ENCODER 0
|
||||
#define CONFIG_LIBWEBP_ENCODER 0
|
||||
#define CONFIG_LIBX262_ENCODER 0
|
||||
#define CONFIG_LIBX264RGB_ENCODER 0
|
||||
#define CONFIG_LIBX264_ENCODER 0
|
||||
#define CONFIG_LIBX264RGB_ENCODER 0
|
||||
#define CONFIG_LIBX265_ENCODER 0
|
||||
#define CONFIG_LIBXAVS_ENCODER 0
|
||||
#define CONFIG_LIBXVID_ENCODER 0
|
||||
|
@ -840,9 +840,9 @@
|
|||
#define CONFIG_LUMAKEY_FILTER 0
|
||||
#define CONFIG_LUT2_FILTER 0
|
||||
#define CONFIG_LUT3D_FILTER 0
|
||||
#define CONFIG_LUT_FILTER 0
|
||||
#define CONFIG_LUTRGB_FILTER 0
|
||||
#define CONFIG_LUTYUV_FILTER 0
|
||||
#define CONFIG_LUT_FILTER 0
|
||||
#define CONFIG_LV2_FILTER 0
|
||||
#define CONFIG_LVF_DEMUXER 0
|
||||
#define CONFIG_LXF_DEMUXER 0
|
||||
|
@ -876,10 +876,10 @@
|
|||
#define CONFIG_MIMIC_DECODER 0
|
||||
#define CONFIG_MINTERPOLATE_FILTER 0
|
||||
#define CONFIG_MIX_FILTER 0
|
||||
#define CONFIG_MJPEG_2000_DEMUXER 0
|
||||
#define CONFIG_MJPEG2JPEG_BSF 0
|
||||
#define CONFIG_MJPEGA_DUMP_HEADER_BSF 0
|
||||
#define CONFIG_MJPEGB_DECODER 0
|
||||
#define CONFIG_MJPEG_2000_DEMUXER 0
|
||||
#define CONFIG_MJPEG_CUVID_DECODER 0
|
||||
#define CONFIG_MJPEG_DECODER 0
|
||||
#define CONFIG_MJPEG_DEMUXER 0
|
||||
|
@ -897,65 +897,59 @@
|
|||
#define CONFIG_MLP_MUXER 0
|
||||
#define CONFIG_MLP_PARSER 0
|
||||
#define CONFIG_MLV_DEMUXER 0
|
||||
#define CONFIG_MM_DEMUXER 0
|
||||
#define CONFIG_MMF_DEMUXER 0
|
||||
#define CONFIG_MMF_MUXER 0
|
||||
#define CONFIG_MMSH_PROTOCOL 0
|
||||
#define CONFIG_MMST_PROTOCOL 0
|
||||
#define CONFIG_MMVIDEO_DECODER 0
|
||||
#define CONFIG_MM_DEMUXER 0
|
||||
#define CONFIG_MOTIONPIXELS_DECODER 0
|
||||
#define CONFIG_MOV2TEXTSUB_BSF 0
|
||||
#define CONFIG_MOV_DEMUXER 0
|
||||
#define CONFIG_MOVIE_FILTER 0
|
||||
#define CONFIG_MOV_MUXER 0
|
||||
#define CONFIG_MOVTEXT_DECODER 0
|
||||
#define CONFIG_MOVTEXT_ENCODER 0
|
||||
#define CONFIG_MOV_DEMUXER 0
|
||||
#define CONFIG_MOV_MUXER 0
|
||||
#define CONFIG_MP1FLOAT_DECODER 0
|
||||
#define CONFIG_MP1_AT_DECODER 0
|
||||
#define CONFIG_MP1_DECODER 0
|
||||
#define CONFIG_MP2FIXED_ENCODER 0
|
||||
#define CONFIG_MP2FLOAT_DECODER 0
|
||||
#define CONFIG_MP1FLOAT_DECODER 0
|
||||
#define CONFIG_MP2_AT_DECODER 0
|
||||
#define CONFIG_MP2_DECODER 0
|
||||
#define CONFIG_MP2_ENCODER 0
|
||||
#define CONFIG_MP2FIXED_ENCODER 0
|
||||
#define CONFIG_MP2FLOAT_DECODER 0
|
||||
#define CONFIG_MP2_MUXER 0
|
||||
#define CONFIG_MP3ADUFLOAT_DECODER 0
|
||||
#define CONFIG_MP3ADU_DECODER 0
|
||||
#define CONFIG_MP3FLOAT_DECODER 0
|
||||
#define CONFIG_MP3ON4FLOAT_DECODER 0
|
||||
#define CONFIG_MP3ON4_DECODER 0
|
||||
#define CONFIG_MP3ADUFLOAT_DECODER 0
|
||||
#define CONFIG_MP3_AT_DECODER 0
|
||||
#define CONFIG_MP3_DECODER 0
|
||||
#define CONFIG_MP3_DEMUXER 0
|
||||
#define CONFIG_MP3FLOAT_DECODER 0
|
||||
#define CONFIG_MP3_HEADER_DECOMPRESS_BSF 0
|
||||
#define CONFIG_MP3_MUXER 0
|
||||
#define CONFIG_MP3ON4_DECODER 0
|
||||
#define CONFIG_MP3ON4FLOAT_DECODER 0
|
||||
#define CONFIG_MP4_MUXER 0
|
||||
#define CONFIG_MPC7_DECODER 0
|
||||
#define CONFIG_MPC8_DECODER 0
|
||||
#define CONFIG_MPC8_DEMUXER 0
|
||||
#define CONFIG_MPC_DEMUXER 0
|
||||
#define CONFIG_MPDECIMATE_FILTER 0
|
||||
#define CONFIG_MPEG1_CUVID_DECODER 0
|
||||
#define CONFIG_MPEG1_NVDEC_HWACCEL 0
|
||||
#define CONFIG_MPEG1SYSTEM_MUXER 0
|
||||
#define CONFIG_MPEG1_V4L2M2M_DECODER 0
|
||||
#define CONFIG_MPEG1VCD_MUXER 0
|
||||
#define CONFIG_MPEG1_VDPAU_HWACCEL 0
|
||||
#define CONFIG_MPEG1VIDEO_DECODER 0
|
||||
#define CONFIG_MPEG1VIDEO_ENCODER 0
|
||||
#define CONFIG_MPEG1VIDEO_MUXER 0
|
||||
#define CONFIG_MPEG1_CUVID_DECODER 0
|
||||
#define CONFIG_MPEG1_NVDEC_HWACCEL 0
|
||||
#define CONFIG_MPEG1_V4L2M2M_DECODER 0
|
||||
#define CONFIG_MPEG1_VDPAU_HWACCEL 0
|
||||
#define CONFIG_MPEG1_VIDEOTOOLBOX_HWACCEL 0
|
||||
#define CONFIG_MPEG1_XVMC_HWACCEL 0
|
||||
#define CONFIG_MPEG2DVD_MUXER 0
|
||||
#define CONFIG_MPEG2SVCD_MUXER 0
|
||||
#define CONFIG_MPEG2VIDEO_DECODER 0
|
||||
#define CONFIG_MPEG2VIDEO_ENCODER 0
|
||||
#define CONFIG_MPEG2VIDEO_MUXER 0
|
||||
#define CONFIG_MPEG2VOB_MUXER 0
|
||||
#define CONFIG_MPEG2_CRYSTALHD_DECODER 0
|
||||
#define CONFIG_MPEG2_CUVID_DECODER 0
|
||||
#define CONFIG_MPEG2_D3D11VA2_HWACCEL 0
|
||||
#define CONFIG_MPEG2_D3D11VA_HWACCEL 0
|
||||
#define CONFIG_MPEG2DVD_MUXER 0
|
||||
#define CONFIG_MPEG2_DXVA2_HWACCEL 0
|
||||
#define CONFIG_MPEG2_MEDIACODEC_DECODER 0
|
||||
#define CONFIG_MPEG2_METADATA_BSF 0
|
||||
|
@ -963,13 +957,17 @@
|
|||
#define CONFIG_MPEG2_NVDEC_HWACCEL 0
|
||||
#define CONFIG_MPEG2_QSV_DECODER 0
|
||||
#define CONFIG_MPEG2_QSV_ENCODER 0
|
||||
#define CONFIG_MPEG2SVCD_MUXER 0
|
||||
#define CONFIG_MPEG2_V4L2M2M_DECODER 0
|
||||
#define CONFIG_MPEG2_VAAPI_ENCODER 0
|
||||
#define CONFIG_MPEG2_VAAPI_HWACCEL 0
|
||||
#define CONFIG_MPEG2_VDPAU_HWACCEL 0
|
||||
#define CONFIG_MPEG2VIDEO_DECODER 0
|
||||
#define CONFIG_MPEG2VIDEO_ENCODER 0
|
||||
#define CONFIG_MPEG2VIDEO_MUXER 0
|
||||
#define CONFIG_MPEG2_VIDEOTOOLBOX_HWACCEL 0
|
||||
#define CONFIG_MPEG2VOB_MUXER 0
|
||||
#define CONFIG_MPEG2_XVMC_HWACCEL 0
|
||||
#define CONFIG_MPEG4VIDEO_PARSER 0
|
||||
#define CONFIG_MPEG4_CRYSTALHD_DECODER 0
|
||||
#define CONFIG_MPEG4_CUVID_DECODER 0
|
||||
#define CONFIG_MPEG4_DECODER 0
|
||||
|
@ -982,12 +980,13 @@
|
|||
#define CONFIG_MPEG4_V4L2M2M_ENCODER 0
|
||||
#define CONFIG_MPEG4_VAAPI_HWACCEL 0
|
||||
#define CONFIG_MPEG4_VDPAU_HWACCEL 0
|
||||
#define CONFIG_MPEG4VIDEO_PARSER 0
|
||||
#define CONFIG_MPEG4_VIDEOTOOLBOX_HWACCEL 0
|
||||
#define CONFIG_MPEGAUDIO_PARSER 0
|
||||
#define CONFIG_MPEGPS_DEMUXER 0
|
||||
#define CONFIG_MPEGTSRAW_DEMUXER 0
|
||||
#define CONFIG_MPEGTS_DEMUXER 0
|
||||
#define CONFIG_MPEGTS_MUXER 0
|
||||
#define CONFIG_MPEGTSRAW_DEMUXER 0
|
||||
#define CONFIG_MPEGVIDEO_DECODER 0
|
||||
#define CONFIG_MPEGVIDEO_DEMUXER 0
|
||||
#define CONFIG_MPEGVIDEO_PARSER 0
|
||||
|
@ -1000,12 +999,12 @@
|
|||
#define CONFIG_MSA1_DECODER 0
|
||||
#define CONFIG_MSCC_DECODER 0
|
||||
#define CONFIG_MSF_DEMUXER 0
|
||||
#define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0
|
||||
#define CONFIG_MSMPEG4V1_DECODER 0
|
||||
#define CONFIG_MSMPEG4V2_DECODER 0
|
||||
#define CONFIG_MSMPEG4V2_ENCODER 0
|
||||
#define CONFIG_MSMPEG4V3_DECODER 0
|
||||
#define CONFIG_MSMPEG4V3_ENCODER 0
|
||||
#define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0
|
||||
#define CONFIG_MSNWC_TCP_DEMUXER 0
|
||||
#define CONFIG_MSRLE_DECODER 0
|
||||
#define CONFIG_MSS1_DECODER 0
|
||||
|
@ -1020,8 +1019,8 @@
|
|||
#define CONFIG_MUXERS 0
|
||||
#define CONFIG_MVC1_DECODER 0
|
||||
#define CONFIG_MVC2_DECODER 0
|
||||
#define CONFIG_MVI_DEMUXER 0
|
||||
#define CONFIG_MV_DEMUXER 0
|
||||
#define CONFIG_MVI_DEMUXER 0
|
||||
#define CONFIG_MXF_D10_MUXER 0
|
||||
#define CONFIG_MXF_DEMUXER 0
|
||||
#define CONFIG_MXF_MUXER 0
|
||||
|
@ -1041,10 +1040,10 @@
|
|||
#define CONFIG_NORMALIZE_FILTER 0
|
||||
#define CONFIG_NSP_DEMUXER 0
|
||||
#define CONFIG_NSV_DEMUXER 0
|
||||
#define CONFIG_NULLSINK_FILTER 0
|
||||
#define CONFIG_NULLSRC_FILTER 0
|
||||
#define CONFIG_NULL_FILTER 0
|
||||
#define CONFIG_NULL_MUXER 0
|
||||
#define CONFIG_NULLSINK_FILTER 0
|
||||
#define CONFIG_NULLSRC_FILTER 0
|
||||
#define CONFIG_NUT_DEMUXER 0
|
||||
#define CONFIG_NUT_MUXER 0
|
||||
#define CONFIG_NUV_DECODER 0
|
||||
|
@ -1197,10 +1196,10 @@
|
|||
#define CONFIG_PCX_ENCODER 0
|
||||
#define CONFIG_PERMS_FILTER 0
|
||||
#define CONFIG_PERSPECTIVE_FILTER 0
|
||||
#define CONFIG_PGMYUV_DECODER 0
|
||||
#define CONFIG_PGMYUV_ENCODER 0
|
||||
#define CONFIG_PGM_DECODER 0
|
||||
#define CONFIG_PGM_ENCODER 0
|
||||
#define CONFIG_PGMYUV_DECODER 0
|
||||
#define CONFIG_PGMYUV_ENCODER 0
|
||||
#define CONFIG_PGSSUB_DECODER 0
|
||||
#define CONFIG_PHASE_FILTER 0
|
||||
#define CONFIG_PICTOR_DECODER 0
|
||||
|
@ -1216,9 +1215,9 @@
|
|||
#define CONFIG_PNG_PARSER 0
|
||||
#define CONFIG_PNM_PARSER 0
|
||||
#define CONFIG_PP7_FILTER 0
|
||||
#define CONFIG_PP_FILTER 0
|
||||
#define CONFIG_PPM_DECODER 0
|
||||
#define CONFIG_PPM_ENCODER 0
|
||||
#define CONFIG_PP_FILTER 0
|
||||
#define CONFIG_PREMULTIPLY_FILTER 0
|
||||
#define CONFIG_PREWITT_FILTER 0
|
||||
#define CONFIG_PROCAMP_VAAPI_FILTER 0
|
||||
|
@ -1256,15 +1255,15 @@
|
|||
#define CONFIG_R210_DECODER 0
|
||||
#define CONFIG_R210_ENCODER 0
|
||||
#define CONFIG_R3D_DEMUXER 0
|
||||
#define CONFIG_RA_144_DECODER 0
|
||||
#define CONFIG_RA_144_ENCODER 0
|
||||
#define CONFIG_RA_288_DECODER 0
|
||||
#define CONFIG_RALF_DECODER 0
|
||||
#define CONFIG_RANDOM_FILTER 0
|
||||
#define CONFIG_RAWVIDEO_DECODER 0
|
||||
#define CONFIG_RAWVIDEO_DEMUXER 0
|
||||
#define CONFIG_RAWVIDEO_ENCODER 0
|
||||
#define CONFIG_RAWVIDEO_MUXER 0
|
||||
#define CONFIG_RA_144_DECODER 0
|
||||
#define CONFIG_RA_144_ENCODER 0
|
||||
#define CONFIG_RA_288_DECODER 0
|
||||
#define CONFIG_READEIA608_FILTER 0
|
||||
#define CONFIG_READVITC_FILTER 0
|
||||
#define CONFIG_REALTEXT_DECODER 0
|
||||
|
@ -1272,9 +1271,9 @@
|
|||
#define CONFIG_REALTIME_FILTER 0
|
||||
#define CONFIG_REDSPARK_DEMUXER 0
|
||||
#define CONFIG_REMAP_FILTER 0
|
||||
#define CONFIG_REMOVE_EXTRADATA_BSF 0
|
||||
#define CONFIG_REMOVEGRAIN_FILTER 0
|
||||
#define CONFIG_REMOVELOGO_FILTER 0
|
||||
#define CONFIG_REMOVE_EXTRADATA_BSF 0
|
||||
#define CONFIG_REPEATFIELDS_FILTER 0
|
||||
#define CONFIG_REPLAYGAIN_FILTER 0
|
||||
#define CONFIG_RESAMPLE_FILTER 0
|
||||
|
@ -1299,11 +1298,11 @@
|
|||
#define CONFIG_RSO_DEMUXER 0
|
||||
#define CONFIG_RSO_MUXER 0
|
||||
#define CONFIG_RTMPE_PROTOCOL 0
|
||||
#define CONFIG_RTMP_PROTOCOL 0
|
||||
#define CONFIG_RTMPS_PROTOCOL 0
|
||||
#define CONFIG_RTMPTE_PROTOCOL 0
|
||||
#define CONFIG_RTMPTS_PROTOCOL 0
|
||||
#define CONFIG_RTMPT_PROTOCOL 0
|
||||
#define CONFIG_RTMP_PROTOCOL 0
|
||||
#define CONFIG_RTMPTS_PROTOCOL 0
|
||||
#define CONFIG_RTP_DEMUXER 0
|
||||
#define CONFIG_RTP_MPEGTS_MUXER 0
|
||||
#define CONFIG_RTP_MUXER 0
|
||||
|
@ -1354,8 +1353,8 @@
|
|||
#define CONFIG_SEGAFILM_DEMUXER 0
|
||||
#define CONFIG_SEGAFILM_MUXER 0
|
||||
#define CONFIG_SEGMENT_MUXER 0
|
||||
#define CONFIG_SELECTIVECOLOR_FILTER 0
|
||||
#define CONFIG_SELECT_FILTER 0
|
||||
#define CONFIG_SELECTIVECOLOR_FILTER 0
|
||||
#define CONFIG_SENDCMD_FILTER 0
|
||||
#define CONFIG_SEPARATEFIELDS_FILTER 0
|
||||
#define CONFIG_SETDAR_FILTER 0
|
||||
|
@ -1364,9 +1363,9 @@
|
|||
#define CONFIG_SETRANGE_FILTER 0
|
||||
#define CONFIG_SETSAR_FILTER 0
|
||||
#define CONFIG_SETTB_FILTER 0
|
||||
#define CONFIG_SGIRLE_DECODER 0
|
||||
#define CONFIG_SGI_DECODER 0
|
||||
#define CONFIG_SGI_ENCODER 0
|
||||
#define CONFIG_SGIRLE_DECODER 0
|
||||
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
|
||||
#define CONFIG_SHEERVIDEO_DECODER 0
|
||||
#define CONFIG_SHORTEN_DECODER 0
|
||||
|
@ -1375,11 +1374,11 @@
|
|||
#define CONFIG_SHOWFREQS_FILTER 0
|
||||
#define CONFIG_SHOWINFO_FILTER 0
|
||||
#define CONFIG_SHOWPALETTE_FILTER 0
|
||||
#define CONFIG_SHOWSPECTRUMPIC_FILTER 0
|
||||
#define CONFIG_SHOWSPECTRUM_FILTER 0
|
||||
#define CONFIG_SHOWSPECTRUMPIC_FILTER 0
|
||||
#define CONFIG_SHOWVOLUME_FILTER 0
|
||||
#define CONFIG_SHOWWAVESPIC_FILTER 0
|
||||
#define CONFIG_SHOWWAVES_FILTER 0
|
||||
#define CONFIG_SHOWWAVESPIC_FILTER 0
|
||||
#define CONFIG_SHUFFLEFRAMES_FILTER 0
|
||||
#define CONFIG_SHUFFLEPLANES_FILTER 0
|
||||
#define CONFIG_SIDECHAINCOMPRESS_FILTER 0
|
||||
|
@ -1429,11 +1428,11 @@
|
|||
#define CONFIG_SPP_FILTER 0
|
||||
#define CONFIG_SPX_MUXER 0
|
||||
#define CONFIG_SRGC_DECODER 0
|
||||
#define CONFIG_SRTP_PROTOCOL 0
|
||||
#define CONFIG_SRT_DECODER 0
|
||||
#define CONFIG_SRT_DEMUXER 0
|
||||
#define CONFIG_SRT_ENCODER 0
|
||||
#define CONFIG_SRT_MUXER 0
|
||||
#define CONFIG_SRTP_PROTOCOL 0
|
||||
#define CONFIG_SSA_DECODER 0
|
||||
#define CONFIG_SSA_ENCODER 0
|
||||
#define CONFIG_SSIM_FILTER 0
|
||||
|
@ -1442,9 +1441,9 @@
|
|||
#define CONFIG_STEREOWIDEN_FILTER 0
|
||||
#define CONFIG_STL_DECODER 0
|
||||
#define CONFIG_STL_DEMUXER 0
|
||||
#define CONFIG_STREAMSELECT_FILTER 0
|
||||
#define CONFIG_STREAM_SEGMENT_MUXER 0
|
||||
#define CONFIG_STR_DEMUXER 0
|
||||
#define CONFIG_STREAM_SEGMENT_MUXER 0
|
||||
#define CONFIG_STREAMSELECT_FILTER 0
|
||||
#define CONFIG_SUBFILE_PROTOCOL 0
|
||||
#define CONFIG_SUBRIP_DECODER 0
|
||||
#define CONFIG_SUBRIP_ENCODER 0
|
||||
|
@ -1455,9 +1454,9 @@
|
|||
#define CONFIG_SUBVIEWER_DEMUXER 0
|
||||
#define CONFIG_SUNRAST_DECODER 0
|
||||
#define CONFIG_SUNRAST_ENCODER 0
|
||||
#define CONFIG_SUP_DEMUXER 0
|
||||
#define CONFIG_SUPER2XSAI_FILTER 0
|
||||
#define CONFIG_SUPEREQUALIZER_FILTER 0
|
||||
#define CONFIG_SUP_DEMUXER 0
|
||||
#define CONFIG_SUP_MUXER 0
|
||||
#define CONFIG_SURROUND_FILTER 0
|
||||
#define CONFIG_SVAG_DEMUXER 0
|
||||
|
@ -1495,8 +1494,8 @@
|
|||
#define CONFIG_THRESHOLD_FILTER 0
|
||||
#define CONFIG_THUMBNAIL_CUDA_FILTER 0
|
||||
#define CONFIG_THUMBNAIL_FILTER 0
|
||||
#define CONFIG_TIERTEXSEQVIDEO_DECODER 0
|
||||
#define CONFIG_TIERTEXSEQ_DEMUXER 0
|
||||
#define CONFIG_TIERTEXSEQVIDEO_DECODER 0
|
||||
#define CONFIG_TIFF_DECODER 0
|
||||
#define CONFIG_TIFF_ENCODER 0
|
||||
#define CONFIG_TILE_FILTER 0
|
||||
|
@ -1516,8 +1515,8 @@
|
|||
#define CONFIG_TRUEHD_ENCODER 0
|
||||
#define CONFIG_TRUEHD_MUXER 0
|
||||
#define CONFIG_TRUEMOTION1_DECODER 0
|
||||
#define CONFIG_TRUEMOTION2RT_DECODER 0
|
||||
#define CONFIG_TRUEMOTION2_DECODER 0
|
||||
#define CONFIG_TRUEMOTION2RT_DECODER 0
|
||||
#define CONFIG_TRUESPEECH_DECODER 0
|
||||
#define CONFIG_TSCC2_DECODER 0
|
||||
#define CONFIG_TSCC_DECODER 0
|
||||
|
@ -1541,11 +1540,11 @@
|
|||
#define CONFIG_USPP_FILTER 0
|
||||
#define CONFIG_UTVIDEO_DECODER 0
|
||||
#define CONFIG_UTVIDEO_ENCODER 0
|
||||
#define CONFIG_V210X_DECODER 0
|
||||
#define CONFIG_V210X_DEMUXER 0
|
||||
#define CONFIG_V210_DECODER 0
|
||||
#define CONFIG_V210_DEMUXER 0
|
||||
#define CONFIG_V210_ENCODER 0
|
||||
#define CONFIG_V210X_DECODER 0
|
||||
#define CONFIG_V210X_DEMUXER 0
|
||||
#define CONFIG_V308_DECODER 0
|
||||
#define CONFIG_V308_ENCODER 0
|
||||
#define CONFIG_V408_DECODER 0
|
||||
|
@ -1554,13 +1553,10 @@
|
|||
#define CONFIG_V410_ENCODER 0
|
||||
#define CONFIG_V4L2_INDEV 0
|
||||
#define CONFIG_V4L2_OUTDEV 0
|
||||
#define CONFIG_VAGUEDENOISER_FILTER 0
|
||||
#define CONFIG_VAG_DEMUXER 0
|
||||
#define CONFIG_VBLE_DECODER 0
|
||||
#define CONFIG_VAGUEDENOISER_FILTER 0
|
||||
#define CONFIG_VB_DECODER 0
|
||||
#define CONFIG_VC1IMAGE_DECODER 0
|
||||
#define CONFIG_VC1T_DEMUXER 0
|
||||
#define CONFIG_VC1T_MUXER 0
|
||||
#define CONFIG_VBLE_DECODER 0
|
||||
#define CONFIG_VC1_CRYSTALHD_DECODER 0
|
||||
#define CONFIG_VC1_CUVID_DECODER 0
|
||||
#define CONFIG_VC1_D3D11VA2_HWACCEL 0
|
||||
|
@ -1568,11 +1564,14 @@
|
|||
#define CONFIG_VC1_DECODER 0
|
||||
#define CONFIG_VC1_DEMUXER 0
|
||||
#define CONFIG_VC1_DXVA2_HWACCEL 0
|
||||
#define CONFIG_VC1IMAGE_DECODER 0
|
||||
#define CONFIG_VC1_MMAL_DECODER 0
|
||||
#define CONFIG_VC1_MUXER 0
|
||||
#define CONFIG_VC1_NVDEC_HWACCEL 0
|
||||
#define CONFIG_VC1_PARSER 0
|
||||
#define CONFIG_VC1_QSV_DECODER 0
|
||||
#define CONFIG_VC1T_DEMUXER 0
|
||||
#define CONFIG_VC1T_MUXER 0
|
||||
#define CONFIG_VC1_V4L2M2M_DECODER 0
|
||||
#define CONFIG_VC1_VAAPI_HWACCEL 0
|
||||
#define CONFIG_VC1_VDPAU_HWACCEL 0
|
||||
|
@ -1589,8 +1588,8 @@
|
|||
#define CONFIG_VIVO_DEMUXER 0
|
||||
#define CONFIG_VMAFMOTION_FILTER 0
|
||||
#define CONFIG_VMDAUDIO_DECODER 0
|
||||
#define CONFIG_VMDVIDEO_DECODER 0
|
||||
#define CONFIG_VMD_DEMUXER 0
|
||||
#define CONFIG_VMDVIDEO_DECODER 0
|
||||
#define CONFIG_VMNC_DECODER 0
|
||||
#define CONFIG_VOBSUB_DEMUXER 0
|
||||
#define CONFIG_VOC_DEMUXER 0
|
||||
|
@ -1604,8 +1603,8 @@
|
|||
#define CONFIG_VP3_PARSER 0
|
||||
#define CONFIG_VP5_DECODER 0
|
||||
#define CONFIG_VP6A_DECODER 0
|
||||
#define CONFIG_VP6F_DECODER 0
|
||||
#define CONFIG_VP6_DECODER 0
|
||||
#define CONFIG_VP6F_DECODER 0
|
||||
#define CONFIG_VP7_DECODER 0
|
||||
#define CONFIG_VP8_CUVID_DECODER 0
|
||||
#define CONFIG_VP8_MEDIACODEC_DECODER 0
|
||||
|
@ -1638,11 +1637,11 @@
|
|||
#define CONFIG_W3FDIF_FILTER 0
|
||||
#define CONFIG_W64_DEMUXER 0
|
||||
#define CONFIG_W64_MUXER 0
|
||||
#define CONFIG_WAV_DEMUXER 0
|
||||
#define CONFIG_WAVEFORM_FILTER 0
|
||||
#define CONFIG_WAV_MUXER 0
|
||||
#define CONFIG_WAVPACK_DECODER 0
|
||||
#define CONFIG_WAVPACK_ENCODER 0
|
||||
#define CONFIG_WAV_DEMUXER 0
|
||||
#define CONFIG_WAV_MUXER 0
|
||||
#define CONFIG_WC3_DEMUXER 0
|
||||
#define CONFIG_WEAVE_FILTER 0
|
||||
#define CONFIG_WEBM_CHUNK_MUXER 0
|
||||
|
@ -1666,12 +1665,12 @@
|
|||
#define CONFIG_WMV1_ENCODER 0
|
||||
#define CONFIG_WMV2_DECODER 0
|
||||
#define CONFIG_WMV2_ENCODER 0
|
||||
#define CONFIG_WMV3IMAGE_DECODER 0
|
||||
#define CONFIG_WMV3_CRYSTALHD_DECODER 0
|
||||
#define CONFIG_WMV3_D3D11VA2_HWACCEL 0
|
||||
#define CONFIG_WMV3_D3D11VA_HWACCEL 0
|
||||
#define CONFIG_WMV3_DECODER 0
|
||||
#define CONFIG_WMV3_DXVA2_HWACCEL 0
|
||||
#define CONFIG_WMV3IMAGE_DECODER 0
|
||||
#define CONFIG_WMV3_NVDEC_HWACCEL 0
|
||||
#define CONFIG_WMV3_VAAPI_HWACCEL 0
|
||||
#define CONFIG_WMV3_VDPAU_HWACCEL 0
|
||||
|
@ -1680,17 +1679,17 @@
|
|||
#define CONFIG_WRAPPED_AVFRAME_ENCODER 0
|
||||
#define CONFIG_WSAUD_DEMUXER 0
|
||||
#define CONFIG_WSD_DEMUXER 0
|
||||
#define CONFIG_WSVQA_DEMUXER 0
|
||||
#define CONFIG_WS_SND1_DECODER 0
|
||||
#define CONFIG_WSVQA_DEMUXER 0
|
||||
#define CONFIG_WTV_DEMUXER 0
|
||||
#define CONFIG_WTV_MUXER 0
|
||||
#define CONFIG_WVE_DEMUXER 0
|
||||
#define CONFIG_WV_DEMUXER 0
|
||||
#define CONFIG_WVE_DEMUXER 0
|
||||
#define CONFIG_WV_MUXER 0
|
||||
#define CONFIG_XA_DEMUXER 0
|
||||
#define CONFIG_XAN_DPCM_DECODER 0
|
||||
#define CONFIG_XAN_WC3_DECODER 0
|
||||
#define CONFIG_XAN_WC4_DECODER 0
|
||||
#define CONFIG_XA_DEMUXER 0
|
||||
#define CONFIG_XBIN_DECODER 0
|
||||
#define CONFIG_XBIN_DEMUXER 0
|
||||
#define CONFIG_XBM_DECODER 0
|
||||
|
@ -1718,10 +1717,10 @@
|
|||
#define CONFIG_YLC_DECODER 0
|
||||
#define CONFIG_YOP_DECODER 0
|
||||
#define CONFIG_YOP_DEMUXER 0
|
||||
#define CONFIG_YUV4MPEGPIPE_DEMUXER 0
|
||||
#define CONFIG_YUV4MPEGPIPE_MUXER 0
|
||||
#define CONFIG_YUV4_DECODER 0
|
||||
#define CONFIG_YUV4_ENCODER 0
|
||||
#define CONFIG_YUV4MPEGPIPE_DEMUXER 0
|
||||
#define CONFIG_YUV4MPEGPIPE_MUXER 0
|
||||
#define CONFIG_YUVTESTSRC_FILTER 0
|
||||
#define CONFIG_ZERO12V_DECODER 0
|
||||
#define CONFIG_ZEROCODEC_DECODER 0
|
||||
|
|
|
@ -16,6 +16,8 @@ SOURCES += [
|
|||
'hpeldsp_neon.S',
|
||||
'idctdsp_init_aarch64.c',
|
||||
'mdct_neon.S',
|
||||
'mpegaudiodsp_init.c',
|
||||
'mpegaudiodsp_neon.S',
|
||||
'neon.S',
|
||||
'simple_idct_neon.S',
|
||||
'videodsp.S',
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/aarch64/cpu.h"
|
||||
#include "libavcodec/mpegaudiodsp.h"
|
||||
#include "config.h"
|
||||
|
||||
void ff_mpadsp_apply_window_fixed_neon(int32_t *synth_buf, int32_t *window,
|
||||
int *dither, int16_t *samples, ptrdiff_t incr);
|
||||
void ff_mpadsp_apply_window_float_neon(float *synth_buf, float *window,
|
||||
int *dither, float *samples, ptrdiff_t incr);
|
||||
|
||||
av_cold void ff_mpadsp_init_aarch64(MPADSPContext *s)
|
||||
{
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
if (have_neon(cpu_flags)) {
|
||||
s->apply_window_fixed = ff_mpadsp_apply_window_fixed_neon;
|
||||
s->apply_window_float = ff_mpadsp_apply_window_float_neon;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,225 @@
|
|||
/*
|
||||
* Copyright (c) 2014 Janne Grunau <janne-libav@jannau.net>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/aarch64/asm.S"
|
||||
|
||||
#define FRAC_BITS 23 // fractional bits for sb_samples and dct
|
||||
#define WFRAC_BITS 16 // fractional bits for window
|
||||
#define OUT_SHIFT (WFRAC_BITS + FRAC_BITS - 15)
|
||||
|
||||
const tbl_rev128_s, align=4
|
||||
.byte 12, 13, 14, 15
|
||||
.byte 8, 9, 10, 11
|
||||
.byte 4, 5, 6, 7
|
||||
.byte 0, 1, 2, 3
|
||||
endconst
|
||||
|
||||
.macro apply_window type, st
|
||||
function ff_mpadsp_apply_window_\type\()_neon, export=1
|
||||
mov x7, x0
|
||||
add x8, x0, #512<<2
|
||||
ld1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x7], #64
|
||||
ld1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x7], #64
|
||||
st1 {v0.4s,v1.4s,v2.4s,v3.4s}, [x8], #64
|
||||
st1 {v4.4s,v5.4s,v6.4s,v7.4s}, [x8], #64
|
||||
movrel x15, tbl_rev128_s
|
||||
ld1 {v27.4s}, [x15]
|
||||
.ifc \type, fixed
|
||||
lsl x4, x4, #1
|
||||
.else
|
||||
lsl x4, x4, #2
|
||||
.endif
|
||||
add x10, x0, #45<<2
|
||||
add x0, x0, #16<<2
|
||||
add x1, x1, #16<<2
|
||||
add x5, x3, x4, lsl #5
|
||||
sub x5, x5, x4 // samples2
|
||||
neg x13, x4 // -incr
|
||||
mov x9, #64<<2
|
||||
.ifc \type, fixed
|
||||
ld1r {v16.2s}, [x2] // dither_state
|
||||
sxtl v16.2d, v16.2s
|
||||
movi v29.2d, #0
|
||||
movi v30.2d, #(1<<OUT_SHIFT)-1
|
||||
trn1 v31.2d, v29.2d, v30.2d
|
||||
trn2 v30.2d, v30.2d, v29.2d
|
||||
trn1 v16.2d, v16.2d, v29.2d
|
||||
.else
|
||||
movi v16.4s, #0
|
||||
movi v28.4s, #0
|
||||
.endif
|
||||
mov x14, #4
|
||||
1:
|
||||
mov x8, x0
|
||||
sub x7, x1, #3<<2
|
||||
sub x6, x1, x14, lsl #4
|
||||
add x7, x7, x14, lsl #4
|
||||
add x11, x6, #(32)<<2 // w + 32
|
||||
add x12, x7, #(32)<<2 // w2 + 32
|
||||
mov x15, #8
|
||||
movi v17.2d, #0
|
||||
movi v18.2d, #0
|
||||
movi v19.2d, #0
|
||||
2:
|
||||
subs x15, x15, #1
|
||||
ld1 {v0.4s}, [x8], x9
|
||||
ld1 {v1.4s}, [x10], x9
|
||||
ld1 {v2.4s}, [x6], x9
|
||||
ld1 {v3.4s}, [x7], x9
|
||||
tbl v6.16b, {v0.16b}, v27.16b
|
||||
tbl v7.16b, {v1.16b}, v27.16b
|
||||
ld1 {v4.4s}, [x11], x9
|
||||
ld1 {v5.4s}, [x12], x9
|
||||
MLA v16, v2, v0
|
||||
MLA2 v17, v2, v0
|
||||
MLS v18, v3, v6
|
||||
MLS2 v19, v3, v6
|
||||
MLS v16, v4, v7
|
||||
MLS2 v17, v4, v7
|
||||
MLS v18, v5, v1
|
||||
MLS2 v19, v5, v1
|
||||
b.gt 2b
|
||||
|
||||
cmp x14, #4
|
||||
sub x10, x10, #64<<5 // 64 * 8 * sizeof(int32_t)
|
||||
|
||||
.ifc \type, fixed
|
||||
and v28.16b, v16.16b, v30.16b
|
||||
ext v28.16b, v29.16b, v28.16b, #8
|
||||
|
||||
b.eq 4f
|
||||
round_sample v19, 1, 1
|
||||
4:
|
||||
round_sample v16, 1, 0
|
||||
shrn v16.2s, v16.2d, #OUT_SHIFT
|
||||
round_sample v19, 0, 0
|
||||
shrn v19.2s, v19.2d, #OUT_SHIFT
|
||||
round_sample v17, 0, 1
|
||||
round_sample v18, 1, 1
|
||||
round_sample v17, 1, 0
|
||||
shrn2 v16.4s, v17.2d, #OUT_SHIFT
|
||||
round_sample v18, 0, 0
|
||||
shrn2 v19.4s, v18.2d, #OUT_SHIFT
|
||||
sqxtn v16.4h, v16.4s
|
||||
sqxtn v18.4h, v19.4s
|
||||
.else
|
||||
ext v18.16b, v18.16b, v18.16b, #8
|
||||
.endif
|
||||
|
||||
st1 {v16.\st\()}[0], [x3], x4
|
||||
b.eq 4f
|
||||
st1 {v18.\st\()}[1], [x5], x13
|
||||
4:
|
||||
st1 {v16.\st\()}[1], [x3], x4
|
||||
st1 {v18.\st\()}[0], [x5], x13
|
||||
st1 {v16.\st\()}[2], [x3], x4
|
||||
st1 {v18.\st\()}[3], [x5], x13
|
||||
st1 {v16.\st\()}[3], [x3], x4
|
||||
st1 {v18.\st\()}[2], [x5], x13
|
||||
|
||||
mov v16.16b, v28.16b
|
||||
|
||||
subs x14, x14, #1
|
||||
add x0, x0, #4<<2
|
||||
sub x10, x10, #4<<2
|
||||
b.gt 1b
|
||||
|
||||
// computing samples[16]
|
||||
add x6, x1, #32<<2
|
||||
ld1 {v0.2s}, [x6], x9
|
||||
ld1 {v1.2s}, [x0], x9
|
||||
.rept 3
|
||||
ld1 {v2.2s}, [x6], x9
|
||||
ld1 {v3.2s}, [x0], x9
|
||||
MLS v16, v0, v1
|
||||
ld1 {v0.2s}, [x6], x9
|
||||
ld1 {v1.2s}, [x0], x9
|
||||
MLS v16, v2, v3
|
||||
.endr
|
||||
ld1 {v2.2s}, [x6], x9
|
||||
ld1 {v3.2s}, [x0], x9
|
||||
MLS v16, v0, v1
|
||||
MLS v16, v2, v3
|
||||
|
||||
.ifc \type, fixed
|
||||
and v28.16b, v16.16b, v30.16b
|
||||
shrn v20.2s, v16.2d, #OUT_SHIFT
|
||||
xtn v28.2s, v28.2d
|
||||
sqxtn v20.4h, v20.4s
|
||||
st1 {v28.s}[0], [x2] // save dither_state
|
||||
st1 {v20.h}[0], [x3]
|
||||
.else
|
||||
st1 {v16.s}[0], [x3]
|
||||
.endif
|
||||
|
||||
ret
|
||||
endfunc
|
||||
.purgem round_sample
|
||||
.purgem MLA
|
||||
.purgem MLA2
|
||||
.purgem MLS
|
||||
.purgem MLS2
|
||||
.endm
|
||||
|
||||
|
||||
.macro round_sample r, idx, next
|
||||
add \r\().2d, \r\().2d, v28.2d
|
||||
.if \idx == 0
|
||||
and v28.16b, \r\().16b, v30.16b
|
||||
.else // \idx == 1
|
||||
and v28.16b, \r\().16b, v31.16b
|
||||
.endif
|
||||
.if \idx != \next
|
||||
.if \next == 0
|
||||
ext v28.16b, v28.16b, v29.16b, #8
|
||||
.else
|
||||
ext v28.16b, v29.16b, v28.16b, #8
|
||||
.endif
|
||||
.endif
|
||||
.endm
|
||||
.macro MLA d, s1, s2
|
||||
smlal \d\().2d, \s1\().2s, \s2\().2s
|
||||
.endm
|
||||
.macro MLA2 d, s1, s2
|
||||
smlal2 \d\().2d, \s1\().4s, \s2\().4s
|
||||
.endm
|
||||
.macro MLS d, s1, s2
|
||||
smlsl \d\().2d, \s1\().2s, \s2\().2s
|
||||
.endm
|
||||
.macro MLS2 d, s1, s2
|
||||
smlsl2 \d\().2d, \s1\().4s, \s2\().4s
|
||||
.endm
|
||||
apply_window fixed, h
|
||||
|
||||
|
||||
// nothing to do for round_sample and ML{A,S}2
|
||||
.macro round_sample r, idx, next
|
||||
.endm
|
||||
.macro MLA2 d, s1, s2
|
||||
.endm
|
||||
.macro MLS2 d, s1, s2
|
||||
.endm
|
||||
.macro MLA d, s1, s2
|
||||
fmla \d\().4s, \s1\().4s, \s2\().4s
|
||||
.endm
|
||||
.macro MLS d, s1, s2
|
||||
fmls \d\().4s, \s1\().4s, \s2\().4s
|
||||
.endm
|
||||
apply_window float, s
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/cpu.h"
|
||||
#include "libavutil/arm/cpu.h"
|
||||
|
||||
#define FFT_FLOAT 0
|
||||
#include "libavcodec/fft.h"
|
||||
|
||||
void ff_fft_fixed_calc_neon(FFTContext *s, FFTComplex *z);
|
||||
void ff_mdct_fixed_calc_neon(FFTContext *s, FFTSample *o, const FFTSample *i);
|
||||
void ff_mdct_fixed_calcw_neon(FFTContext *s, FFTDouble *o, const FFTSample *i);
|
||||
|
||||
av_cold void ff_fft_fixed_init_arm(FFTContext *s)
|
||||
{
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
if (have_neon(cpu_flags)) {
|
||||
s->fft_permutation = FF_FFT_PERM_SWAP_LSBS;
|
||||
#if CONFIG_FFT
|
||||
s->fft_calc = ff_fft_fixed_calc_neon;
|
||||
#endif
|
||||
|
||||
#if CONFIG_MDCT
|
||||
if (!s->inverse && s->nbits >= 3) {
|
||||
s->mdct_permutation = FF_MDCT_PERM_INTERLEAVE;
|
||||
s->mdct_calc = ff_mdct_fixed_calc_neon;
|
||||
s->mdct_calcw = ff_mdct_fixed_calcw_neon;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -0,0 +1,261 @@
|
|||
/*
|
||||
* Copyright (c) 2011 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
.macro bflies d0, d1, r0, r1
|
||||
vrev64.32 \r0, \d1 @ t5, t6, t1, t2
|
||||
vhsub.s16 \r1, \d1, \r0 @ t1-t5, t2-t6, t5-t1, t6-t2
|
||||
vhadd.s16 \r0, \d1, \r0 @ t1+t5, t2+t6, t5+t1, t6+t2
|
||||
vext.16 \r1, \r1, \r1, #1 @ t2-t6, t5-t1, t6-t2, t1-t5
|
||||
vtrn.32 \r0, \r1 @ t1+t5, t2+t6, t2-t6, t5-t1
|
||||
@ t5, t6, t4, t3
|
||||
vhsub.s16 \d1, \d0, \r0
|
||||
vhadd.s16 \d0, \d0, \r0
|
||||
.endm
|
||||
|
||||
.macro transform01 q0, q1, d3, c0, c1, r0, w0, w1
|
||||
vrev32.16 \r0, \d3
|
||||
vmull.s16 \w0, \d3, \c0
|
||||
vmlal.s16 \w0, \r0, \c1
|
||||
vshrn.s32 \d3, \w0, #15
|
||||
bflies \q0, \q1, \w0, \w1
|
||||
.endm
|
||||
|
||||
.macro transform2 d0, d1, d2, d3, q0, q1, c0, c1, c2, c3, \
|
||||
r0, r1, w0, w1
|
||||
vrev32.16 \r0, \d1
|
||||
vrev32.16 \r1, \d3
|
||||
vmull.s16 \w0, \d1, \c0
|
||||
vmlal.s16 \w0, \r0, \c1
|
||||
vmull.s16 \w1, \d3, \c2
|
||||
vmlal.s16 \w1, \r1, \c3
|
||||
vshrn.s32 \d1, \w0, #15
|
||||
vshrn.s32 \d3, \w1, #15
|
||||
bflies \q0, \q1, \w0, \w1
|
||||
.endm
|
||||
|
||||
.macro fft4 d0, d1, r0, r1
|
||||
vhsub.s16 \r0, \d0, \d1 @ t3, t4, t8, t7
|
||||
vhsub.s16 \r1, \d1, \d0
|
||||
vhadd.s16 \d0, \d0, \d1 @ t1, t2, t6, t5
|
||||
vmov.i64 \d1, #0xffff00000000
|
||||
vbit \r0, \r1, \d1
|
||||
vrev64.16 \r1, \r0 @ t7, t8, t4, t3
|
||||
vtrn.32 \r0, \r1 @ t3, t4, t7, t8
|
||||
vtrn.32 \d0, \r0 @ t1, t2, t3, t4, t6, t5, t8, t7
|
||||
vhsub.s16 \d1, \d0, \r0 @ r2, i2, r3, i1
|
||||
vhadd.s16 \d0, \d0, \r0 @ r0, i0, r1, i3
|
||||
.endm
|
||||
|
||||
.macro fft8 d0, d1, d2, d3, q0, q1, c0, c1, r0, r1, w0, w1
|
||||
fft4 \d0, \d1, \r0, \r1
|
||||
vtrn.32 \d0, \d1 @ z0, z2, z1, z3
|
||||
vhadd.s16 \r0, \d2, \d3 @ t1, t2, t3, t4
|
||||
vhsub.s16 \d3, \d2, \d3 @ z5, z7
|
||||
vmov \d2, \r0
|
||||
transform01 \q0, \q1, \d3, \c0, \c1, \r0, \w0, \w1
|
||||
.endm
|
||||
|
||||
function fft4_neon
|
||||
vld1.16 {d0-d1}, [r0]
|
||||
fft4 d0, d1, d2, d3
|
||||
vst1.16 {d0-d1}, [r0]
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
function fft8_neon
|
||||
vld1.16 {d0-d3}, [r0,:128]
|
||||
movrel r1, coefs
|
||||
vld1.16 {d30}, [r1,:64]
|
||||
vdup.16 d31, d30[0]
|
||||
fft8 d0, d1, d2, d3, q0, q1, d31, d30, d20, d21, q8, q9
|
||||
vtrn.32 d0, d1
|
||||
vtrn.32 d2, d3
|
||||
vst1.16 {d0-d3}, [r0,:128]
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
function fft16_neon
|
||||
vld1.16 {d0-d3}, [r0,:128]!
|
||||
vld1.16 {d4-d7}, [r0,:128]
|
||||
movrel r1, coefs
|
||||
sub r0, r0, #32
|
||||
vld1.16 {d28-d31},[r1,:128]
|
||||
vdup.16 d31, d28[0]
|
||||
fft8 d0, d1, d2, d3, q0, q1, d31, d28, d20, d21, q8, q9
|
||||
vswp d5, d6
|
||||
fft4 q2, q3, q8, q9
|
||||
vswp d5, d6
|
||||
vtrn.32 q0, q1 @ z0, z4, z2, z6, z1, z5, z3, z7
|
||||
vtrn.32 q2, q3 @ z8, z12,z10,z14,z9, z13,z11,z15
|
||||
vswp d1, d2
|
||||
vdup.16 d31, d28[0]
|
||||
transform01 q0, q2, d5, d31, d28, d20, q8, q9
|
||||
vdup.16 d26, d29[0]
|
||||
vdup.16 d27, d30[0]
|
||||
transform2 d2, d6, d3, d7, q1, q3, d26, d30, d27, d29, \
|
||||
d20, d21, q8, q9
|
||||
vtrn.32 q0, q1
|
||||
vtrn.32 q2, q3
|
||||
vst1.16 {d0-d3}, [r0,:128]!
|
||||
vst1.16 {d4-d7}, [r0,:128]
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
function fft_pass_neon
|
||||
push {r4,lr}
|
||||
movrel lr, coefs + 24
|
||||
vld1.16 {d30}, [lr,:64]
|
||||
lsl r12, r2, #3
|
||||
vmov d31, d30
|
||||
add r3, r1, r2, lsl #2
|
||||
mov lr, #-8
|
||||
sub r3, r3, #2
|
||||
mov r4, r0
|
||||
vld1.16 {d27[]}, [r3,:16]
|
||||
sub r3, r3, #6
|
||||
vld1.16 {q0}, [r4,:128], r12
|
||||
vld1.16 {q1}, [r4,:128], r12
|
||||
vld1.16 {q2}, [r4,:128], r12
|
||||
vld1.16 {q3}, [r4,:128], r12
|
||||
vld1.16 {d28}, [r1,:64]!
|
||||
vld1.16 {d29}, [r3,:64], lr
|
||||
vswp d1, d2
|
||||
vswp d5, d6
|
||||
vtrn.32 d0, d1
|
||||
vtrn.32 d4, d5
|
||||
vdup.16 d25, d28[1]
|
||||
vmul.s16 d27, d27, d31
|
||||
transform01 q0, q2, d5, d25, d27, d20, q8, q9
|
||||
b 2f
|
||||
1:
|
||||
mov r4, r0
|
||||
vdup.16 d26, d29[0]
|
||||
vld1.16 {q0}, [r4,:128], r12
|
||||
vld1.16 {q1}, [r4,:128], r12
|
||||
vld1.16 {q2}, [r4,:128], r12
|
||||
vld1.16 {q3}, [r4,:128], r12
|
||||
vld1.16 {d28}, [r1,:64]!
|
||||
vld1.16 {d29}, [r3,:64], lr
|
||||
vswp d1, d2
|
||||
vswp d5, d6
|
||||
vtrn.32 d0, d1
|
||||
vtrn.32 d4, d5
|
||||
vdup.16 d24, d28[0]
|
||||
vdup.16 d25, d28[1]
|
||||
vdup.16 d27, d29[3]
|
||||
vmul.s16 q13, q13, q15
|
||||
transform2 d0, d4, d1, d5, q0, q2, d24, d26, d25, d27, \
|
||||
d16, d17, q9, q10
|
||||
2:
|
||||
vtrn.32 d2, d3
|
||||
vtrn.32 d6, d7
|
||||
vdup.16 d24, d28[2]
|
||||
vdup.16 d26, d29[2]
|
||||
vdup.16 d25, d28[3]
|
||||
vdup.16 d27, d29[1]
|
||||
vmul.s16 q13, q13, q15
|
||||
transform2 d2, d6, d3, d7, q1, q3, d24, d26, d25, d27, \
|
||||
d16, d17, q9, q10
|
||||
vtrn.32 d0, d1
|
||||
vtrn.32 d2, d3
|
||||
vtrn.32 d4, d5
|
||||
vtrn.32 d6, d7
|
||||
vswp d1, d2
|
||||
vswp d5, d6
|
||||
mov r4, r0
|
||||
vst1.16 {q0}, [r4,:128], r12
|
||||
vst1.16 {q1}, [r4,:128], r12
|
||||
vst1.16 {q2}, [r4,:128], r12
|
||||
vst1.16 {q3}, [r4,:128], r12
|
||||
add r0, r0, #16
|
||||
subs r2, r2, #2
|
||||
bgt 1b
|
||||
pop {r4,pc}
|
||||
endfunc
|
||||
|
||||
#define F_SQRT1_2 23170
|
||||
#define F_COS_16_1 30274
|
||||
#define F_COS_16_3 12540
|
||||
|
||||
const coefs, align=4
|
||||
.short F_SQRT1_2, -F_SQRT1_2, -F_SQRT1_2, F_SQRT1_2
|
||||
.short F_COS_16_1,-F_COS_16_1,-F_COS_16_1, F_COS_16_1
|
||||
.short F_COS_16_3,-F_COS_16_3,-F_COS_16_3, F_COS_16_3
|
||||
.short 1, -1, -1, 1
|
||||
endconst
|
||||
|
||||
.macro def_fft n, n2, n4
|
||||
function fft\n\()_neon
|
||||
push {r4, lr}
|
||||
mov r4, r0
|
||||
bl fft\n2\()_neon
|
||||
add r0, r4, #\n4*2*4
|
||||
bl fft\n4\()_neon
|
||||
add r0, r4, #\n4*3*4
|
||||
bl fft\n4\()_neon
|
||||
mov r0, r4
|
||||
pop {r4, lr}
|
||||
movrelx r1, X(ff_cos_\n\()_fixed)
|
||||
mov r2, #\n4/2
|
||||
b fft_pass_neon
|
||||
endfunc
|
||||
.endm
|
||||
|
||||
def_fft 32, 16, 8
|
||||
def_fft 64, 32, 16
|
||||
def_fft 128, 64, 32
|
||||
def_fft 256, 128, 64
|
||||
def_fft 512, 256, 128
|
||||
def_fft 1024, 512, 256
|
||||
def_fft 2048, 1024, 512
|
||||
def_fft 4096, 2048, 1024
|
||||
def_fft 8192, 4096, 2048
|
||||
def_fft 16384, 8192, 4096
|
||||
def_fft 32768, 16384, 8192
|
||||
def_fft 65536, 32768, 16384
|
||||
|
||||
function ff_fft_fixed_calc_neon, export=1
|
||||
ldr r2, [r0]
|
||||
sub r2, r2, #2
|
||||
movrel r3, fft_fixed_tab_neon
|
||||
ldr r3, [r3, r2, lsl #2]
|
||||
mov r0, r1
|
||||
bx r3
|
||||
endfunc
|
||||
|
||||
const fft_fixed_tab_neon, relocate=1
|
||||
.word fft4_neon
|
||||
.word fft8_neon
|
||||
.word fft16_neon
|
||||
.word fft32_neon
|
||||
.word fft64_neon
|
||||
.word fft128_neon
|
||||
.word fft256_neon
|
||||
.word fft512_neon
|
||||
.word fft1024_neon
|
||||
.word fft2048_neon
|
||||
.word fft4096_neon
|
||||
.word fft8192_neon
|
||||
.word fft16384_neon
|
||||
.word fft32768_neon
|
||||
.word fft65536_neon
|
||||
endconst
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/cpu.h"
|
||||
#include "libavutil/arm/cpu.h"
|
||||
|
||||
#include "libavcodec/fft.h"
|
||||
|
||||
void ff_fft_calc_vfp(FFTContext *s, FFTComplex *z);
|
||||
|
||||
void ff_fft_permute_neon(FFTContext *s, FFTComplex *z);
|
||||
void ff_fft_calc_neon(FFTContext *s, FFTComplex *z);
|
||||
|
||||
void ff_imdct_half_vfp(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
|
||||
void ff_imdct_calc_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
void ff_imdct_half_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
void ff_mdct_calc_neon(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
|
||||
av_cold void ff_fft_init_arm(FFTContext *s)
|
||||
{
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
if (have_vfp_vm(cpu_flags)) {
|
||||
s->fft_calc = ff_fft_calc_vfp;
|
||||
#if CONFIG_MDCT
|
||||
s->imdct_half = ff_imdct_half_vfp;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (have_neon(cpu_flags)) {
|
||||
#if CONFIG_FFT
|
||||
s->fft_permute = ff_fft_permute_neon;
|
||||
s->fft_calc = ff_fft_calc_neon;
|
||||
#endif
|
||||
#if CONFIG_MDCT
|
||||
s->imdct_calc = ff_imdct_calc_neon;
|
||||
s->imdct_half = ff_imdct_half_neon;
|
||||
s->mdct_calc = ff_mdct_calc_neon;
|
||||
s->mdct_permutation = FF_MDCT_PERM_INTERLEAVE;
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -0,0 +1,375 @@
|
|||
/*
|
||||
* ARM NEON optimised FFT
|
||||
*
|
||||
* Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
|
||||
* Copyright (c) 2009 Naotoshi Nojiri
|
||||
*
|
||||
* This algorithm (though not any of the implementation details) is
|
||||
* based on libdjbfft by D. J. Bernstein.
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
#define M_SQRT1_2 0.70710678118654752440
|
||||
|
||||
|
||||
function fft4_neon
|
||||
vld1.32 {d0-d3}, [r0,:128]
|
||||
|
||||
vext.32 q8, q1, q1, #1 @ i2,r3 d3=i3,r2
|
||||
vsub.f32 d6, d0, d1 @ r0-r1,i0-i1
|
||||
vsub.f32 d7, d16, d17 @ r3-r2,i2-i3
|
||||
vadd.f32 d4, d0, d1 @ r0+r1,i0+i1
|
||||
vadd.f32 d5, d2, d3 @ i2+i3,r2+r3
|
||||
vadd.f32 d1, d6, d7
|
||||
vsub.f32 d3, d6, d7
|
||||
vadd.f32 d0, d4, d5
|
||||
vsub.f32 d2, d4, d5
|
||||
|
||||
vst1.32 {d0-d3}, [r0,:128]
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
function fft8_neon
|
||||
mov r1, r0
|
||||
vld1.32 {d0-d3}, [r1,:128]!
|
||||
vld1.32 {d16-d19}, [r1,:128]
|
||||
|
||||
movw r2, #0x04f3 @ sqrt(1/2)
|
||||
movt r2, #0x3f35
|
||||
eor r3, r2, #1<<31
|
||||
vdup.32 d31, r2
|
||||
|
||||
vext.32 q11, q1, q1, #1 @ i2,r3,i3,r2
|
||||
vadd.f32 d4, d16, d17 @ r4+r5,i4+i5
|
||||
vmov d28, r3, r2
|
||||
vadd.f32 d5, d18, d19 @ r6+r7,i6+i7
|
||||
vsub.f32 d17, d16, d17 @ r4-r5,i4-i5
|
||||
vsub.f32 d19, d18, d19 @ r6-r7,i6-i7
|
||||
vrev64.32 d29, d28
|
||||
vadd.f32 d20, d0, d1 @ r0+r1,i0+i1
|
||||
vadd.f32 d21, d2, d3 @ r2+r3,i2+i3
|
||||
vmul.f32 d26, d17, d28 @ -a2r*w,a2i*w
|
||||
vext.32 q3, q2, q2, #1
|
||||
vmul.f32 d27, d19, d29 @ a3r*w,-a3i*w
|
||||
vsub.f32 d23, d22, d23 @ i2-i3,r3-r2
|
||||
vsub.f32 d22, d0, d1 @ r0-r1,i0-i1
|
||||
vmul.f32 d24, d17, d31 @ a2r*w,a2i*w
|
||||
vmul.f32 d25, d19, d31 @ a3r*w,a3i*w
|
||||
vadd.f32 d0, d20, d21
|
||||
vsub.f32 d2, d20, d21
|
||||
vadd.f32 d1, d22, d23
|
||||
vrev64.32 q13, q13
|
||||
vsub.f32 d3, d22, d23
|
||||
vsub.f32 d6, d6, d7
|
||||
vadd.f32 d24, d24, d26 @ a2r+a2i,a2i-a2r t1,t2
|
||||
vadd.f32 d25, d25, d27 @ a3r-a3i,a3i+a3r t5,t6
|
||||
vadd.f32 d7, d4, d5
|
||||
vsub.f32 d18, d2, d6
|
||||
vext.32 q13, q12, q12, #1
|
||||
vadd.f32 d2, d2, d6
|
||||
vsub.f32 d16, d0, d7
|
||||
vadd.f32 d5, d25, d24
|
||||
vsub.f32 d4, d26, d27
|
||||
vadd.f32 d0, d0, d7
|
||||
vsub.f32 d17, d1, d5
|
||||
vsub.f32 d19, d3, d4
|
||||
vadd.f32 d3, d3, d4
|
||||
vadd.f32 d1, d1, d5
|
||||
|
||||
vst1.32 {d16-d19}, [r1,:128]
|
||||
vst1.32 {d0-d3}, [r0,:128]
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
function fft16_neon
|
||||
movrel r1, mppm
|
||||
vld1.32 {d16-d19}, [r0,:128]! @ q8{r0,i0,r1,i1} q9{r2,i2,r3,i3}
|
||||
pld [r0, #32]
|
||||
vld1.32 {d2-d3}, [r1,:128]
|
||||
vext.32 q13, q9, q9, #1
|
||||
vld1.32 {d22-d25}, [r0,:128]! @ q11{r4,i4,r5,i5} q12{r6,i5,r7,i7}
|
||||
vadd.f32 d4, d16, d17
|
||||
vsub.f32 d5, d16, d17
|
||||
vadd.f32 d18, d18, d19
|
||||
vsub.f32 d19, d26, d27
|
||||
|
||||
vadd.f32 d20, d22, d23
|
||||
vsub.f32 d22, d22, d23
|
||||
vsub.f32 d23, d24, d25
|
||||
vadd.f32 q8, q2, q9 @ {r0,i0,r1,i1}
|
||||
vadd.f32 d21, d24, d25
|
||||
vmul.f32 d24, d22, d2
|
||||
vsub.f32 q9, q2, q9 @ {r2,i2,r3,i3}
|
||||
vmul.f32 d25, d23, d3
|
||||
vuzp.32 d16, d17 @ {r0,r1,i0,i1}
|
||||
vmul.f32 q1, q11, d2[1]
|
||||
vuzp.32 d18, d19 @ {r2,r3,i2,i3}
|
||||
vrev64.32 q12, q12
|
||||
vadd.f32 q11, q12, q1 @ {t1a,t2a,t5,t6}
|
||||
vld1.32 {d24-d27}, [r0,:128]! @ q12{r8,i8,r9,i9} q13{r10,i10,r11,i11}
|
||||
vzip.32 q10, q11
|
||||
vld1.32 {d28-d31}, [r0,:128] @ q14{r12,i12,r13,i13} q15{r14,i14,r15,i15}
|
||||
vadd.f32 d0, d22, d20
|
||||
vadd.f32 d1, d21, d23
|
||||
vsub.f32 d2, d21, d23
|
||||
vsub.f32 d3, d22, d20
|
||||
sub r0, r0, #96
|
||||
vext.32 q13, q13, q13, #1
|
||||
vsub.f32 q10, q8, q0 @ {r4,r5,i4,i5}
|
||||
vadd.f32 q8, q8, q0 @ {r0,r1,i0,i1}
|
||||
vext.32 q15, q15, q15, #1
|
||||
vsub.f32 q11, q9, q1 @ {r6,r7,i6,i7}
|
||||
vswp d25, d26 @ q12{r8,i8,i10,r11} q13{r9,i9,i11,r10}
|
||||
vadd.f32 q9, q9, q1 @ {r2,r3,i2,i3}
|
||||
vswp d29, d30 @ q14{r12,i12,i14,r15} q15{r13,i13,i15,r14}
|
||||
vadd.f32 q0, q12, q13 @ {t1,t2,t5,t6}
|
||||
vadd.f32 q1, q14, q15 @ {t1a,t2a,t5a,t6a}
|
||||
movrelx r2, X(ff_cos_16)
|
||||
vsub.f32 q13, q12, q13 @ {t3,t4,t7,t8}
|
||||
vrev64.32 d1, d1
|
||||
vsub.f32 q15, q14, q15 @ {t3a,t4a,t7a,t8a}
|
||||
vrev64.32 d3, d3
|
||||
movrel r3, pmmp
|
||||
vswp d1, d26 @ q0{t1,t2,t3,t4} q13{t6,t5,t7,t8}
|
||||
vswp d3, d30 @ q1{t1a,t2a,t3a,t4a} q15{t6a,t5a,t7a,t8a}
|
||||
vadd.f32 q12, q0, q13 @ {r8,i8,r9,i9}
|
||||
vadd.f32 q14, q1, q15 @ {r12,i12,r13,i13}
|
||||
vld1.32 {d4-d5}, [r2,:64]
|
||||
vsub.f32 q13, q0, q13 @ {r10,i10,r11,i11}
|
||||
vsub.f32 q15, q1, q15 @ {r14,i14,r15,i15}
|
||||
vswp d25, d28 @ q12{r8,i8,r12,i12} q14{r9,i9,r13,i13}
|
||||
vld1.32 {d6-d7}, [r3,:128]
|
||||
vrev64.32 q1, q14
|
||||
vmul.f32 q14, q14, d4[1]
|
||||
vmul.f32 q1, q1, q3
|
||||
vmla.f32 q14, q1, d5[1] @ {t1a,t2a,t5a,t6a}
|
||||
vswp d27, d30 @ q13{r10,i10,r14,i14} q15{r11,i11,r15,i15}
|
||||
vzip.32 q12, q14
|
||||
vadd.f32 d0, d28, d24
|
||||
vadd.f32 d1, d25, d29
|
||||
vsub.f32 d2, d25, d29
|
||||
vsub.f32 d3, d28, d24
|
||||
vsub.f32 q12, q8, q0 @ {r8,r9,i8,i9}
|
||||
vadd.f32 q8, q8, q0 @ {r0,r1,i0,i1}
|
||||
vsub.f32 q14, q10, q1 @ {r12,r13,i12,i13}
|
||||
mov r1, #32
|
||||
vadd.f32 q10, q10, q1 @ {r4,r5,i4,i5}
|
||||
vrev64.32 q0, q13
|
||||
vmul.f32 q13, q13, d5[0]
|
||||
vrev64.32 q1, q15
|
||||
vmul.f32 q15, q15, d5[1]
|
||||
vst2.32 {d16-d17},[r0,:128], r1
|
||||
vmul.f32 q0, q0, q3
|
||||
vst2.32 {d20-d21},[r0,:128], r1
|
||||
vmul.f32 q1, q1, q3
|
||||
vmla.f32 q13, q0, d5[0] @ {t1,t2,t5,t6}
|
||||
vmla.f32 q15, q1, d4[1] @ {t1a,t2a,t5a,t6a}
|
||||
vst2.32 {d24-d25},[r0,:128], r1
|
||||
vst2.32 {d28-d29},[r0,:128]
|
||||
vzip.32 q13, q15
|
||||
sub r0, r0, #80
|
||||
vadd.f32 d0, d30, d26
|
||||
vadd.f32 d1, d27, d31
|
||||
vsub.f32 d2, d27, d31
|
||||
vsub.f32 d3, d30, d26
|
||||
vsub.f32 q13, q9, q0 @ {r10,r11,i10,i11}
|
||||
vadd.f32 q9, q9, q0 @ {r2,r3,i2,i3}
|
||||
vsub.f32 q15, q11, q1 @ {r14,r15,i14,i15}
|
||||
vadd.f32 q11, q11, q1 @ {r6,r7,i6,i7}
|
||||
vst2.32 {d18-d19},[r0,:128], r1
|
||||
vst2.32 {d22-d23},[r0,:128], r1
|
||||
vst2.32 {d26-d27},[r0,:128], r1
|
||||
vst2.32 {d30-d31},[r0,:128]
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
function fft_pass_neon
|
||||
push {r4-r6,lr}
|
||||
mov r6, r2 @ n
|
||||
lsl r5, r2, #3 @ 2 * n * sizeof FFTSample
|
||||
lsl r4, r2, #4 @ 2 * n * sizeof FFTComplex
|
||||
lsl r2, r2, #5 @ 4 * n * sizeof FFTComplex
|
||||
add r3, r2, r4
|
||||
add r4, r4, r0 @ &z[o1]
|
||||
add r2, r2, r0 @ &z[o2]
|
||||
add r3, r3, r0 @ &z[o3]
|
||||
vld1.32 {d20-d21},[r2,:128] @ {z[o2],z[o2+1]}
|
||||
movrel r12, pmmp
|
||||
vld1.32 {d22-d23},[r3,:128] @ {z[o3],z[o3+1]}
|
||||
add r5, r5, r1 @ wim
|
||||
vld1.32 {d6-d7}, [r12,:128] @ pmmp
|
||||
vswp d21, d22
|
||||
vld1.32 {d4}, [r1,:64]! @ {wre[0],wre[1]}
|
||||
sub r5, r5, #4 @ wim--
|
||||
vrev64.32 q1, q11
|
||||
vmul.f32 q11, q11, d4[1]
|
||||
vmul.f32 q1, q1, q3
|
||||
vld1.32 {d5[0]}, [r5,:32] @ d5[0] = wim[-1]
|
||||
vmla.f32 q11, q1, d5[0] @ {t1a,t2a,t5a,t6a}
|
||||
vld2.32 {d16-d17},[r0,:128] @ {z[0],z[1]}
|
||||
sub r6, r6, #1 @ n--
|
||||
vld2.32 {d18-d19},[r4,:128] @ {z[o1],z[o1+1]}
|
||||
vzip.32 q10, q11
|
||||
vadd.f32 d0, d22, d20
|
||||
vadd.f32 d1, d21, d23
|
||||
vsub.f32 d2, d21, d23
|
||||
vsub.f32 d3, d22, d20
|
||||
vsub.f32 q10, q8, q0
|
||||
vadd.f32 q8, q8, q0
|
||||
vsub.f32 q11, q9, q1
|
||||
vadd.f32 q9, q9, q1
|
||||
vst2.32 {d20-d21},[r2,:128]! @ {z[o2],z[o2+1]}
|
||||
vst2.32 {d16-d17},[r0,:128]! @ {z[0],z[1]}
|
||||
vst2.32 {d22-d23},[r3,:128]! @ {z[o3],z[o3+1]}
|
||||
vst2.32 {d18-d19},[r4,:128]! @ {z[o1],z[o1+1]}
|
||||
sub r5, r5, #8 @ wim -= 2
|
||||
1:
|
||||
vld1.32 {d20-d21},[r2,:128] @ {z[o2],z[o2+1]}
|
||||
vld1.32 {d22-d23},[r3,:128] @ {z[o3],z[o3+1]}
|
||||
vswp d21, d22
|
||||
vld1.32 {d4}, [r1]! @ {wre[0],wre[1]}
|
||||
vrev64.32 q0, q10
|
||||
vmul.f32 q10, q10, d4[0]
|
||||
vrev64.32 q1, q11
|
||||
vmul.f32 q11, q11, d4[1]
|
||||
vld1.32 {d5}, [r5] @ {wim[-1],wim[0]}
|
||||
vmul.f32 q0, q0, q3
|
||||
sub r5, r5, #8 @ wim -= 2
|
||||
vmul.f32 q1, q1, q3
|
||||
vmla.f32 q10, q0, d5[1] @ {t1,t2,t5,t6}
|
||||
vmla.f32 q11, q1, d5[0] @ {t1a,t2a,t5a,t6a}
|
||||
vld2.32 {d16-d17},[r0,:128] @ {z[0],z[1]}
|
||||
subs r6, r6, #1 @ n--
|
||||
vld2.32 {d18-d19},[r4,:128] @ {z[o1],z[o1+1]}
|
||||
vzip.32 q10, q11
|
||||
vadd.f32 d0, d22, d20
|
||||
vadd.f32 d1, d21, d23
|
||||
vsub.f32 d2, d21, d23
|
||||
vsub.f32 d3, d22, d20
|
||||
vsub.f32 q10, q8, q0
|
||||
vadd.f32 q8, q8, q0
|
||||
vsub.f32 q11, q9, q1
|
||||
vadd.f32 q9, q9, q1
|
||||
vst2.32 {d20-d21}, [r2,:128]! @ {z[o2],z[o2+1]}
|
||||
vst2.32 {d16-d17}, [r0,:128]! @ {z[0],z[1]}
|
||||
vst2.32 {d22-d23}, [r3,:128]! @ {z[o3],z[o3+1]}
|
||||
vst2.32 {d18-d19}, [r4,:128]! @ {z[o1],z[o1+1]}
|
||||
bne 1b
|
||||
|
||||
pop {r4-r6,pc}
|
||||
endfunc
|
||||
|
||||
.macro def_fft n, n2, n4
|
||||
.align 6
|
||||
function fft\n\()_neon
|
||||
push {r4, lr}
|
||||
mov r4, r0
|
||||
bl fft\n2\()_neon
|
||||
add r0, r4, #\n4*2*8
|
||||
bl fft\n4\()_neon
|
||||
add r0, r4, #\n4*3*8
|
||||
bl fft\n4\()_neon
|
||||
mov r0, r4
|
||||
pop {r4, lr}
|
||||
movrelx r1, X(ff_cos_\n)
|
||||
mov r2, #\n4/2
|
||||
b fft_pass_neon
|
||||
endfunc
|
||||
.endm
|
||||
|
||||
def_fft 32, 16, 8
|
||||
def_fft 64, 32, 16
|
||||
def_fft 128, 64, 32
|
||||
def_fft 256, 128, 64
|
||||
def_fft 512, 256, 128
|
||||
def_fft 1024, 512, 256
|
||||
def_fft 2048, 1024, 512
|
||||
def_fft 4096, 2048, 1024
|
||||
def_fft 8192, 4096, 2048
|
||||
def_fft 16384, 8192, 4096
|
||||
def_fft 32768, 16384, 8192
|
||||
def_fft 65536, 32768, 16384
|
||||
|
||||
function ff_fft_calc_neon, export=1
|
||||
ldr r2, [r0]
|
||||
sub r2, r2, #2
|
||||
movrel r3, fft_tab_neon
|
||||
ldr r3, [r3, r2, lsl #2]
|
||||
mov r0, r1
|
||||
bx r3
|
||||
endfunc
|
||||
|
||||
function ff_fft_permute_neon, export=1
|
||||
push {r4,lr}
|
||||
mov r12, #1
|
||||
ldr r2, [r0] @ nbits
|
||||
ldr r3, [r0, #12] @ tmp_buf
|
||||
ldr r0, [r0, #8] @ revtab
|
||||
lsl r12, r12, r2
|
||||
mov r2, r12
|
||||
1:
|
||||
vld1.32 {d0-d1}, [r1,:128]!
|
||||
ldr r4, [r0], #4
|
||||
uxth lr, r4
|
||||
uxth r4, r4, ror #16
|
||||
add lr, r3, lr, lsl #3
|
||||
add r4, r3, r4, lsl #3
|
||||
vst1.32 {d0}, [lr,:64]
|
||||
vst1.32 {d1}, [r4,:64]
|
||||
subs r12, r12, #2
|
||||
bgt 1b
|
||||
|
||||
sub r1, r1, r2, lsl #3
|
||||
1:
|
||||
vld1.32 {d0-d3}, [r3,:128]!
|
||||
vst1.32 {d0-d3}, [r1,:128]!
|
||||
subs r2, r2, #4
|
||||
bgt 1b
|
||||
|
||||
pop {r4,pc}
|
||||
endfunc
|
||||
|
||||
const fft_tab_neon, relocate=1
|
||||
.word fft4_neon
|
||||
.word fft8_neon
|
||||
.word fft16_neon
|
||||
.word fft32_neon
|
||||
.word fft64_neon
|
||||
.word fft128_neon
|
||||
.word fft256_neon
|
||||
.word fft512_neon
|
||||
.word fft1024_neon
|
||||
.word fft2048_neon
|
||||
.word fft4096_neon
|
||||
.word fft8192_neon
|
||||
.word fft16384_neon
|
||||
.word fft32768_neon
|
||||
.word fft65536_neon
|
||||
endconst
|
||||
|
||||
const pmmp, align=4
|
||||
.float +1.0, -1.0, -1.0, +1.0
|
||||
endconst
|
||||
|
||||
const mppm, align=4
|
||||
.float -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2
|
||||
endconst
|
|
@ -0,0 +1,530 @@
|
|||
/*
|
||||
* Copyright (c) 2013 RISC OS Open Ltd
|
||||
* Author: Ben Avison <bavison@riscosopen.org>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
@ The fftx_internal_vfp versions of the functions obey a modified AAPCS:
|
||||
@ VFP is in RunFast mode, vector length 4, stride 1 thoroughout, and
|
||||
@ all single-precision VFP registers may be corrupted on exit. The a2
|
||||
@ register may not be clobbered in these functions, as it holds the
|
||||
@ stored original FPSCR.
|
||||
|
||||
function ff_fft_calc_vfp, export=1
|
||||
ldr ip, [a1, #0] @ nbits
|
||||
mov a1, a2
|
||||
movrel a2, (fft_tab_vfp - 8)
|
||||
ldr pc, [a2, ip, lsl #2]
|
||||
endfunc
|
||||
const fft_tab_vfp, relocate=1
|
||||
.word fft4_vfp
|
||||
.word fft8_vfp
|
||||
.word X(ff_fft16_vfp) @ this one alone is exported
|
||||
.word fft32_vfp
|
||||
.word fft64_vfp
|
||||
.word fft128_vfp
|
||||
.word fft256_vfp
|
||||
.word fft512_vfp
|
||||
.word fft1024_vfp
|
||||
.word fft2048_vfp
|
||||
.word fft4096_vfp
|
||||
.word fft8192_vfp
|
||||
.word fft16384_vfp
|
||||
.word fft32768_vfp
|
||||
.word fft65536_vfp
|
||||
endconst
|
||||
|
||||
function fft4_vfp
|
||||
vldr d0, [a1, #0*2*4] @ s0,s1 = z[0]
|
||||
vldr d4, [a1, #1*2*4] @ s8,s9 = z[1]
|
||||
vldr d1, [a1, #2*2*4] @ s2,s3 = z[2]
|
||||
vldr d5, [a1, #3*2*4] @ s10,s11 = z[3]
|
||||
@ stall
|
||||
vadd.f s12, s0, s8 @ i0
|
||||
vadd.f s13, s1, s9 @ i1
|
||||
vadd.f s14, s2, s10 @ i2
|
||||
vadd.f s15, s3, s11 @ i3
|
||||
vsub.f s8, s0, s8 @ i4
|
||||
vsub.f s9, s1, s9 @ i5
|
||||
vsub.f s10, s2, s10 @ i6
|
||||
vsub.f s11, s3, s11 @ i7
|
||||
@ stall
|
||||
@ stall
|
||||
vadd.f s0, s12, s14 @ z[0].re
|
||||
vsub.f s4, s12, s14 @ z[2].re
|
||||
vadd.f s1, s13, s15 @ z[0].im
|
||||
vsub.f s5, s13, s15 @ z[2].im
|
||||
vadd.f s7, s9, s10 @ z[3].im
|
||||
vsub.f s3, s9, s10 @ z[1].im
|
||||
vadd.f s2, s8, s11 @ z[1].re
|
||||
vsub.f s6, s8, s11 @ z[3].re
|
||||
@ stall
|
||||
@ stall
|
||||
vstr d0, [a1, #0*2*4]
|
||||
vstr d2, [a1, #2*2*4]
|
||||
@ stall
|
||||
@ stall
|
||||
vstr d1, [a1, #1*2*4]
|
||||
vstr d3, [a1, #3*2*4]
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
.macro macro_fft8_head
|
||||
@ FFT4
|
||||
vldr d4, [a1, #0 * 2*4]
|
||||
vldr d6, [a1, #1 * 2*4]
|
||||
vldr d5, [a1, #2 * 2*4]
|
||||
vldr d7, [a1, #3 * 2*4]
|
||||
@ BF
|
||||
vldr d12, [a1, #4 * 2*4]
|
||||
vadd.f s16, s8, s12 @ vector op
|
||||
vldr d14, [a1, #5 * 2*4]
|
||||
vldr d13, [a1, #6 * 2*4]
|
||||
vldr d15, [a1, #7 * 2*4]
|
||||
vsub.f s20, s8, s12 @ vector op
|
||||
vadd.f s0, s16, s18
|
||||
vsub.f s2, s16, s18
|
||||
vadd.f s1, s17, s19
|
||||
vsub.f s3, s17, s19
|
||||
vadd.f s7, s21, s22
|
||||
vsub.f s5, s21, s22
|
||||
vadd.f s4, s20, s23
|
||||
vsub.f s6, s20, s23
|
||||
vsub.f s20, s24, s28 @ vector op
|
||||
vstr d0, [a1, #0 * 2*4] @ transfer s0-s7 to s24-s31 via memory
|
||||
vstr d1, [a1, #1 * 2*4]
|
||||
vldr s0, cos1pi4
|
||||
vadd.f s16, s24, s28 @ vector op
|
||||
vstr d2, [a1, #2 * 2*4]
|
||||
vstr d3, [a1, #3 * 2*4]
|
||||
vldr d12, [a1, #0 * 2*4]
|
||||
@ TRANSFORM
|
||||
vmul.f s20, s20, s0 @ vector x scalar op
|
||||
vldr d13, [a1, #1 * 2*4]
|
||||
vldr d14, [a1, #2 * 2*4]
|
||||
vldr d15, [a1, #3 * 2*4]
|
||||
@ BUTTERFLIES
|
||||
vadd.f s0, s18, s16
|
||||
vadd.f s1, s17, s19
|
||||
vsub.f s2, s17, s19
|
||||
vsub.f s3, s18, s16
|
||||
vadd.f s4, s21, s20
|
||||
vsub.f s5, s21, s20
|
||||
vadd.f s6, s22, s23
|
||||
vsub.f s7, s22, s23
|
||||
vadd.f s8, s0, s24 @ vector op
|
||||
vstr d0, [a1, #0 * 2*4] @ transfer s0-s3 to s12-s15 via memory
|
||||
vstr d1, [a1, #1 * 2*4]
|
||||
vldr d6, [a1, #0 * 2*4]
|
||||
vldr d7, [a1, #1 * 2*4]
|
||||
vadd.f s1, s5, s6
|
||||
vadd.f s0, s7, s4
|
||||
vsub.f s2, s5, s6
|
||||
vsub.f s3, s7, s4
|
||||
vsub.f s12, s24, s12 @ vector op
|
||||
vsub.f s5, s29, s1
|
||||
vsub.f s4, s28, s0
|
||||
vsub.f s6, s30, s2
|
||||
vsub.f s7, s31, s3
|
||||
vadd.f s16, s0, s28 @ vector op
|
||||
vstr d6, [a1, #4 * 2*4]
|
||||
vstr d7, [a1, #6 * 2*4]
|
||||
vstr d4, [a1, #0 * 2*4]
|
||||
vstr d5, [a1, #2 * 2*4]
|
||||
vstr d2, [a1, #5 * 2*4]
|
||||
vstr d3, [a1, #7 * 2*4]
|
||||
.endm
|
||||
|
||||
.macro macro_fft8_tail
|
||||
vstr d8, [a1, #1 * 2*4]
|
||||
vstr d9, [a1, #3 * 2*4]
|
||||
.endm
|
||||
|
||||
function .Lfft8_internal_vfp
|
||||
macro_fft8_head
|
||||
macro_fft8_tail
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
function fft8_vfp
|
||||
ldr a3, =0x03030000 @ RunFast mode, vector length 4, stride 1
|
||||
fmrx a2, FPSCR
|
||||
fmxr FPSCR, a3
|
||||
vpush {s16-s31}
|
||||
mov ip, lr
|
||||
bl .Lfft8_internal_vfp
|
||||
vpop {s16-s31}
|
||||
fmxr FPSCR, a2
|
||||
bx ip
|
||||
endfunc
|
||||
|
||||
.align 3
|
||||
cos1pi4: @ cos(1*pi/4) = sqrt(2)
|
||||
.float 0.707106769084930419921875
|
||||
cos1pi8: @ cos(1*pi/8) = sqrt(2+sqrt(2))/2
|
||||
.float 0.92387950420379638671875
|
||||
cos3pi8: @ cos(2*pi/8) = sqrt(2-sqrt(2))/2
|
||||
.float 0.3826834261417388916015625
|
||||
|
||||
function .Lfft16_internal_vfp
|
||||
macro_fft8_head
|
||||
@ FFT4(z+8)
|
||||
vldr d10, [a1, #8 * 2*4]
|
||||
vldr d12, [a1, #9 * 2*4]
|
||||
vldr d11, [a1, #10 * 2*4]
|
||||
vldr d13, [a1, #11 * 2*4]
|
||||
macro_fft8_tail
|
||||
vadd.f s16, s20, s24 @ vector op
|
||||
@ FFT4(z+12)
|
||||
vldr d4, [a1, #12 * 2*4]
|
||||
vldr d6, [a1, #13 * 2*4]
|
||||
vldr d5, [a1, #14 * 2*4]
|
||||
vsub.f s20, s20, s24 @ vector op
|
||||
vldr d7, [a1, #15 * 2*4]
|
||||
vadd.f s0, s16, s18
|
||||
vsub.f s4, s16, s18
|
||||
vadd.f s1, s17, s19
|
||||
vsub.f s5, s17, s19
|
||||
vadd.f s7, s21, s22
|
||||
vsub.f s3, s21, s22
|
||||
vadd.f s2, s20, s23
|
||||
vsub.f s6, s20, s23
|
||||
vadd.f s16, s8, s12 @ vector op
|
||||
vstr d0, [a1, #8 * 2*4]
|
||||
vstr d2, [a1, #10 * 2*4]
|
||||
vstr d1, [a1, #9 * 2*4]
|
||||
vsub.f s20, s8, s12
|
||||
vstr d3, [a1, #11 * 2*4]
|
||||
@ TRANSFORM(z[2],z[6],z[10],z[14],cos1pi4,cos1pi4)
|
||||
vldr d12, [a1, #10 * 2*4]
|
||||
vadd.f s0, s16, s18
|
||||
vadd.f s1, s17, s19
|
||||
vsub.f s6, s16, s18
|
||||
vsub.f s7, s17, s19
|
||||
vsub.f s3, s21, s22
|
||||
vadd.f s2, s20, s23
|
||||
vadd.f s5, s21, s22
|
||||
vsub.f s4, s20, s23
|
||||
vstr d0, [a1, #12 * 2*4]
|
||||
vmov s0, s6
|
||||
@ TRANSFORM(z[1],z[5],z[9],z[13],cos1pi8,cos3pi8)
|
||||
vldr d6, [a1, #9 * 2*4]
|
||||
vstr d1, [a1, #13 * 2*4]
|
||||
vldr d1, cos1pi4 @ s2 = cos1pi4, s3 = cos1pi8
|
||||
vstr d2, [a1, #15 * 2*4]
|
||||
vldr d7, [a1, #13 * 2*4]
|
||||
vadd.f s4, s25, s24
|
||||
vsub.f s5, s25, s24
|
||||
vsub.f s6, s0, s7
|
||||
vadd.f s7, s0, s7
|
||||
vmul.f s20, s12, s3 @ vector op
|
||||
@ TRANSFORM(z[3],z[7],z[11],z[15],cos3pi8,cos1pi8)
|
||||
vldr d4, [a1, #11 * 2*4]
|
||||
vldr d5, [a1, #15 * 2*4]
|
||||
vldr s1, cos3pi8
|
||||
vmul.f s24, s4, s2 @ vector * scalar op
|
||||
vmul.f s28, s12, s1 @ vector * scalar op
|
||||
vmul.f s12, s8, s1 @ vector * scalar op
|
||||
vadd.f s4, s20, s29
|
||||
vsub.f s5, s21, s28
|
||||
vsub.f s6, s22, s31
|
||||
vadd.f s7, s23, s30
|
||||
vmul.f s8, s8, s3 @ vector * scalar op
|
||||
vldr d8, [a1, #1 * 2*4]
|
||||
vldr d9, [a1, #5 * 2*4]
|
||||
vldr d10, [a1, #3 * 2*4]
|
||||
vldr d11, [a1, #7 * 2*4]
|
||||
vldr d14, [a1, #2 * 2*4]
|
||||
vadd.f s0, s6, s4
|
||||
vadd.f s1, s5, s7
|
||||
vsub.f s2, s5, s7
|
||||
vsub.f s3, s6, s4
|
||||
vadd.f s4, s12, s9
|
||||
vsub.f s5, s13, s8
|
||||
vsub.f s6, s14, s11
|
||||
vadd.f s7, s15, s10
|
||||
vadd.f s12, s0, s16 @ vector op
|
||||
vstr d0, [a1, #1 * 2*4]
|
||||
vstr d1, [a1, #5 * 2*4]
|
||||
vldr d4, [a1, #1 * 2*4]
|
||||
vldr d5, [a1, #5 * 2*4]
|
||||
vadd.f s0, s6, s4
|
||||
vadd.f s1, s5, s7
|
||||
vsub.f s2, s5, s7
|
||||
vsub.f s3, s6, s4
|
||||
vsub.f s8, s16, s8 @ vector op
|
||||
vstr d6, [a1, #1 * 2*4]
|
||||
vstr d7, [a1, #5 * 2*4]
|
||||
vldr d15, [a1, #6 * 2*4]
|
||||
vsub.f s4, s20, s0
|
||||
vsub.f s5, s21, s1
|
||||
vsub.f s6, s22, s2
|
||||
vsub.f s7, s23, s3
|
||||
vadd.f s20, s0, s20 @ vector op
|
||||
vstr d4, [a1, #9 * 2*4]
|
||||
@ TRANSFORM_ZERO(z[0],z[4],z[8],z[12])
|
||||
vldr d6, [a1, #8 * 2*4]
|
||||
vstr d5, [a1, #13 * 2*4]
|
||||
vldr d7, [a1, #12 * 2*4]
|
||||
vstr d2, [a1, #11 * 2*4]
|
||||
vldr d8, [a1, #0 * 2*4]
|
||||
vstr d3, [a1, #15 * 2*4]
|
||||
vldr d9, [a1, #4 * 2*4]
|
||||
vadd.f s0, s26, s24
|
||||
vadd.f s1, s25, s27
|
||||
vsub.f s2, s25, s27
|
||||
vsub.f s3, s26, s24
|
||||
vadd.f s4, s14, s12
|
||||
vadd.f s5, s13, s15
|
||||
vsub.f s6, s13, s15
|
||||
vsub.f s7, s14, s12
|
||||
vadd.f s8, s0, s28 @ vector op
|
||||
vstr d0, [a1, #3 * 2*4]
|
||||
vstr d1, [a1, #7 * 2*4]
|
||||
vldr d6, [a1, #3 * 2*4]
|
||||
vldr d7, [a1, #7 * 2*4]
|
||||
vsub.f s0, s16, s4
|
||||
vsub.f s1, s17, s5
|
||||
vsub.f s2, s18, s6
|
||||
vsub.f s3, s19, s7
|
||||
vsub.f s12, s28, s12 @ vector op
|
||||
vadd.f s16, s4, s16 @ vector op
|
||||
vstr d10, [a1, #3 * 2*4]
|
||||
vstr d11, [a1, #7 * 2*4]
|
||||
vstr d4, [a1, #2 * 2*4]
|
||||
vstr d5, [a1, #6 * 2*4]
|
||||
vstr d0, [a1, #8 * 2*4]
|
||||
vstr d1, [a1, #12 * 2*4]
|
||||
vstr d6, [a1, #10 * 2*4]
|
||||
vstr d7, [a1, #14 * 2*4]
|
||||
vstr d8, [a1, #0 * 2*4]
|
||||
vstr d9, [a1, #4 * 2*4]
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
function ff_fft16_vfp, export=1
|
||||
ldr a3, =0x03030000 @ RunFast mode, vector length 4, stride 1
|
||||
fmrx a2, FPSCR
|
||||
fmxr FPSCR, a3
|
||||
vpush {s16-s31}
|
||||
mov ip, lr
|
||||
bl .Lfft16_internal_vfp
|
||||
vpop {s16-s31}
|
||||
fmxr FPSCR, a2
|
||||
bx ip
|
||||
endfunc
|
||||
|
||||
.macro pass n, z0, z1, z2, z3
|
||||
add v6, v5, #4*2*\n
|
||||
@ TRANSFORM_ZERO(z[0],z[o1],z[o2],z[o3])
|
||||
@ TRANSFORM(z[1],z[o1+1],z[o2+1],z[o3+1],wre[1],wim[-1])
|
||||
@ TRANSFORM(z[0],z[o1],z[o2],z[o3],wre[0],wim[0])
|
||||
@ TRANSFORM(z[1],z[o1+1],z[o2+1],z[o3+1],wre[1],wim[-1])
|
||||
vldr d8, [\z2, #8*(o2+1)] @ s16,s17
|
||||
vldmdb v6!, {s2}
|
||||
vldr d9, [\z3, #8*(o3+1)] @ s18,s19
|
||||
vldmia v5!, {s0,s1} @ s0 is unused
|
||||
vldr s7, [\z2, #8*o2] @ t1
|
||||
vmul.f s20, s16, s2 @ vector * scalar
|
||||
vldr s0, [\z3, #8*o3] @ t5
|
||||
vldr s6, [\z2, #8*o2+4] @ t2
|
||||
vldr s3, [\z3, #8*o3+4] @ t6
|
||||
vmul.f s16, s16, s1 @ vector * scalar
|
||||
ldr a4, =\n-1
|
||||
1: add \z0, \z0, #8*2
|
||||
.if \n*4*2 >= 512
|
||||
add \z1, \z1, #8*2
|
||||
.endif
|
||||
.if \n*4*2 >= 256
|
||||
add \z2, \z2, #8*2
|
||||
.endif
|
||||
.if \n*4*2 >= 512
|
||||
add \z3, \z3, #8*2
|
||||
.endif
|
||||
@ up to 2 stalls (VFP vector issuing / waiting for s0)
|
||||
@ depending upon whether this is the first iteration and
|
||||
@ how many add instructions are inserted above
|
||||
vadd.f s4, s0, s7 @ t5
|
||||
vadd.f s5, s6, s3 @ t6
|
||||
vsub.f s6, s6, s3 @ t4
|
||||
vsub.f s7, s0, s7 @ t3
|
||||
vldr d6, [\z0, #8*0-8*2] @ s12,s13
|
||||
vadd.f s0, s16, s21 @ t1
|
||||
vldr d7, [\z1, #8*o1-8*2] @ s14,s15
|
||||
vsub.f s1, s18, s23 @ t5
|
||||
vadd.f s8, s4, s12 @ vector + vector
|
||||
@ stall (VFP vector issuing)
|
||||
@ stall (VFP vector issuing)
|
||||
@ stall (VFP vector issuing)
|
||||
vsub.f s4, s12, s4
|
||||
vsub.f s5, s13, s5
|
||||
vsub.f s6, s14, s6
|
||||
vsub.f s7, s15, s7
|
||||
vsub.f s2, s17, s20 @ t2
|
||||
vadd.f s3, s19, s22 @ t6
|
||||
vstr d4, [\z0, #8*0-8*2] @ s8,s9
|
||||
vstr d5, [\z1, #8*o1-8*2] @ s10,s11
|
||||
@ stall (waiting for s5)
|
||||
vstr d2, [\z2, #8*o2-8*2] @ s4,s5
|
||||
vadd.f s4, s1, s0 @ t5
|
||||
vstr d3, [\z3, #8*o3-8*2] @ s6,s7
|
||||
vsub.f s7, s1, s0 @ t3
|
||||
vadd.f s5, s2, s3 @ t6
|
||||
vsub.f s6, s2, s3 @ t4
|
||||
vldr d6, [\z0, #8*1-8*2] @ s12,s13
|
||||
vldr d7, [\z1, #8*(o1+1)-8*2] @ s14,s15
|
||||
vldr d4, [\z2, #8*o2] @ s8,s9
|
||||
vldmdb v6!, {s2,s3}
|
||||
vldr d5, [\z3, #8*o3] @ s10,s11
|
||||
vadd.f s20, s4, s12 @ vector + vector
|
||||
vldmia v5!, {s0,s1}
|
||||
vldr d8, [\z2, #8*(o2+1)] @ s16,s17
|
||||
@ stall (VFP vector issuing)
|
||||
vsub.f s4, s12, s4
|
||||
vsub.f s5, s13, s5
|
||||
vsub.f s6, s14, s6
|
||||
vsub.f s7, s15, s7
|
||||
vmul.f s12, s8, s3 @ vector * scalar
|
||||
vstr d10, [\z0, #8*1-8*2] @ s20,s21
|
||||
vldr d9, [\z3, #8*(o3+1)] @ s18,s19
|
||||
vstr d11, [\z1, #8*(o1+1)-8*2] @ s22,s23
|
||||
vmul.f s8, s8, s0 @ vector * scalar
|
||||
vstr d2, [\z2, #8*(o2+1)-8*2] @ s4,s5
|
||||
@ stall (waiting for s7)
|
||||
vstr d3, [\z3, #8*(o3+1)-8*2] @ s6,s7
|
||||
vmul.f s20, s16, s2 @ vector * scalar
|
||||
@ stall (VFP vector issuing)
|
||||
@ stall (VFP vector issuing)
|
||||
@ stall (VFP vector issuing)
|
||||
vadd.f s7, s8, s13 @ t1
|
||||
vsub.f s6, s9, s12 @ t2
|
||||
vsub.f s0, s10, s15 @ t5
|
||||
vadd.f s3, s11, s14 @ t6
|
||||
vmul.f s16, s16, s1 @ vector * scalar
|
||||
subs a4, a4, #1
|
||||
bne 1b
|
||||
@ What remains is identical to the first two indentations of
|
||||
@ the above, but without the increment of z
|
||||
vadd.f s4, s0, s7 @ t5
|
||||
vadd.f s5, s6, s3 @ t6
|
||||
vsub.f s6, s6, s3 @ t4
|
||||
vsub.f s7, s0, s7 @ t3
|
||||
vldr d6, [\z0, #8*0] @ s12,s13
|
||||
vadd.f s0, s16, s21 @ t1
|
||||
vldr d7, [\z1, #8*o1] @ s14,s15
|
||||
vsub.f s1, s18, s23 @ t5
|
||||
vadd.f s8, s4, s12 @ vector + vector
|
||||
vsub.f s4, s12, s4
|
||||
vsub.f s5, s13, s5
|
||||
vsub.f s6, s14, s6
|
||||
vsub.f s7, s15, s7
|
||||
vsub.f s2, s17, s20 @ t2
|
||||
vadd.f s3, s19, s22 @ t6
|
||||
vstr d4, [\z0, #8*0] @ s8,s9
|
||||
vstr d5, [\z1, #8*o1] @ s10,s11
|
||||
vstr d2, [\z2, #8*o2] @ s4,s5
|
||||
vadd.f s4, s1, s0 @ t5
|
||||
vstr d3, [\z3, #8*o3] @ s6,s7
|
||||
vsub.f s7, s1, s0 @ t3
|
||||
vadd.f s5, s2, s3 @ t6
|
||||
vsub.f s6, s2, s3 @ t4
|
||||
vldr d6, [\z0, #8*1] @ s12,s13
|
||||
vldr d7, [\z1, #8*(o1+1)] @ s14,s15
|
||||
vadd.f s20, s4, s12 @ vector + vector
|
||||
vsub.f s4, s12, s4
|
||||
vsub.f s5, s13, s5
|
||||
vsub.f s6, s14, s6
|
||||
vsub.f s7, s15, s7
|
||||
vstr d10, [\z0, #8*1] @ s20,s21
|
||||
vstr d11, [\z1, #8*(o1+1)] @ s22,s23
|
||||
vstr d2, [\z2, #8*(o2+1)] @ s4,s5
|
||||
vstr d3, [\z3, #8*(o3+1)] @ s6,s7
|
||||
.endm
|
||||
|
||||
.macro def_fft n, n2, n4
|
||||
function .Lfft\n\()_internal_vfp
|
||||
.if \n >= 512
|
||||
push {v1-v6,lr}
|
||||
.elseif \n >= 256
|
||||
push {v1-v2,v5-v6,lr}
|
||||
.else
|
||||
push {v1,v5-v6,lr}
|
||||
.endif
|
||||
mov v1, a1
|
||||
bl .Lfft\n2\()_internal_vfp
|
||||
add a1, v1, #8*(\n/4)*2
|
||||
bl .Lfft\n4\()_internal_vfp
|
||||
movrelx v5, X(ff_cos_\n), a1
|
||||
add a1, v1, #8*(\n/4)*3
|
||||
bl .Lfft\n4\()_internal_vfp
|
||||
.if \n >= 512
|
||||
.set o1, 0*(\n/4/2)
|
||||
.set o2, 0*(\n/4/2)
|
||||
.set o3, 0*(\n/4/2)
|
||||
add v2, v1, #8*2*(\n/4/2)
|
||||
add v3, v1, #8*4*(\n/4/2)
|
||||
add v4, v1, #8*6*(\n/4/2)
|
||||
pass (\n/4/2), v1, v2, v3, v4
|
||||
pop {v1-v6,pc}
|
||||
.elseif \n >= 256
|
||||
.set o1, 2*(\n/4/2)
|
||||
.set o2, 0*(\n/4/2)
|
||||
.set o3, 2*(\n/4/2)
|
||||
add v2, v1, #8*4*(\n/4/2)
|
||||
pass (\n/4/2), v1, v1, v2, v2
|
||||
pop {v1-v2,v5-v6,pc}
|
||||
.else
|
||||
.set o1, 2*(\n/4/2)
|
||||
.set o2, 4*(\n/4/2)
|
||||
.set o3, 6*(\n/4/2)
|
||||
pass (\n/4/2), v1, v1, v1, v1
|
||||
pop {v1,v5-v6,pc}
|
||||
.endif
|
||||
endfunc
|
||||
|
||||
function fft\n\()_vfp
|
||||
ldr a3, =0x03030000 /* RunFast mode, vector length 4, stride 1 */
|
||||
fmrx a2, FPSCR
|
||||
fmxr FPSCR, a3
|
||||
vpush {s16-s31}
|
||||
mov ip, lr
|
||||
bl .Lfft\n\()_internal_vfp
|
||||
vpop {s16-s31}
|
||||
fmxr FPSCR, a2
|
||||
bx ip
|
||||
endfunc
|
||||
|
||||
.ltorg
|
||||
.endm
|
||||
|
||||
def_fft 32, 16, 8
|
||||
def_fft 64, 32, 16
|
||||
def_fft 128, 64, 32
|
||||
def_fft 256, 128, 64
|
||||
def_fft 512, 256, 128
|
||||
def_fft 1024, 512, 256
|
||||
def_fft 2048, 1024, 512
|
||||
def_fft 4096, 2048, 1024
|
||||
def_fft 8192, 4096, 2048
|
||||
def_fft 16384, 8192, 4096
|
||||
def_fft 32768, 16384, 8192
|
||||
def_fft 65536, 32768, 16384
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_ARM_IDCT_H
|
||||
#define AVCODEC_ARM_IDCT_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
void ff_j_rev_dct_arm(int16_t *data);
|
||||
|
||||
void ff_simple_idct_arm(int16_t *data);
|
||||
|
||||
void ff_simple_idct_armv5te(int16_t *data);
|
||||
void ff_simple_idct_put_armv5te(uint8_t *dest, ptrdiff_t line_size, int16_t *data);
|
||||
void ff_simple_idct_add_armv5te(uint8_t *dest, ptrdiff_t line_size, int16_t *data);
|
||||
|
||||
void ff_simple_idct_armv6(int16_t *data);
|
||||
void ff_simple_idct_put_armv6(uint8_t *dest, ptrdiff_t line_size, int16_t *data);
|
||||
void ff_simple_idct_add_armv6(uint8_t *dest, ptrdiff_t line_size, int16_t *data);
|
||||
|
||||
void ff_simple_idct_neon(int16_t *data);
|
||||
void ff_simple_idct_put_neon(uint8_t *dest, ptrdiff_t line_size, int16_t *data);
|
||||
void ff_simple_idct_add_neon(uint8_t *dest, ptrdiff_t line_size, int16_t *data);
|
||||
|
||||
#endif /* AVCODEC_ARM_IDCT_H */
|
|
@ -0,0 +1,120 @@
|
|||
@
|
||||
@ ARMv4-optimized IDCT functions
|
||||
@ Copyright (c) 2004 AGAWA Koji <i (AT) atty (DOT) jp>
|
||||
@
|
||||
@ This file is part of FFmpeg.
|
||||
@
|
||||
@ FFmpeg is free software; you can redistribute it and/or
|
||||
@ modify it under the terms of the GNU Lesser General Public
|
||||
@ License as published by the Free Software Foundation; either
|
||||
@ version 2.1 of the License, or (at your option) any later version.
|
||||
@
|
||||
@ FFmpeg is distributed in the hope that it will be useful,
|
||||
@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
@ Lesser General Public License for more details.
|
||||
@
|
||||
@ You should have received a copy of the GNU Lesser General Public
|
||||
@ License along with FFmpeg; if not, write to the Free Software
|
||||
@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
@
|
||||
|
||||
#include "config.h"
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
@ void ff_add_pixels_clamped_arm(int16_t *block, uint8_t *dest, ptrdiff_t stride)
|
||||
function ff_add_pixels_clamped_arm, export=1, align=5
|
||||
push {r4-r10}
|
||||
mov r10, #8
|
||||
1:
|
||||
ldr r4, [r1] /* load dest */
|
||||
/* block[0] and block[1]*/
|
||||
ldrsh r5, [r0]
|
||||
ldrsh r7, [r0, #2]
|
||||
and r6, r4, #0xFF
|
||||
and r8, r4, #0xFF00
|
||||
add r6, r6, r5
|
||||
add r8, r7, r8, lsr #8
|
||||
mvn r5, r5
|
||||
mvn r7, r7
|
||||
tst r6, #0x100
|
||||
it ne
|
||||
movne r6, r5, lsr #24
|
||||
tst r8, #0x100
|
||||
it ne
|
||||
movne r8, r7, lsr #24
|
||||
mov r9, r6
|
||||
ldrsh r5, [r0, #4] /* moved form [A] */
|
||||
orr r9, r9, r8, lsl #8
|
||||
/* block[2] and block[3] */
|
||||
/* [A] */
|
||||
ldrsh r7, [r0, #6]
|
||||
and r6, r4, #0xFF0000
|
||||
and r8, r4, #0xFF000000
|
||||
add r6, r5, r6, lsr #16
|
||||
add r8, r7, r8, lsr #24
|
||||
mvn r5, r5
|
||||
mvn r7, r7
|
||||
tst r6, #0x100
|
||||
it ne
|
||||
movne r6, r5, lsr #24
|
||||
tst r8, #0x100
|
||||
it ne
|
||||
movne r8, r7, lsr #24
|
||||
orr r9, r9, r6, lsl #16
|
||||
ldr r4, [r1, #4] /* moved form [B] */
|
||||
orr r9, r9, r8, lsl #24
|
||||
/* store dest */
|
||||
ldrsh r5, [r0, #8] /* moved form [C] */
|
||||
str r9, [r1]
|
||||
|
||||
/* load dest */
|
||||
/* [B] */
|
||||
/* block[4] and block[5] */
|
||||
/* [C] */
|
||||
ldrsh r7, [r0, #10]
|
||||
and r6, r4, #0xFF
|
||||
and r8, r4, #0xFF00
|
||||
add r6, r6, r5
|
||||
add r8, r7, r8, lsr #8
|
||||
mvn r5, r5
|
||||
mvn r7, r7
|
||||
tst r6, #0x100
|
||||
it ne
|
||||
movne r6, r5, lsr #24
|
||||
tst r8, #0x100
|
||||
it ne
|
||||
movne r8, r7, lsr #24
|
||||
mov r9, r6
|
||||
ldrsh r5, [r0, #12] /* moved from [D] */
|
||||
orr r9, r9, r8, lsl #8
|
||||
/* block[6] and block[7] */
|
||||
/* [D] */
|
||||
ldrsh r7, [r0, #14]
|
||||
and r6, r4, #0xFF0000
|
||||
and r8, r4, #0xFF000000
|
||||
add r6, r5, r6, lsr #16
|
||||
add r8, r7, r8, lsr #24
|
||||
mvn r5, r5
|
||||
mvn r7, r7
|
||||
tst r6, #0x100
|
||||
it ne
|
||||
movne r6, r5, lsr #24
|
||||
tst r8, #0x100
|
||||
it ne
|
||||
movne r8, r7, lsr #24
|
||||
orr r9, r9, r6, lsl #16
|
||||
add r0, r0, #16 /* moved from [E] */
|
||||
orr r9, r9, r8, lsl #24
|
||||
subs r10, r10, #1 /* moved from [F] */
|
||||
/* store dest */
|
||||
str r9, [r1, #4]
|
||||
|
||||
/* [E] */
|
||||
/* [F] */
|
||||
add r1, r1, r2
|
||||
bne 1b
|
||||
|
||||
pop {r4-r10}
|
||||
bx lr
|
||||
endfunc
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_ARM_IDCTDSP_ARM_H
|
||||
#define AVCODEC_ARM_IDCTDSP_ARM_H
|
||||
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavcodec/idctdsp.h"
|
||||
|
||||
void ff_idctdsp_init_armv5te(IDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth);
|
||||
void ff_idctdsp_init_armv6(IDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth);
|
||||
void ff_idctdsp_init_neon(IDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth);
|
||||
|
||||
#endif /* AVCODEC_ARM_IDCTDSP_ARM_H */
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
function ff_add_pixels_clamped_armv6, export=1
|
||||
push {r4-r8,lr}
|
||||
mov r3, #8
|
||||
1:
|
||||
ldm r0!, {r4,r5,r12,lr}
|
||||
ldrd r6, r7, [r1]
|
||||
pkhbt r8, r4, r5, lsl #16
|
||||
pkhtb r5, r5, r4, asr #16
|
||||
pkhbt r4, r12, lr, lsl #16
|
||||
pkhtb lr, lr, r12, asr #16
|
||||
pld [r1, r2]
|
||||
uxtab16 r8, r8, r6
|
||||
uxtab16 r5, r5, r6, ror #8
|
||||
uxtab16 r4, r4, r7
|
||||
uxtab16 lr, lr, r7, ror #8
|
||||
usat16 r8, #8, r8
|
||||
usat16 r5, #8, r5
|
||||
usat16 r4, #8, r4
|
||||
usat16 lr, #8, lr
|
||||
orr r6, r8, r5, lsl #8
|
||||
orr r7, r4, lr, lsl #8
|
||||
subs r3, r3, #1
|
||||
strd_post r6, r7, r1, r2
|
||||
bgt 1b
|
||||
pop {r4-r8,pc}
|
||||
endfunc
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* ARM-optimized IDCT functions
|
||||
* Copyright (c) 2001 Lionel Ulmer
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/cpu.h"
|
||||
#include "libavutil/arm/cpu.h"
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavcodec/idctdsp.h"
|
||||
#include "idct.h"
|
||||
#include "idctdsp_arm.h"
|
||||
|
||||
void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest,
|
||||
ptrdiff_t line_size);
|
||||
|
||||
/* XXX: those functions should be suppressed ASAP when all IDCTs are
|
||||
* converted */
|
||||
static void j_rev_dct_arm_put(uint8_t *dest, ptrdiff_t line_size,
|
||||
int16_t *block)
|
||||
{
|
||||
ff_j_rev_dct_arm(block);
|
||||
ff_put_pixels_clamped_c(block, dest, line_size);
|
||||
}
|
||||
|
||||
static void j_rev_dct_arm_add(uint8_t *dest, ptrdiff_t line_size,
|
||||
int16_t *block)
|
||||
{
|
||||
ff_j_rev_dct_arm(block);
|
||||
ff_add_pixels_clamped_arm(block, dest, line_size);
|
||||
}
|
||||
|
||||
static void simple_idct_arm_put(uint8_t *dest, ptrdiff_t line_size,
|
||||
int16_t *block)
|
||||
{
|
||||
ff_simple_idct_arm(block);
|
||||
ff_put_pixels_clamped_c(block, dest, line_size);
|
||||
}
|
||||
|
||||
static void simple_idct_arm_add(uint8_t *dest, ptrdiff_t line_size,
|
||||
int16_t *block)
|
||||
{
|
||||
ff_simple_idct_arm(block);
|
||||
ff_add_pixels_clamped_arm(block, dest, line_size);
|
||||
}
|
||||
|
||||
av_cold void ff_idctdsp_init_arm(IDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth)
|
||||
{
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
if (!avctx->lowres && !high_bit_depth) {
|
||||
if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & AV_CODEC_FLAG_BITEXACT)) ||
|
||||
avctx->idct_algo == FF_IDCT_ARM) {
|
||||
c->idct_put = j_rev_dct_arm_put;
|
||||
c->idct_add = j_rev_dct_arm_add;
|
||||
c->idct = ff_j_rev_dct_arm;
|
||||
c->perm_type = FF_IDCT_PERM_LIBMPEG2;
|
||||
} else if (avctx->idct_algo == FF_IDCT_SIMPLEARM) {
|
||||
c->idct_put = simple_idct_arm_put;
|
||||
c->idct_add = simple_idct_arm_add;
|
||||
c->idct = ff_simple_idct_arm;
|
||||
c->perm_type = FF_IDCT_PERM_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
c->add_pixels_clamped = ff_add_pixels_clamped_arm;
|
||||
|
||||
if (have_armv5te(cpu_flags))
|
||||
ff_idctdsp_init_armv5te(c, avctx, high_bit_depth);
|
||||
if (have_armv6(cpu_flags))
|
||||
ff_idctdsp_init_armv6(c, avctx, high_bit_depth);
|
||||
if (have_neon(cpu_flags))
|
||||
ff_idctdsp_init_neon(c, avctx, high_bit_depth);
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavcodec/idctdsp.h"
|
||||
#include "idct.h"
|
||||
#include "idctdsp_arm.h"
|
||||
|
||||
av_cold void ff_idctdsp_init_armv5te(IDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth)
|
||||
{
|
||||
if (!avctx->lowres && !high_bit_depth &&
|
||||
(avctx->idct_algo == FF_IDCT_AUTO ||
|
||||
avctx->idct_algo == FF_IDCT_SIMPLEAUTO ||
|
||||
avctx->idct_algo == FF_IDCT_SIMPLEARMV5TE)) {
|
||||
c->idct_put = ff_simple_idct_put_armv5te;
|
||||
c->idct_add = ff_simple_idct_add_armv5te;
|
||||
c->idct = ff_simple_idct_armv5te;
|
||||
c->perm_type = FF_IDCT_PERM_NONE;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavcodec/idctdsp.h"
|
||||
#include "idct.h"
|
||||
#include "idctdsp_arm.h"
|
||||
|
||||
void ff_add_pixels_clamped_armv6(const int16_t *block, uint8_t *pixels,
|
||||
ptrdiff_t line_size);
|
||||
|
||||
av_cold void ff_idctdsp_init_armv6(IDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth)
|
||||
{
|
||||
if (!avctx->lowres && !high_bit_depth) {
|
||||
if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & AV_CODEC_FLAG_BITEXACT)) ||
|
||||
avctx->idct_algo == FF_IDCT_SIMPLEARMV6) {
|
||||
c->idct_put = ff_simple_idct_put_armv6;
|
||||
c->idct_add = ff_simple_idct_add_armv6;
|
||||
c->idct = ff_simple_idct_armv6;
|
||||
c->perm_type = FF_IDCT_PERM_LIBMPEG2;
|
||||
}
|
||||
}
|
||||
c->add_pixels_clamped = ff_add_pixels_clamped_armv6;
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* ARM-NEON-optimized IDCT functions
|
||||
* Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavcodec/idctdsp.h"
|
||||
#include "idct.h"
|
||||
#include "idctdsp_arm.h"
|
||||
|
||||
void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
|
||||
void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
|
||||
void ff_put_signed_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
|
||||
|
||||
av_cold void ff_idctdsp_init_neon(IDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth)
|
||||
{
|
||||
if (!avctx->lowres && !high_bit_depth) {
|
||||
if (avctx->idct_algo == FF_IDCT_AUTO ||
|
||||
avctx->idct_algo == FF_IDCT_SIMPLEAUTO ||
|
||||
avctx->idct_algo == FF_IDCT_SIMPLENEON) {
|
||||
c->idct_put = ff_simple_idct_put_neon;
|
||||
c->idct_add = ff_simple_idct_add_neon;
|
||||
c->idct = ff_simple_idct_neon;
|
||||
c->perm_type = FF_IDCT_PERM_PARTTRANS;
|
||||
}
|
||||
}
|
||||
|
||||
c->add_pixels_clamped = ff_add_pixels_clamped_neon;
|
||||
c->put_pixels_clamped = ff_put_pixels_clamped_neon;
|
||||
c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon;
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* ARM-NEON-optimized IDCT functions
|
||||
* Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
function ff_put_pixels_clamped_neon, export=1
|
||||
vld1.16 {d16-d19}, [r0,:128]!
|
||||
vqmovun.s16 d0, q8
|
||||
vld1.16 {d20-d23}, [r0,:128]!
|
||||
vqmovun.s16 d1, q9
|
||||
vld1.16 {d24-d27}, [r0,:128]!
|
||||
vqmovun.s16 d2, q10
|
||||
vld1.16 {d28-d31}, [r0,:128]!
|
||||
vqmovun.s16 d3, q11
|
||||
vst1.8 {d0}, [r1,:64], r2
|
||||
vqmovun.s16 d4, q12
|
||||
vst1.8 {d1}, [r1,:64], r2
|
||||
vqmovun.s16 d5, q13
|
||||
vst1.8 {d2}, [r1,:64], r2
|
||||
vqmovun.s16 d6, q14
|
||||
vst1.8 {d3}, [r1,:64], r2
|
||||
vqmovun.s16 d7, q15
|
||||
vst1.8 {d4}, [r1,:64], r2
|
||||
vst1.8 {d5}, [r1,:64], r2
|
||||
vst1.8 {d6}, [r1,:64], r2
|
||||
vst1.8 {d7}, [r1,:64], r2
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
function ff_put_signed_pixels_clamped_neon, export=1
|
||||
vmov.u8 d31, #128
|
||||
vld1.16 {d16-d17}, [r0,:128]!
|
||||
vqmovn.s16 d0, q8
|
||||
vld1.16 {d18-d19}, [r0,:128]!
|
||||
vqmovn.s16 d1, q9
|
||||
vld1.16 {d16-d17}, [r0,:128]!
|
||||
vqmovn.s16 d2, q8
|
||||
vld1.16 {d18-d19}, [r0,:128]!
|
||||
vadd.u8 d0, d0, d31
|
||||
vld1.16 {d20-d21}, [r0,:128]!
|
||||
vadd.u8 d1, d1, d31
|
||||
vld1.16 {d22-d23}, [r0,:128]!
|
||||
vadd.u8 d2, d2, d31
|
||||
vst1.8 {d0}, [r1,:64], r2
|
||||
vqmovn.s16 d3, q9
|
||||
vst1.8 {d1}, [r1,:64], r2
|
||||
vqmovn.s16 d4, q10
|
||||
vst1.8 {d2}, [r1,:64], r2
|
||||
vqmovn.s16 d5, q11
|
||||
vld1.16 {d24-d25}, [r0,:128]!
|
||||
vadd.u8 d3, d3, d31
|
||||
vld1.16 {d26-d27}, [r0,:128]!
|
||||
vadd.u8 d4, d4, d31
|
||||
vadd.u8 d5, d5, d31
|
||||
vst1.8 {d3}, [r1,:64], r2
|
||||
vqmovn.s16 d6, q12
|
||||
vst1.8 {d4}, [r1,:64], r2
|
||||
vqmovn.s16 d7, q13
|
||||
vst1.8 {d5}, [r1,:64], r2
|
||||
vadd.u8 d6, d6, d31
|
||||
vadd.u8 d7, d7, d31
|
||||
vst1.8 {d6}, [r1,:64], r2
|
||||
vst1.8 {d7}, [r1,:64], r2
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
function ff_add_pixels_clamped_neon, export=1
|
||||
mov r3, r1
|
||||
vld1.8 {d16}, [r1,:64], r2
|
||||
vld1.16 {d0-d1}, [r0,:128]!
|
||||
vaddw.u8 q0, q0, d16
|
||||
vld1.8 {d17}, [r1,:64], r2
|
||||
vld1.16 {d2-d3}, [r0,:128]!
|
||||
vqmovun.s16 d0, q0
|
||||
vld1.8 {d18}, [r1,:64], r2
|
||||
vaddw.u8 q1, q1, d17
|
||||
vld1.16 {d4-d5}, [r0,:128]!
|
||||
vaddw.u8 q2, q2, d18
|
||||
vst1.8 {d0}, [r3,:64], r2
|
||||
vqmovun.s16 d2, q1
|
||||
vld1.8 {d19}, [r1,:64], r2
|
||||
vld1.16 {d6-d7}, [r0,:128]!
|
||||
vaddw.u8 q3, q3, d19
|
||||
vqmovun.s16 d4, q2
|
||||
vst1.8 {d2}, [r3,:64], r2
|
||||
vld1.8 {d16}, [r1,:64], r2
|
||||
vqmovun.s16 d6, q3
|
||||
vld1.16 {d0-d1}, [r0,:128]!
|
||||
vaddw.u8 q0, q0, d16
|
||||
vst1.8 {d4}, [r3,:64], r2
|
||||
vld1.8 {d17}, [r1,:64], r2
|
||||
vld1.16 {d2-d3}, [r0,:128]!
|
||||
vaddw.u8 q1, q1, d17
|
||||
vst1.8 {d6}, [r3,:64], r2
|
||||
vqmovun.s16 d0, q0
|
||||
vld1.8 {d18}, [r1,:64], r2
|
||||
vld1.16 {d4-d5}, [r0,:128]!
|
||||
vaddw.u8 q2, q2, d18
|
||||
vst1.8 {d0}, [r3,:64], r2
|
||||
vqmovun.s16 d2, q1
|
||||
vld1.8 {d19}, [r1,:64], r2
|
||||
vqmovun.s16 d4, q2
|
||||
vld1.16 {d6-d7}, [r0,:128]!
|
||||
vaddw.u8 q3, q3, d19
|
||||
vst1.8 {d2}, [r3,:64], r2
|
||||
vqmovun.s16 d6, q3
|
||||
vst1.8 {d4}, [r3,:64], r2
|
||||
vst1.8 {d6}, [r3,:64], r2
|
||||
bx lr
|
||||
endfunc
|
|
@ -0,0 +1,383 @@
|
|||
/*
|
||||
C-like prototype :
|
||||
void j_rev_dct_arm(DCTBLOCK data)
|
||||
|
||||
With DCTBLOCK being a pointer to an array of 64 'signed shorts'
|
||||
|
||||
Copyright (c) 2001 Lionel Ulmer (lionel.ulmer@free.fr / bbrox@bbrox.org)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
#define FIX_0_298631336 2446
|
||||
#define FIX_0_541196100 4433
|
||||
#define FIX_0_765366865 6270
|
||||
#define FIX_1_175875602 9633
|
||||
#define FIX_1_501321110 12299
|
||||
#define FIX_2_053119869 16819
|
||||
#define FIX_3_072711026 25172
|
||||
#define FIX_M_0_390180644 -3196
|
||||
#define FIX_M_0_899976223 -7373
|
||||
#define FIX_M_1_847759065 -15137
|
||||
#define FIX_M_1_961570560 -16069
|
||||
#define FIX_M_2_562915447 -20995
|
||||
#define FIX_0xFFFF 0xFFFF
|
||||
|
||||
#define FIX_0_298631336_ID 0
|
||||
#define FIX_0_541196100_ID 4
|
||||
#define FIX_0_765366865_ID 8
|
||||
#define FIX_1_175875602_ID 12
|
||||
#define FIX_1_501321110_ID 16
|
||||
#define FIX_2_053119869_ID 20
|
||||
#define FIX_3_072711026_ID 24
|
||||
#define FIX_M_0_390180644_ID 28
|
||||
#define FIX_M_0_899976223_ID 32
|
||||
#define FIX_M_1_847759065_ID 36
|
||||
#define FIX_M_1_961570560_ID 40
|
||||
#define FIX_M_2_562915447_ID 44
|
||||
#define FIX_0xFFFF_ID 48
|
||||
|
||||
function ff_j_rev_dct_arm, export=1
|
||||
push {r0, r4 - r11, lr}
|
||||
|
||||
mov lr, r0 @ lr = pointer to the current row
|
||||
mov r12, #8 @ r12 = row-counter
|
||||
movrel r11, const_array @ r11 = base pointer to the constants array
|
||||
row_loop:
|
||||
ldrsh r0, [lr, # 0] @ r0 = 'd0'
|
||||
ldrsh r2, [lr, # 2] @ r2 = 'd2'
|
||||
|
||||
@ Optimization for row that have all items except the first set to 0
|
||||
@ (this works as the int16_t are always 4-byte aligned)
|
||||
ldr r5, [lr, # 0]
|
||||
ldr r6, [lr, # 4]
|
||||
ldr r3, [lr, # 8]
|
||||
ldr r4, [lr, #12]
|
||||
orr r3, r3, r4
|
||||
orr r3, r3, r6
|
||||
orrs r5, r3, r5
|
||||
beq end_of_row_loop @ nothing to be done as ALL of them are '0'
|
||||
orrs r3, r3, r2
|
||||
beq empty_row
|
||||
|
||||
ldrsh r1, [lr, # 8] @ r1 = 'd1'
|
||||
ldrsh r4, [lr, # 4] @ r4 = 'd4'
|
||||
ldrsh r6, [lr, # 6] @ r6 = 'd6'
|
||||
|
||||
ldr r3, [r11, #FIX_0_541196100_ID]
|
||||
add r7, r2, r6
|
||||
ldr r5, [r11, #FIX_M_1_847759065_ID]
|
||||
mul r7, r3, r7 @ r7 = z1
|
||||
ldr r3, [r11, #FIX_0_765366865_ID]
|
||||
mla r6, r5, r6, r7 @ r6 = tmp2
|
||||
add r5, r0, r4 @ r5 = tmp0
|
||||
mla r2, r3, r2, r7 @ r2 = tmp3
|
||||
sub r3, r0, r4 @ r3 = tmp1
|
||||
|
||||
add r0, r2, r5, lsl #13 @ r0 = tmp10
|
||||
rsb r2, r2, r5, lsl #13 @ r2 = tmp13
|
||||
add r4, r6, r3, lsl #13 @ r4 = tmp11
|
||||
rsb r3, r6, r3, lsl #13 @ r3 = tmp12
|
||||
|
||||
push {r0, r2, r3, r4} @ save on the stack tmp10, tmp13, tmp12, tmp11
|
||||
|
||||
ldrsh r3, [lr, #10] @ r3 = 'd3'
|
||||
ldrsh r5, [lr, #12] @ r5 = 'd5'
|
||||
ldrsh r7, [lr, #14] @ r7 = 'd7'
|
||||
|
||||
add r0, r3, r5 @ r0 = 'z2'
|
||||
add r2, r1, r7 @ r2 = 'z1'
|
||||
add r4, r3, r7 @ r4 = 'z3'
|
||||
add r6, r1, r5 @ r6 = 'z4'
|
||||
ldr r9, [r11, #FIX_1_175875602_ID]
|
||||
add r8, r4, r6 @ r8 = z3 + z4
|
||||
ldr r10, [r11, #FIX_M_0_899976223_ID]
|
||||
mul r8, r9, r8 @ r8 = 'z5'
|
||||
ldr r9, [r11, #FIX_M_2_562915447_ID]
|
||||
mul r2, r10, r2 @ r2 = 'z1'
|
||||
ldr r10, [r11, #FIX_M_1_961570560_ID]
|
||||
mul r0, r9, r0 @ r0 = 'z2'
|
||||
ldr r9, [r11, #FIX_M_0_390180644_ID]
|
||||
mla r4, r10, r4, r8 @ r4 = 'z3'
|
||||
ldr r10, [r11, #FIX_0_298631336_ID]
|
||||
mla r6, r9, r6, r8 @ r6 = 'z4'
|
||||
ldr r9, [r11, #FIX_2_053119869_ID]
|
||||
mla r7, r10, r7, r2 @ r7 = tmp0 + z1
|
||||
ldr r10, [r11, #FIX_3_072711026_ID]
|
||||
mla r5, r9, r5, r0 @ r5 = tmp1 + z2
|
||||
ldr r9, [r11, #FIX_1_501321110_ID]
|
||||
mla r3, r10, r3, r0 @ r3 = tmp2 + z2
|
||||
add r7, r7, r4 @ r7 = tmp0
|
||||
mla r1, r9, r1, r2 @ r1 = tmp3 + z1
|
||||
add r5, r5, r6 @ r5 = tmp1
|
||||
add r3, r3, r4 @ r3 = tmp2
|
||||
add r1, r1, r6 @ r1 = tmp3
|
||||
|
||||
pop {r0, r2, r4, r6} @ r0 = tmp10 / r2 = tmp13 / r4 = tmp12 / r6 = tmp11
|
||||
@ r1 = tmp3 / r3 = tmp2 / r5 = tmp1 / r7 = tmp0
|
||||
|
||||
@ Compute DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS)
|
||||
add r8, r0, r1
|
||||
add r8, r8, #(1<<10)
|
||||
mov r8, r8, asr #11
|
||||
strh r8, [lr, # 0]
|
||||
|
||||
@ Compute DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS)
|
||||
sub r8, r0, r1
|
||||
add r8, r8, #(1<<10)
|
||||
mov r8, r8, asr #11
|
||||
strh r8, [lr, #14]
|
||||
|
||||
@ Compute DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS)
|
||||
add r8, r6, r3
|
||||
add r8, r8, #(1<<10)
|
||||
mov r8, r8, asr #11
|
||||
strh r8, [lr, # 2]
|
||||
|
||||
@ Compute DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS)
|
||||
sub r8, r6, r3
|
||||
add r8, r8, #(1<<10)
|
||||
mov r8, r8, asr #11
|
||||
strh r8, [lr, #12]
|
||||
|
||||
@ Compute DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS)
|
||||
add r8, r4, r5
|
||||
add r8, r8, #(1<<10)
|
||||
mov r8, r8, asr #11
|
||||
strh r8, [lr, # 4]
|
||||
|
||||
@ Compute DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS)
|
||||
sub r8, r4, r5
|
||||
add r8, r8, #(1<<10)
|
||||
mov r8, r8, asr #11
|
||||
strh r8, [lr, #10]
|
||||
|
||||
@ Compute DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS)
|
||||
add r8, r2, r7
|
||||
add r8, r8, #(1<<10)
|
||||
mov r8, r8, asr #11
|
||||
strh r8, [lr, # 6]
|
||||
|
||||
@ Compute DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS)
|
||||
sub r8, r2, r7
|
||||
add r8, r8, #(1<<10)
|
||||
mov r8, r8, asr #11
|
||||
strh r8, [lr, # 8]
|
||||
|
||||
@ End of row loop
|
||||
add lr, lr, #16
|
||||
subs r12, r12, #1
|
||||
bne row_loop
|
||||
beq start_column_loop
|
||||
|
||||
empty_row:
|
||||
ldr r1, [r11, #FIX_0xFFFF_ID]
|
||||
mov r0, r0, lsl #2
|
||||
and r0, r0, r1
|
||||
add r0, r0, r0, lsl #16
|
||||
str r0, [lr, # 0]
|
||||
str r0, [lr, # 4]
|
||||
str r0, [lr, # 8]
|
||||
str r0, [lr, #12]
|
||||
|
||||
end_of_row_loop:
|
||||
@ End of loop
|
||||
add lr, lr, #16
|
||||
subs r12, r12, #1
|
||||
bne row_loop
|
||||
|
||||
start_column_loop:
|
||||
@ Start of column loop
|
||||
pop {lr}
|
||||
mov r12, #8
|
||||
column_loop:
|
||||
ldrsh r0, [lr, #( 0*8)] @ r0 = 'd0'
|
||||
ldrsh r2, [lr, #( 4*8)] @ r2 = 'd2'
|
||||
ldrsh r4, [lr, #( 8*8)] @ r4 = 'd4'
|
||||
ldrsh r6, [lr, #(12*8)] @ r6 = 'd6'
|
||||
|
||||
ldr r3, [r11, #FIX_0_541196100_ID]
|
||||
add r1, r2, r6
|
||||
ldr r5, [r11, #FIX_M_1_847759065_ID]
|
||||
mul r1, r3, r1 @ r1 = z1
|
||||
ldr r3, [r11, #FIX_0_765366865_ID]
|
||||
mla r6, r5, r6, r1 @ r6 = tmp2
|
||||
add r5, r0, r4 @ r5 = tmp0
|
||||
mla r2, r3, r2, r1 @ r2 = tmp3
|
||||
sub r3, r0, r4 @ r3 = tmp1
|
||||
|
||||
add r0, r2, r5, lsl #13 @ r0 = tmp10
|
||||
rsb r2, r2, r5, lsl #13 @ r2 = tmp13
|
||||
add r4, r6, r3, lsl #13 @ r4 = tmp11
|
||||
rsb r6, r6, r3, lsl #13 @ r6 = tmp12
|
||||
|
||||
ldrsh r1, [lr, #( 2*8)] @ r1 = 'd1'
|
||||
ldrsh r3, [lr, #( 6*8)] @ r3 = 'd3'
|
||||
ldrsh r5, [lr, #(10*8)] @ r5 = 'd5'
|
||||
ldrsh r7, [lr, #(14*8)] @ r7 = 'd7'
|
||||
|
||||
@ Check for empty odd column (happens about 20 to 25 % of the time according to my stats)
|
||||
orr r9, r1, r3
|
||||
orr r10, r5, r7
|
||||
orrs r10, r9, r10
|
||||
beq empty_odd_column
|
||||
|
||||
push {r0, r2, r4, r6} @ save on the stack tmp10, tmp13, tmp12, tmp11
|
||||
|
||||
add r0, r3, r5 @ r0 = 'z2'
|
||||
add r2, r1, r7 @ r2 = 'z1'
|
||||
add r4, r3, r7 @ r4 = 'z3'
|
||||
add r6, r1, r5 @ r6 = 'z4'
|
||||
ldr r9, [r11, #FIX_1_175875602_ID]
|
||||
add r8, r4, r6
|
||||
ldr r10, [r11, #FIX_M_0_899976223_ID]
|
||||
mul r8, r9, r8 @ r8 = 'z5'
|
||||
ldr r9, [r11, #FIX_M_2_562915447_ID]
|
||||
mul r2, r10, r2 @ r2 = 'z1'
|
||||
ldr r10, [r11, #FIX_M_1_961570560_ID]
|
||||
mul r0, r9, r0 @ r0 = 'z2'
|
||||
ldr r9, [r11, #FIX_M_0_390180644_ID]
|
||||
mla r4, r10, r4, r8 @ r4 = 'z3'
|
||||
ldr r10, [r11, #FIX_0_298631336_ID]
|
||||
mla r6, r9, r6, r8 @ r6 = 'z4'
|
||||
ldr r9, [r11, #FIX_2_053119869_ID]
|
||||
mla r7, r10, r7, r2 @ r7 = tmp0 + z1
|
||||
ldr r10, [r11, #FIX_3_072711026_ID]
|
||||
mla r5, r9, r5, r0 @ r5 = tmp1 + z2
|
||||
ldr r9, [r11, #FIX_1_501321110_ID]
|
||||
mla r3, r10, r3, r0 @ r3 = tmp2 + z2
|
||||
add r7, r7, r4 @ r7 = tmp0
|
||||
mla r1, r9, r1, r2 @ r1 = tmp3 + z1
|
||||
add r5, r5, r6 @ r5 = tmp1
|
||||
add r3, r3, r4 @ r3 = tmp2
|
||||
add r1, r1, r6 @ r1 = tmp3
|
||||
|
||||
pop {r0, r2, r4, r6} @ r0 = tmp10 / r2 = tmp13 / r4 = tmp11 / r6 = tmp12
|
||||
@ r1 = tmp3 / r3 = tmp2 / r5 = tmp1 / r7 = tmp0
|
||||
|
||||
@ Compute DESCALE(tmp10 + tmp3, CONST_BITS+PASS1_BITS+3)
|
||||
add r8, r0, r1
|
||||
add r8, r8, #(1<<17)
|
||||
mov r8, r8, asr #18
|
||||
strh r8, [lr, #( 0*8)]
|
||||
|
||||
@ Compute DESCALE(tmp10 - tmp3, CONST_BITS+PASS1_BITS+3)
|
||||
sub r8, r0, r1
|
||||
add r8, r8, #(1<<17)
|
||||
mov r8, r8, asr #18
|
||||
strh r8, [lr, #(14*8)]
|
||||
|
||||
@ Compute DESCALE(tmp11 + tmp2, CONST_BITS+PASS1_BITS+3)
|
||||
add r8, r4, r3
|
||||
add r8, r8, #(1<<17)
|
||||
mov r8, r8, asr #18
|
||||
strh r8, [lr, #( 2*8)]
|
||||
|
||||
@ Compute DESCALE(tmp11 - tmp2, CONST_BITS+PASS1_BITS+3)
|
||||
sub r8, r4, r3
|
||||
add r8, r8, #(1<<17)
|
||||
mov r8, r8, asr #18
|
||||
strh r8, [lr, #(12*8)]
|
||||
|
||||
@ Compute DESCALE(tmp12 + tmp1, CONST_BITS+PASS1_BITS+3)
|
||||
add r8, r6, r5
|
||||
add r8, r8, #(1<<17)
|
||||
mov r8, r8, asr #18
|
||||
strh r8, [lr, #( 4*8)]
|
||||
|
||||
@ Compute DESCALE(tmp12 - tmp1, CONST_BITS+PASS1_BITS+3)
|
||||
sub r8, r6, r5
|
||||
add r8, r8, #(1<<17)
|
||||
mov r8, r8, asr #18
|
||||
strh r8, [lr, #(10*8)]
|
||||
|
||||
@ Compute DESCALE(tmp13 + tmp0, CONST_BITS+PASS1_BITS+3)
|
||||
add r8, r2, r7
|
||||
add r8, r8, #(1<<17)
|
||||
mov r8, r8, asr #18
|
||||
strh r8, [lr, #( 6*8)]
|
||||
|
||||
@ Compute DESCALE(tmp13 - tmp0, CONST_BITS+PASS1_BITS+3)
|
||||
sub r8, r2, r7
|
||||
add r8, r8, #(1<<17)
|
||||
mov r8, r8, asr #18
|
||||
strh r8, [lr, #( 8*8)]
|
||||
|
||||
@ End of row loop
|
||||
add lr, lr, #2
|
||||
subs r12, r12, #1
|
||||
bne column_loop
|
||||
beq the_end
|
||||
|
||||
empty_odd_column:
|
||||
@ Compute DESCALE(tmp10 + tmp3, CONST_BITS+PASS1_BITS+3)
|
||||
@ Compute DESCALE(tmp10 - tmp3, CONST_BITS+PASS1_BITS+3)
|
||||
add r0, r0, #(1<<17)
|
||||
mov r0, r0, asr #18
|
||||
strh r0, [lr, #( 0*8)]
|
||||
strh r0, [lr, #(14*8)]
|
||||
|
||||
@ Compute DESCALE(tmp11 + tmp2, CONST_BITS+PASS1_BITS+3)
|
||||
@ Compute DESCALE(tmp11 - tmp2, CONST_BITS+PASS1_BITS+3)
|
||||
add r4, r4, #(1<<17)
|
||||
mov r4, r4, asr #18
|
||||
strh r4, [lr, #( 2*8)]
|
||||
strh r4, [lr, #(12*8)]
|
||||
|
||||
@ Compute DESCALE(tmp12 + tmp1, CONST_BITS+PASS1_BITS+3)
|
||||
@ Compute DESCALE(tmp12 - tmp1, CONST_BITS+PASS1_BITS+3)
|
||||
add r6, r6, #(1<<17)
|
||||
mov r6, r6, asr #18
|
||||
strh r6, [lr, #( 4*8)]
|
||||
strh r6, [lr, #(10*8)]
|
||||
|
||||
@ Compute DESCALE(tmp13 + tmp0, CONST_BITS+PASS1_BITS+3)
|
||||
@ Compute DESCALE(tmp13 - tmp0, CONST_BITS+PASS1_BITS+3)
|
||||
add r2, r2, #(1<<17)
|
||||
mov r2, r2, asr #18
|
||||
strh r2, [lr, #( 6*8)]
|
||||
strh r2, [lr, #( 8*8)]
|
||||
|
||||
@ End of row loop
|
||||
add lr, lr, #2
|
||||
subs r12, r12, #1
|
||||
bne column_loop
|
||||
|
||||
the_end:
|
||||
@ The end....
|
||||
pop {r4 - r11, pc}
|
||||
endfunc
|
||||
|
||||
const const_array
|
||||
.word FIX_0_298631336
|
||||
.word FIX_0_541196100
|
||||
.word FIX_0_765366865
|
||||
.word FIX_1_175875602
|
||||
.word FIX_1_501321110
|
||||
.word FIX_2_053119869
|
||||
.word FIX_3_072711026
|
||||
.word FIX_M_0_390180644
|
||||
.word FIX_M_0_899976223
|
||||
.word FIX_M_1_847759065
|
||||
.word FIX_M_1_961570560
|
||||
.word FIX_M_2_562915447
|
||||
.word FIX_0xFFFF
|
||||
endconst
|
|
@ -5,8 +5,29 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
SOURCES += [
|
||||
'fft_fixed_init_arm.c',
|
||||
'fft_fixed_neon.S',
|
||||
'fft_init_arm.c',
|
||||
'fft_neon.S',
|
||||
'fft_vfp.S',
|
||||
'flacdsp_arm.S',
|
||||
'flacdsp_init_arm.c',
|
||||
'idctdsp_arm.S',
|
||||
'idctdsp_armv6.S',
|
||||
'idctdsp_init_arm.c',
|
||||
'idctdsp_init_armv5te.c',
|
||||
'idctdsp_init_armv6.c',
|
||||
'idctdsp_init_neon.c',
|
||||
'idctdsp_neon.S',
|
||||
'jrevdct_arm.S',
|
||||
'mpegaudiodsp_fixed_armv6.S',
|
||||
'mpegaudiodsp_init_arm.c',
|
||||
'rdft_init_arm.c',
|
||||
'rdft_neon.S',
|
||||
'simple_idct_arm.S',
|
||||
'simple_idct_armv5te.S',
|
||||
'simple_idct_armv6.S',
|
||||
'simple_idct_neon.S',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'mozavcodec'
|
||||
|
|
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
* Copyright (c) 2011 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
.macro skip args:vararg
|
||||
.endm
|
||||
|
||||
.macro sum8 lo, hi, w, p, t1, t2, t3, t4, rsb=skip, offs=0
|
||||
ldr \t1, [\w, #4*\offs]
|
||||
ldr \t2, [\p, #4]!
|
||||
\rsb \t1, \t1, #0
|
||||
.irpc i, 135
|
||||
ldr \t3, [\w, #4*64*\i+4*\offs]
|
||||
ldr \t4, [\p, #4*64*\i]
|
||||
smlal \lo, \hi, \t1, \t2
|
||||
\rsb \t3, \t3, #0
|
||||
ldr \t1, [\w, #4*64*(\i+1)+4*\offs]
|
||||
ldr \t2, [\p, #4*64*(\i+1)]
|
||||
smlal \lo, \hi, \t3, \t4
|
||||
\rsb \t1, \t1, #0
|
||||
.endr
|
||||
ldr \t3, [\w, #4*64*7+4*\offs]
|
||||
ldr \t4, [\p, #4*64*7]
|
||||
smlal \lo, \hi, \t1, \t2
|
||||
\rsb \t3, \t3, #0
|
||||
smlal \lo, \hi, \t3, \t4
|
||||
.endm
|
||||
|
||||
.macro round rd, lo, hi
|
||||
lsr \rd, \lo, #24
|
||||
bic \lo, \lo, #0xff000000
|
||||
orr \rd, \rd, \hi, lsl #8
|
||||
mov \hi, #0
|
||||
ssat \rd, #16, \rd
|
||||
.endm
|
||||
|
||||
function ff_mpadsp_apply_window_fixed_armv6, export=1
|
||||
push {r2,r4-r11,lr}
|
||||
|
||||
add r4, r0, #4*512 @ synth_buf + 512
|
||||
.rept 4
|
||||
ldm r0!, {r5-r12}
|
||||
stm r4!, {r5-r12}
|
||||
.endr
|
||||
|
||||
ldr r4, [sp, #40] @ incr
|
||||
sub r0, r0, #4*17 @ synth_buf + 16
|
||||
ldr r8, [r2] @ sum:low
|
||||
add r2, r0, #4*32 @ synth_buf + 48
|
||||
rsb r5, r4, r4, lsl #5 @ 31 * incr
|
||||
lsl r4, r4, #1
|
||||
asr r9, r8, #31 @ sum:high
|
||||
add r5, r3, r5, lsl #1 @ samples2
|
||||
add r6, r1, #4*32 @ w2
|
||||
str r4, [sp, #40]
|
||||
|
||||
sum8 r8, r9, r1, r0, r10, r11, r12, lr
|
||||
sum8 r8, r9, r1, r2, r10, r11, r12, lr, rsb, 32
|
||||
round r10, r8, r9
|
||||
strh_post r10, r3, r4
|
||||
|
||||
mov lr, #15
|
||||
1:
|
||||
ldr r12, [r0, #4]!
|
||||
ldr r11, [r6, #-4]!
|
||||
ldr r10, [r1, #4]!
|
||||
.irpc i, 0246
|
||||
.if \i
|
||||
ldr r11, [r6, #4*64*\i]
|
||||
ldr r10, [r1, #4*64*\i]
|
||||
.endif
|
||||
rsb r11, r11, #0
|
||||
smlal r8, r9, r10, r12
|
||||
ldr r10, [r0, #4*64*(\i+1)]
|
||||
.ifeq \i
|
||||
smull r4, r7, r11, r12
|
||||
.else
|
||||
smlal r4, r7, r11, r12
|
||||
.endif
|
||||
ldr r11, [r6, #4*64*(\i+1)]
|
||||
ldr r12, [r1, #4*64*(\i+1)]
|
||||
rsb r11, r11, #0
|
||||
smlal r8, r9, r12, r10
|
||||
.iflt \i-6
|
||||
ldr r12, [r0, #4*64*(\i+2)]
|
||||
.else
|
||||
ldr r12, [r2, #-4]!
|
||||
.endif
|
||||
smlal r4, r7, r11, r10
|
||||
.endr
|
||||
.irpc i, 0246
|
||||
ldr r10, [r1, #4*64*\i+4*32]
|
||||
rsb r12, r12, #0
|
||||
ldr r11, [r6, #4*64*\i+4*32]
|
||||
smlal r8, r9, r10, r12
|
||||
ldr r10, [r2, #4*64*(\i+1)]
|
||||
smlal r4, r7, r11, r12
|
||||
ldr r12, [r1, #4*64*(\i+1)+4*32]
|
||||
rsb r10, r10, #0
|
||||
ldr r11, [r6, #4*64*(\i+1)+4*32]
|
||||
smlal r8, r9, r12, r10
|
||||
.iflt \i-6
|
||||
ldr r12, [r2, #4*64*(\i+2)]
|
||||
.else
|
||||
ldr r12, [sp, #40]
|
||||
.endif
|
||||
smlal r4, r7, r11, r10
|
||||
.endr
|
||||
round r10, r8, r9
|
||||
adds r8, r8, r4
|
||||
adc r9, r9, r7
|
||||
strh_post r10, r3, r12
|
||||
round r11, r8, r9
|
||||
subs lr, lr, #1
|
||||
strh_dpost r11, r5, r12
|
||||
bgt 1b
|
||||
|
||||
sum8 r8, r9, r1, r0, r10, r11, r12, lr, rsb, 33
|
||||
pop {r4}
|
||||
round r10, r8, r9
|
||||
str r8, [r4]
|
||||
strh r10, [r3]
|
||||
|
||||
pop {r4-r11,pc}
|
||||
endfunc
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright (c) 2011 Mans Rullgard
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/arm/cpu.h"
|
||||
#include "libavcodec/mpegaudiodsp.h"
|
||||
#include "config.h"
|
||||
|
||||
void ff_mpadsp_apply_window_fixed_armv6(int32_t *synth_buf, int32_t *window,
|
||||
int *dither, int16_t *out, ptrdiff_t incr);
|
||||
|
||||
av_cold void ff_mpadsp_init_arm(MPADSPContext *s)
|
||||
{
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
if (have_armv6(cpu_flags)) {
|
||||
s->apply_window_fixed = ff_mpadsp_apply_window_fixed_armv6;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/cpu.h"
|
||||
#include "libavutil/arm/cpu.h"
|
||||
|
||||
#include "libavcodec/rdft.h"
|
||||
|
||||
void ff_rdft_calc_neon(struct RDFTContext *s, FFTSample *z);
|
||||
|
||||
av_cold void ff_rdft_init_arm(RDFTContext *s)
|
||||
{
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
if (have_neon(cpu_flags))
|
||||
s->rdft_calc = ff_rdft_calc_neon;
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
* ARM NEON optimised RDFT
|
||||
* Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
function ff_rdft_calc_neon, export=1
|
||||
push {r4-r8,lr}
|
||||
|
||||
ldr r6, [r0, #4] @ inverse
|
||||
mov r4, r0
|
||||
mov r5, r1
|
||||
|
||||
lsls r6, r6, #31
|
||||
bne 1f
|
||||
add r0, r4, #24
|
||||
bl X(ff_fft_permute_neon)
|
||||
add r0, r4, #24
|
||||
mov r1, r5
|
||||
bl X(ff_fft_calc_neon)
|
||||
1:
|
||||
ldr r12, [r4, #0] @ nbits
|
||||
mov r2, #1
|
||||
ldr r8, [r4, #20] @ negative_sin
|
||||
lsl r12, r2, r12
|
||||
add r0, r5, #8
|
||||
lsl r8, r8, #31
|
||||
add r1, r5, r12, lsl #2
|
||||
lsr r12, r12, #2
|
||||
vdup.32 d26, r8
|
||||
ldr r2, [r4, #12] @ tcos
|
||||
sub r12, r12, #2
|
||||
ldr r3, [r4, #16] @ tsin
|
||||
mov r7, r0
|
||||
sub r1, r1, #8
|
||||
mov lr, r1
|
||||
mov r8, #-8
|
||||
vld1.32 {d0}, [r0,:64]! @ d1[0,1]
|
||||
vld1.32 {d1}, [r1,:64], r8 @ d2[0,1]
|
||||
vld1.32 {d4}, [r2,:64]! @ tcos[i]
|
||||
vld1.32 {d5}, [r3,:64]! @ tsin[i]
|
||||
vmov.f32 d18, #0.5 @ k1
|
||||
vdup.32 d19, r6
|
||||
veor d5, d26, d5
|
||||
pld [r0, #32]
|
||||
veor d19, d18, d19 @ k2
|
||||
vmov.i32 d16, #0
|
||||
vmov.i32 d17, #1<<31
|
||||
pld [r1, #-32]
|
||||
vtrn.32 d16, d17
|
||||
pld [r2, #32]
|
||||
vrev64.32 d16, d16 @ d16=1,0 d17=0,1
|
||||
pld [r3, #32]
|
||||
2:
|
||||
veor q1, q0, q8 @ -d1[0],d1[1], d2[0],-d2[1]
|
||||
vld1.32 {d24}, [r0,:64]! @ d1[0,1]
|
||||
vadd.f32 d0, d0, d3 @ d1[0]+d2[0], d1[1]-d2[1]
|
||||
vld1.32 {d25}, [r1,:64], r8 @ d2[0,1]
|
||||
vadd.f32 d1, d2, d1 @ -d1[0]+d2[0], d1[1]+d2[1]
|
||||
veor q3, q12, q8 @ -d1[0],d1[1], d2[0],-d2[1]
|
||||
pld [r0, #32]
|
||||
vmul.f32 q10, q0, q9 @ ev.re, ev.im, od.im, od.re
|
||||
pld [r1, #-32]
|
||||
vadd.f32 d0, d24, d7 @ d1[0]+d2[0], d1[1]-d2[1]
|
||||
vadd.f32 d1, d6, d25 @ -d1[0]+d2[0], d1[1]+d2[1]
|
||||
vmul.f32 q11, q0, q9 @ ev.re, ev.im, od.im, od.re
|
||||
veor d7, d21, d16 @ -od.im, od.re
|
||||
vrev64.32 d3, d21 @ od.re, od.im
|
||||
veor d6, d20, d17 @ ev.re,-ev.im
|
||||
veor d2, d3, d16 @ -od.re, od.im
|
||||
vmla.f32 d20, d3, d4[1]
|
||||
vmla.f32 d20, d7, d5[1]
|
||||
vmla.f32 d6, d2, d4[1]
|
||||
vmla.f32 d6, d21, d5[1]
|
||||
vld1.32 {d4}, [r2,:64]! @ tcos[i]
|
||||
veor d7, d23, d16 @ -od.im, od.re
|
||||
vld1.32 {d5}, [r3,:64]! @ tsin[i]
|
||||
veor d24, d22, d17 @ ev.re,-ev.im
|
||||
vrev64.32 d3, d23 @ od.re, od.im
|
||||
veor d5, d26, d5
|
||||
pld [r2, #32]
|
||||
veor d2, d3, d16 @ -od.re, od.im
|
||||
pld [r3, #32]
|
||||
vmla.f32 d22, d3, d4[0]
|
||||
vmla.f32 d22, d7, d5[0]
|
||||
vmla.f32 d24, d2, d4[0]
|
||||
vmla.f32 d24, d23, d5[0]
|
||||
vld1.32 {d0}, [r0,:64]! @ d1[0,1]
|
||||
vld1.32 {d1}, [r1,:64], r8 @ d2[0,1]
|
||||
vst1.32 {d20}, [r7,:64]!
|
||||
vst1.32 {d6}, [lr,:64], r8
|
||||
vst1.32 {d22}, [r7,:64]!
|
||||
vst1.32 {d24}, [lr,:64], r8
|
||||
subs r12, r12, #2
|
||||
bgt 2b
|
||||
|
||||
veor q1, q0, q8 @ -d1[0],d1[1], d2[0],-d2[1]
|
||||
vadd.f32 d0, d0, d3 @ d1[0]+d2[0], d1[1]-d2[1]
|
||||
vadd.f32 d1, d2, d1 @ -d1[0]+d2[0], d1[1]+d2[1]
|
||||
ldr r2, [r4, #8] @ sign_convention
|
||||
vmul.f32 q10, q0, q9 @ ev.re, ev.im, od.im, od.re
|
||||
add r0, r0, #4
|
||||
bfc r2, #0, #31
|
||||
vld1.32 {d0[0]}, [r0,:32]
|
||||
veor d7, d21, d16 @ -od.im, od.re
|
||||
vrev64.32 d3, d21 @ od.re, od.im
|
||||
veor d6, d20, d17 @ ev.re,-ev.im
|
||||
vld1.32 {d22}, [r5,:64]
|
||||
vdup.32 d1, r2
|
||||
vmov d23, d22
|
||||
veor d2, d3, d16 @ -od.re, od.im
|
||||
vtrn.32 d22, d23
|
||||
veor d0, d0, d1
|
||||
veor d23, d23, d17
|
||||
vmla.f32 d20, d3, d4[1]
|
||||
vmla.f32 d20, d7, d5[1]
|
||||
vmla.f32 d6, d2, d4[1]
|
||||
vmla.f32 d6, d21, d5[1]
|
||||
vadd.f32 d22, d22, d23
|
||||
vst1.32 {d20}, [r7,:64]
|
||||
vst1.32 {d6}, [lr,:64]
|
||||
vst1.32 {d0[0]}, [r0,:32]
|
||||
vst1.32 {d22}, [r5,:64]
|
||||
|
||||
cmp r6, #0
|
||||
it eq
|
||||
popeq {r4-r8,pc}
|
||||
|
||||
vmul.f32 d22, d22, d18
|
||||
vst1.32 {d22}, [r5,:64]
|
||||
add r0, r4, #24
|
||||
mov r1, r5
|
||||
bl X(ff_fft_permute_neon)
|
||||
add r0, r4, #24
|
||||
mov r1, r5
|
||||
pop {r4-r8,lr}
|
||||
b X(ff_fft_calc_neon)
|
||||
endfunc
|
|
@ -0,0 +1,480 @@
|
|||
/*
|
||||
* Copyright (C) 2002 Frederic 'dilb' Boulay
|
||||
*
|
||||
* Author: Frederic Boulay <dilb@handhelds.org>
|
||||
*
|
||||
* The function defined in this file is derived from the simple_idct function
|
||||
* from the libavcodec library part of the FFmpeg project.
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
/* useful constants for the algorithm */
|
||||
#define W1 22725
|
||||
#define W2 21407
|
||||
#define W3 19266
|
||||
#define W4 16383
|
||||
#define W5 12873
|
||||
#define W6 8867
|
||||
#define W7 4520
|
||||
#define MASK_MSHW 0xFFFF0000
|
||||
|
||||
#define ROW_SHIFT 11
|
||||
#define ROW_SHIFT2MSHW (16-11)
|
||||
#define COL_SHIFT 20
|
||||
#define ROW_SHIFTED_1 1024 /* 1<< (ROW_SHIFT-1) */
|
||||
#define COL_SHIFTED_1 524288 /* 1<< (COL_SHIFT-1) */
|
||||
|
||||
|
||||
function ff_simple_idct_arm, export=1
|
||||
@@ void simple_idct_arm(int16_t *block)
|
||||
@@ save stack for reg needed (take all of them),
|
||||
@@ R0-R3 are scratch regs, so no need to save them, but R0 contains the pointer to block
|
||||
@@ so it must not be overwritten, if it is not saved!!
|
||||
@@ R12 is another scratch register, so it should not be saved too
|
||||
@@ save all registers
|
||||
stmfd sp!, {r4-r11, r14} @ R14 is also called LR
|
||||
@@ at this point, R0=block, other registers are free.
|
||||
add r14, r0, #112 @ R14=&block[8*7], better start from the last row, and decrease the value until row=0, i.e. R12=block.
|
||||
@@ add 2 temporary variables in the stack: R0 and R14
|
||||
sub sp, sp, #8 @ allow 2 local variables
|
||||
str r0, [sp, #0] @ save block in sp[0]
|
||||
@@ stack status
|
||||
@@ sp+4 free
|
||||
@@ sp+0 R0 (block)
|
||||
|
||||
|
||||
@@ at this point, R0=block, R14=&block[56], R12=__const_ptr_, R1-R11 free
|
||||
|
||||
|
||||
__row_loop:
|
||||
@@ read the row and check if it is null, almost null, or not, according to strongarm specs, it is not necessary to optimize ldr accesses (i.e. split 32 bits in two 16-bit words), at least it gives more usable registers :)
|
||||
ldr r1, [r14, #0] @ R1=(int32)(R12)[0]=ROWr32[0] (relative row cast to a 32b pointer)
|
||||
ldr r2, [r14, #4] @ R2=(int32)(R12)[1]=ROWr32[1]
|
||||
ldr r3, [r14, #8] @ R3=ROWr32[2]
|
||||
ldr r4, [r14, #12] @ R4=ROWr32[3]
|
||||
@@ check if the words are null, if all of them are null, then proceed with next row (branch __end_row_loop),
|
||||
@@ if ROWr16[0] is the only one not null, then proceed with this special case (branch __almost_empty_row)
|
||||
@@ else follow the complete algorithm.
|
||||
@@ at this point, R0=block, R14=&block[n], R12=__const_ptr_, R1=ROWr32[0], R2=ROWr32[1],
|
||||
@@ R3=ROWr32[2], R4=ROWr32[3], R5-R11 free
|
||||
orr r5, r4, r3 @ R5=R4 | R3
|
||||
orr r5, r5, r2 @ R5=R4 | R3 | R2
|
||||
orrs r6, r5, r1 @ Test R5 | R1 (the aim is to check if everything is null)
|
||||
beq __end_row_loop
|
||||
mov r7, r1, asr #16 @ R7=R1>>16=ROWr16[1] (evaluate it now, as it could be useful later)
|
||||
ldrsh r6, [r14, #0] @ R6=ROWr16[0]
|
||||
orrs r5, r5, r7 @ R5=R4 | R3 | R2 | R7
|
||||
beq __almost_empty_row
|
||||
|
||||
@@ __b_evaluation:
|
||||
@@ at this point, R0=block (temp), R1(free), R2=ROWr32[1], R3=ROWr32[2], R4=ROWr32[3],
|
||||
@@ R5=(temp), R6=ROWr16[0], R7=ROWr16[1], R8-R11 free,
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
@@ to save some registers/calls, proceed with b0-b3 first, followed by a0-a3
|
||||
|
||||
@@ MUL16(b0, W1, row[1]);
|
||||
@@ MUL16(b1, W3, row[1]);
|
||||
@@ MUL16(b2, W5, row[1]);
|
||||
@@ MUL16(b3, W7, row[1]);
|
||||
@@ MAC16(b0, W3, row[3]);
|
||||
@@ MAC16(b1, -W7, row[3]);
|
||||
@@ MAC16(b2, -W1, row[3]);
|
||||
@@ MAC16(b3, -W5, row[3]);
|
||||
ldr r8, =W1 @ R8=W1
|
||||
mov r2, r2, asr #16 @ R2=ROWr16[3]
|
||||
mul r0, r8, r7 @ R0=W1*ROWr16[1]=b0 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
|
||||
ldr r9, =W3 @ R9=W3
|
||||
ldr r10, =W5 @ R10=W5
|
||||
mul r1, r9, r7 @ R1=W3*ROWr16[1]=b1 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
|
||||
ldr r11, =W7 @ R11=W7
|
||||
mul r5, r10, r7 @ R5=W5*ROWr16[1]=b2 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
|
||||
mul r7, r11, r7 @ R7=W7*ROWr16[1]=b3 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
|
||||
teq r2, #0 @ if null avoid muls
|
||||
itttt ne
|
||||
mlane r0, r9, r2, r0 @ R0+=W3*ROWr16[3]=b0 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
|
||||
rsbne r2, r2, #0 @ R2=-ROWr16[3]
|
||||
mlane r1, r11, r2, r1 @ R1-=W7*ROWr16[3]=b1 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
|
||||
mlane r5, r8, r2, r5 @ R5-=W1*ROWr16[3]=b2 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
|
||||
it ne
|
||||
mlane r7, r10, r2, r7 @ R7-=W5*ROWr16[3]=b3 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
|
||||
|
||||
@@ at this point, R0=b0, R1=b1, R2 (free), R3=ROWr32[2], R4=ROWr32[3],
|
||||
@@ R5=b2, R6=ROWr16[0], R7=b3, R8=W1, R9=W3, R10=W5, R11=W7,
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
@@ temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3];
|
||||
@@ if (temp != 0) {}
|
||||
orrs r2, r3, r4 @ R2=ROWr32[2] | ROWr32[3]
|
||||
beq __end_b_evaluation
|
||||
|
||||
@@ at this point, R0=b0, R1=b1, R2 (free), R3=ROWr32[2], R4=ROWr32[3],
|
||||
@@ R5=b2, R6=ROWr16[0], R7=b3, R8=W1, R9=W3, R10=W5, R11=W7,
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
@@ MAC16(b0, W5, row[5]);
|
||||
@@ MAC16(b2, W7, row[5]);
|
||||
@@ MAC16(b3, W3, row[5]);
|
||||
@@ MAC16(b1, -W1, row[5]);
|
||||
@@ MAC16(b0, W7, row[7]);
|
||||
@@ MAC16(b2, W3, row[7]);
|
||||
@@ MAC16(b3, -W1, row[7]);
|
||||
@@ MAC16(b1, -W5, row[7]);
|
||||
mov r3, r3, asr #16 @ R3=ROWr16[5]
|
||||
teq r3, #0 @ if null avoid muls
|
||||
it ne
|
||||
mlane r0, r10, r3, r0 @ R0+=W5*ROWr16[5]=b0
|
||||
mov r4, r4, asr #16 @ R4=ROWr16[7]
|
||||
itttt ne
|
||||
mlane r5, r11, r3, r5 @ R5+=W7*ROWr16[5]=b2
|
||||
mlane r7, r9, r3, r7 @ R7+=W3*ROWr16[5]=b3
|
||||
rsbne r3, r3, #0 @ R3=-ROWr16[5]
|
||||
mlane r1, r8, r3, r1 @ R7-=W1*ROWr16[5]=b1
|
||||
@@ R3 is free now
|
||||
teq r4, #0 @ if null avoid muls
|
||||
itttt ne
|
||||
mlane r0, r11, r4, r0 @ R0+=W7*ROWr16[7]=b0
|
||||
mlane r5, r9, r4, r5 @ R5+=W3*ROWr16[7]=b2
|
||||
rsbne r4, r4, #0 @ R4=-ROWr16[7]
|
||||
mlane r7, r8, r4, r7 @ R7-=W1*ROWr16[7]=b3
|
||||
it ne
|
||||
mlane r1, r10, r4, r1 @ R1-=W5*ROWr16[7]=b1
|
||||
@@ R4 is free now
|
||||
__end_b_evaluation:
|
||||
@@ at this point, R0=b0, R1=b1, R2=ROWr32[2] | ROWr32[3] (tmp), R3 (free), R4 (free),
|
||||
@@ R5=b2, R6=ROWr16[0], R7=b3, R8 (free), R9 (free), R10 (free), R11 (free),
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
|
||||
@@ __a_evaluation:
|
||||
@@ a0 = (W4 * row[0]) + (1 << (ROW_SHIFT - 1));
|
||||
@@ a1 = a0 + W6 * row[2];
|
||||
@@ a2 = a0 - W6 * row[2];
|
||||
@@ a3 = a0 - W2 * row[2];
|
||||
@@ a0 = a0 + W2 * row[2];
|
||||
ldr r9, =W4 @ R9=W4
|
||||
mul r6, r9, r6 @ R6=W4*ROWr16[0]
|
||||
ldr r10, =W6 @ R10=W6
|
||||
ldrsh r4, [r14, #4] @ R4=ROWr16[2] (a3 not defined yet)
|
||||
add r6, r6, #ROW_SHIFTED_1 @ R6=W4*ROWr16[0] + 1<<(ROW_SHIFT-1) (a0)
|
||||
|
||||
mul r11, r10, r4 @ R11=W6*ROWr16[2]
|
||||
ldr r8, =W2 @ R8=W2
|
||||
sub r3, r6, r11 @ R3=a0-W6*ROWr16[2] (a2)
|
||||
@@ temp = ((uint32_t*)row)[2] | ((uint32_t*)row)[3];
|
||||
@@ if (temp != 0) {}
|
||||
teq r2, #0
|
||||
beq __end_bef_a_evaluation
|
||||
|
||||
add r2, r6, r11 @ R2=a0+W6*ROWr16[2] (a1)
|
||||
mul r11, r8, r4 @ R11=W2*ROWr16[2]
|
||||
sub r4, r6, r11 @ R4=a0-W2*ROWr16[2] (a3)
|
||||
add r6, r6, r11 @ R6=a0+W2*ROWr16[2] (a0)
|
||||
|
||||
|
||||
@@ at this point, R0=b0, R1=b1, R2=a1, R3=a2, R4=a3,
|
||||
@@ R5=b2, R6=a0, R7=b3, R8=W2, R9=W4, R10=W6, R11 (free),
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
|
||||
|
||||
@@ a0 += W4*row[4]
|
||||
@@ a1 -= W4*row[4]
|
||||
@@ a2 -= W4*row[4]
|
||||
@@ a3 += W4*row[4]
|
||||
ldrsh r11, [r14, #8] @ R11=ROWr16[4]
|
||||
teq r11, #0 @ if null avoid muls
|
||||
it ne
|
||||
mulne r11, r9, r11 @ R11=W4*ROWr16[4]
|
||||
@@ R9 is free now
|
||||
ldrsh r9, [r14, #12] @ R9=ROWr16[6]
|
||||
itttt ne
|
||||
addne r6, r6, r11 @ R6+=W4*ROWr16[4] (a0)
|
||||
subne r2, r2, r11 @ R2-=W4*ROWr16[4] (a1)
|
||||
subne r3, r3, r11 @ R3-=W4*ROWr16[4] (a2)
|
||||
addne r4, r4, r11 @ R4+=W4*ROWr16[4] (a3)
|
||||
@@ W6 alone is no more useful, save W2*ROWr16[6] in it instead
|
||||
teq r9, #0 @ if null avoid muls
|
||||
itttt ne
|
||||
mulne r11, r10, r9 @ R11=W6*ROWr16[6]
|
||||
addne r6, r6, r11 @ R6+=W6*ROWr16[6] (a0)
|
||||
mulne r10, r8, r9 @ R10=W2*ROWr16[6]
|
||||
@@ a0 += W6*row[6];
|
||||
@@ a3 -= W6*row[6];
|
||||
@@ a1 -= W2*row[6];
|
||||
@@ a2 += W2*row[6];
|
||||
subne r4, r4, r11 @ R4-=W6*ROWr16[6] (a3)
|
||||
itt ne
|
||||
subne r2, r2, r10 @ R2-=W2*ROWr16[6] (a1)
|
||||
addne r3, r3, r10 @ R3+=W2*ROWr16[6] (a2)
|
||||
|
||||
__end_a_evaluation:
|
||||
@@ at this point, R0=b0, R1=b1, R2=a1, R3=a2, R4=a3,
|
||||
@@ R5=b2, R6=a0, R7=b3, R8 (free), R9 (free), R10 (free), R11 (free),
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
@@ row[0] = (a0 + b0) >> ROW_SHIFT;
|
||||
@@ row[1] = (a1 + b1) >> ROW_SHIFT;
|
||||
@@ row[2] = (a2 + b2) >> ROW_SHIFT;
|
||||
@@ row[3] = (a3 + b3) >> ROW_SHIFT;
|
||||
@@ row[4] = (a3 - b3) >> ROW_SHIFT;
|
||||
@@ row[5] = (a2 - b2) >> ROW_SHIFT;
|
||||
@@ row[6] = (a1 - b1) >> ROW_SHIFT;
|
||||
@@ row[7] = (a0 - b0) >> ROW_SHIFT;
|
||||
add r8, r6, r0 @ R8=a0+b0
|
||||
add r9, r2, r1 @ R9=a1+b1
|
||||
@@ put two 16-bit half-words in a 32-bit word
|
||||
@@ ROWr32[0]=ROWr16[0] | (ROWr16[1]<<16) (only little-endian compliant then!!!)
|
||||
ldr r10, =MASK_MSHW @ R10=0xFFFF0000
|
||||
and r9, r10, r9, lsl #ROW_SHIFT2MSHW @ R9=0xFFFF0000 & ((a1+b1)<<5)
|
||||
mvn r11, r10 @ R11= NOT R10= 0x0000FFFF
|
||||
and r8, r11, r8, asr #ROW_SHIFT @ R8=0x0000FFFF & ((a0+b0)>>11)
|
||||
orr r8, r8, r9
|
||||
str r8, [r14, #0]
|
||||
|
||||
add r8, r3, r5 @ R8=a2+b2
|
||||
add r9, r4, r7 @ R9=a3+b3
|
||||
and r9, r10, r9, lsl #ROW_SHIFT2MSHW @ R9=0xFFFF0000 & ((a3+b3)<<5)
|
||||
and r8, r11, r8, asr #ROW_SHIFT @ R8=0x0000FFFF & ((a2+b2)>>11)
|
||||
orr r8, r8, r9
|
||||
str r8, [r14, #4]
|
||||
|
||||
sub r8, r4, r7 @ R8=a3-b3
|
||||
sub r9, r3, r5 @ R9=a2-b2
|
||||
and r9, r10, r9, lsl #ROW_SHIFT2MSHW @ R9=0xFFFF0000 & ((a2-b2)<<5)
|
||||
and r8, r11, r8, asr #ROW_SHIFT @ R8=0x0000FFFF & ((a3-b3)>>11)
|
||||
orr r8, r8, r9
|
||||
str r8, [r14, #8]
|
||||
|
||||
sub r8, r2, r1 @ R8=a1-b1
|
||||
sub r9, r6, r0 @ R9=a0-b0
|
||||
and r9, r10, r9, lsl #ROW_SHIFT2MSHW @ R9=0xFFFF0000 & ((a0-b0)<<5)
|
||||
and r8, r11, r8, asr #ROW_SHIFT @ R8=0x0000FFFF & ((a1-b1)>>11)
|
||||
orr r8, r8, r9
|
||||
str r8, [r14, #12]
|
||||
|
||||
bal __end_row_loop
|
||||
|
||||
__almost_empty_row:
|
||||
@@ the row was empty, except ROWr16[0], now, management of this special case
|
||||
@@ at this point, R0=block, R14=&block[n], R12=__const_ptr_, R1=ROWr32[0], R2=ROWr32[1],
|
||||
@@ R3=ROWr32[2], R4=ROWr32[3], R5=(temp), R6=ROWr16[0], R7=ROWr16[1],
|
||||
@@ R8=0xFFFF (temp), R9-R11 free
|
||||
mov r8, #0x10000 @ R8=0xFFFF (2 steps needed!) it saves a ldr call (because of delay run).
|
||||
sub r8, r8, #1 @ R8 is now ready.
|
||||
and r5, r8, r6, lsl #3 @ R5=R8 & (R6<<3)= (ROWr16[0]<<3) & 0xFFFF
|
||||
orr r5, r5, r5, lsl #16 @ R5=R5 | (R5<<16)
|
||||
str r5, [r14, #0] @ R14[0]=ROWr32[0]=R5
|
||||
str r5, [r14, #4] @ R14[4]=ROWr32[1]=R5
|
||||
str r5, [r14, #8] @ R14[8]=ROWr32[2]=R5
|
||||
str r5, [r14, #12] @ R14[12]=ROWr32[3]=R5
|
||||
|
||||
__end_row_loop:
|
||||
@@ at this point, R0-R11 (free)
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
ldr r0, [sp, #0] @ R0=block
|
||||
teq r0, r14 @ compare current &block[8*n] to block, when block is reached, the loop is finished.
|
||||
sub r14, r14, #16
|
||||
bne __row_loop
|
||||
|
||||
|
||||
|
||||
@@ at this point, R0=block, R1-R11 (free)
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
add r14, r0, #14 @ R14=&block[7], better start from the last col, and decrease the value until col=0, i.e. R14=block.
|
||||
__col_loop:
|
||||
|
||||
@@ __b_evaluation2:
|
||||
@@ at this point, R0=block (temp), R1-R11 (free)
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
@@ proceed with b0-b3 first, followed by a0-a3
|
||||
@@ MUL16(b0, W1, col[8x1]);
|
||||
@@ MUL16(b1, W3, col[8x1]);
|
||||
@@ MUL16(b2, W5, col[8x1]);
|
||||
@@ MUL16(b3, W7, col[8x1]);
|
||||
@@ MAC16(b0, W3, col[8x3]);
|
||||
@@ MAC16(b1, -W7, col[8x3]);
|
||||
@@ MAC16(b2, -W1, col[8x3]);
|
||||
@@ MAC16(b3, -W5, col[8x3]);
|
||||
ldr r8, =W1 @ R8=W1
|
||||
ldrsh r7, [r14, #16]
|
||||
mul r0, r8, r7 @ R0=W1*ROWr16[1]=b0 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
|
||||
ldr r9, =W3 @ R9=W3
|
||||
ldr r10, =W5 @ R10=W5
|
||||
mul r1, r9, r7 @ R1=W3*ROWr16[1]=b1 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
|
||||
ldr r11, =W7 @ R11=W7
|
||||
mul r5, r10, r7 @ R5=W5*ROWr16[1]=b2 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
|
||||
ldrsh r2, [r14, #48]
|
||||
mul r7, r11, r7 @ R7=W7*ROWr16[1]=b3 (ROWr16[1] must be the second arg, to have the possibility to save 1 cycle)
|
||||
teq r2, #0 @ if 0, then avoid muls
|
||||
itttt ne
|
||||
mlane r0, r9, r2, r0 @ R0+=W3*ROWr16[3]=b0 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
|
||||
rsbne r2, r2, #0 @ R2=-ROWr16[3]
|
||||
mlane r1, r11, r2, r1 @ R1-=W7*ROWr16[3]=b1 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
|
||||
mlane r5, r8, r2, r5 @ R5-=W1*ROWr16[3]=b2 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
|
||||
it ne
|
||||
mlane r7, r10, r2, r7 @ R7-=W5*ROWr16[3]=b3 (ROWr16[3] must be the second arg, to have the possibility to save 1 cycle)
|
||||
|
||||
@@ at this point, R0=b0, R1=b1, R2 (free), R3 (free), R4 (free),
|
||||
@@ R5=b2, R6 (free), R7=b3, R8=W1, R9=W3, R10=W5, R11=W7,
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
@@ MAC16(b0, W5, col[5x8]);
|
||||
@@ MAC16(b2, W7, col[5x8]);
|
||||
@@ MAC16(b3, W3, col[5x8]);
|
||||
@@ MAC16(b1, -W1, col[5x8]);
|
||||
@@ MAC16(b0, W7, col[7x8]);
|
||||
@@ MAC16(b2, W3, col[7x8]);
|
||||
@@ MAC16(b3, -W1, col[7x8]);
|
||||
@@ MAC16(b1, -W5, col[7x8]);
|
||||
ldrsh r3, [r14, #80] @ R3=COLr16[5x8]
|
||||
teq r3, #0 @ if 0 then avoid muls
|
||||
itttt ne
|
||||
mlane r0, r10, r3, r0 @ R0+=W5*ROWr16[5x8]=b0
|
||||
mlane r5, r11, r3, r5 @ R5+=W7*ROWr16[5x8]=b2
|
||||
mlane r7, r9, r3, r7 @ R7+=W3*ROWr16[5x8]=b3
|
||||
rsbne r3, r3, #0 @ R3=-ROWr16[5x8]
|
||||
ldrsh r4, [r14, #112] @ R4=COLr16[7x8]
|
||||
it ne
|
||||
mlane r1, r8, r3, r1 @ R7-=W1*ROWr16[5x8]=b1
|
||||
@@ R3 is free now
|
||||
teq r4, #0 @ if 0 then avoid muls
|
||||
itttt ne
|
||||
mlane r0, r11, r4, r0 @ R0+=W7*ROWr16[7x8]=b0
|
||||
mlane r5, r9, r4, r5 @ R5+=W3*ROWr16[7x8]=b2
|
||||
rsbne r4, r4, #0 @ R4=-ROWr16[7x8]
|
||||
mlane r7, r8, r4, r7 @ R7-=W1*ROWr16[7x8]=b3
|
||||
it ne
|
||||
mlane r1, r10, r4, r1 @ R1-=W5*ROWr16[7x8]=b1
|
||||
@@ R4 is free now
|
||||
@@ __end_b_evaluation2:
|
||||
@@ at this point, R0=b0, R1=b1, R2 (free), R3 (free), R4 (free),
|
||||
@@ R5=b2, R6 (free), R7=b3, R8 (free), R9 (free), R10 (free), R11 (free),
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
|
||||
@@ __a_evaluation2:
|
||||
@@ a0 = (W4 * col[8x0]) + (1 << (COL_SHIFT - 1));
|
||||
@@ a1 = a0 + W6 * row[2];
|
||||
@@ a2 = a0 - W6 * row[2];
|
||||
@@ a3 = a0 - W2 * row[2];
|
||||
@@ a0 = a0 + W2 * row[2];
|
||||
ldrsh r6, [r14, #0]
|
||||
ldr r9, =W4 @ R9=W4
|
||||
mul r6, r9, r6 @ R6=W4*ROWr16[0]
|
||||
ldr r10, =W6 @ R10=W6
|
||||
ldrsh r4, [r14, #32] @ R4=ROWr16[2] (a3 not defined yet)
|
||||
add r6, r6, #COL_SHIFTED_1 @ R6=W4*ROWr16[0] + 1<<(COL_SHIFT-1) (a0)
|
||||
mul r11, r10, r4 @ R11=W6*ROWr16[2]
|
||||
ldr r8, =W2 @ R8=W2
|
||||
add r2, r6, r11 @ R2=a0+W6*ROWr16[2] (a1)
|
||||
sub r3, r6, r11 @ R3=a0-W6*ROWr16[2] (a2)
|
||||
mul r11, r8, r4 @ R11=W2*ROWr16[2]
|
||||
sub r4, r6, r11 @ R4=a0-W2*ROWr16[2] (a3)
|
||||
add r6, r6, r11 @ R6=a0+W2*ROWr16[2] (a0)
|
||||
|
||||
@@ at this point, R0=b0, R1=b1, R2=a1, R3=a2, R4=a3,
|
||||
@@ R5=b2, R6=a0, R7=b3, R8=W2, R9=W4, R10=W6, R11 (free),
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
@@ a0 += W4*row[4]
|
||||
@@ a1 -= W4*row[4]
|
||||
@@ a2 -= W4*row[4]
|
||||
@@ a3 += W4*row[4]
|
||||
ldrsh r11, [r14, #64] @ R11=ROWr16[4]
|
||||
teq r11, #0 @ if null avoid muls
|
||||
itttt ne
|
||||
mulne r11, r9, r11 @ R11=W4*ROWr16[4]
|
||||
@@ R9 is free now
|
||||
addne r6, r6, r11 @ R6+=W4*ROWr16[4] (a0)
|
||||
subne r2, r2, r11 @ R2-=W4*ROWr16[4] (a1)
|
||||
subne r3, r3, r11 @ R3-=W4*ROWr16[4] (a2)
|
||||
ldrsh r9, [r14, #96] @ R9=ROWr16[6]
|
||||
it ne
|
||||
addne r4, r4, r11 @ R4+=W4*ROWr16[4] (a3)
|
||||
@@ W6 alone is no more useful, save W2*ROWr16[6] in it instead
|
||||
teq r9, #0 @ if null avoid muls
|
||||
itttt ne
|
||||
mulne r11, r10, r9 @ R11=W6*ROWr16[6]
|
||||
addne r6, r6, r11 @ R6+=W6*ROWr16[6] (a0)
|
||||
mulne r10, r8, r9 @ R10=W2*ROWr16[6]
|
||||
@@ a0 += W6*row[6];
|
||||
@@ a3 -= W6*row[6];
|
||||
@@ a1 -= W2*row[6];
|
||||
@@ a2 += W2*row[6];
|
||||
subne r4, r4, r11 @ R4-=W6*ROWr16[6] (a3)
|
||||
itt ne
|
||||
subne r2, r2, r10 @ R2-=W2*ROWr16[6] (a1)
|
||||
addne r3, r3, r10 @ R3+=W2*ROWr16[6] (a2)
|
||||
@@ __end_a_evaluation2:
|
||||
@@ at this point, R0=b0, R1=b1, R2=a1, R3=a2, R4=a3,
|
||||
@@ R5=b2, R6=a0, R7=b3, R8 (free), R9 (free), R10 (free), R11 (free),
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
@@ col[0 ] = ((a0 + b0) >> COL_SHIFT);
|
||||
@@ col[8 ] = ((a1 + b1) >> COL_SHIFT);
|
||||
@@ col[16] = ((a2 + b2) >> COL_SHIFT);
|
||||
@@ col[24] = ((a3 + b3) >> COL_SHIFT);
|
||||
@@ col[32] = ((a3 - b3) >> COL_SHIFT);
|
||||
@@ col[40] = ((a2 - b2) >> COL_SHIFT);
|
||||
@@ col[48] = ((a1 - b1) >> COL_SHIFT);
|
||||
@@ col[56] = ((a0 - b0) >> COL_SHIFT);
|
||||
@@@@@ no optimization here @@@@@
|
||||
add r8, r6, r0 @ R8=a0+b0
|
||||
add r9, r2, r1 @ R9=a1+b1
|
||||
mov r8, r8, asr #COL_SHIFT
|
||||
mov r9, r9, asr #COL_SHIFT
|
||||
strh r8, [r14, #0]
|
||||
strh r9, [r14, #16]
|
||||
add r8, r3, r5 @ R8=a2+b2
|
||||
add r9, r4, r7 @ R9=a3+b3
|
||||
mov r8, r8, asr #COL_SHIFT
|
||||
mov r9, r9, asr #COL_SHIFT
|
||||
strh r8, [r14, #32]
|
||||
strh r9, [r14, #48]
|
||||
sub r8, r4, r7 @ R8=a3-b3
|
||||
sub r9, r3, r5 @ R9=a2-b2
|
||||
mov r8, r8, asr #COL_SHIFT
|
||||
mov r9, r9, asr #COL_SHIFT
|
||||
strh r8, [r14, #64]
|
||||
strh r9, [r14, #80]
|
||||
sub r8, r2, r1 @ R8=a1-b1
|
||||
sub r9, r6, r0 @ R9=a0-b0
|
||||
mov r8, r8, asr #COL_SHIFT
|
||||
mov r9, r9, asr #COL_SHIFT
|
||||
strh r8, [r14, #96]
|
||||
strh r9, [r14, #112]
|
||||
|
||||
@@ __end_col_loop:
|
||||
@@ at this point, R0-R11 (free)
|
||||
@@ R12=__const_ptr_, R14=&block[n]
|
||||
ldr r0, [sp, #0] @ R0=block
|
||||
teq r0, r14 @ compare current &block[n] to block, when block is reached, the loop is finished.
|
||||
sub r14, r14, #2
|
||||
bne __col_loop
|
||||
|
||||
|
||||
|
||||
|
||||
@@ __end_simple_idct_arm:
|
||||
@@ restore registers to previous status!
|
||||
add sp, sp, #8 @@ the local variables!
|
||||
ldmfd sp!, {r4-r11, r15} @@ update PC with LR content.
|
||||
|
||||
|
||||
|
||||
@@ kind of sub-function, here not to overload the common case.
|
||||
__end_bef_a_evaluation:
|
||||
add r2, r6, r11 @ R2=a0+W6*ROWr16[2] (a1)
|
||||
mul r11, r8, r4 @ R11=W2*ROWr16[2]
|
||||
sub r4, r6, r11 @ R4=a0-W2*ROWr16[2] (a3)
|
||||
add r6, r6, r11 @ R6=a0+W2*ROWr16[2] (a0)
|
||||
bal __end_a_evaluation
|
||||
endfunc
|
|
@ -0,0 +1,613 @@
|
|||
/*
|
||||
* Simple IDCT
|
||||
*
|
||||
* Copyright (c) 2001 Michael Niedermayer <michaelni@gmx.at>
|
||||
* Copyright (c) 2006 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
#define W1 22725 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W2 21407 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W3 19266 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W4 16383 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W5 12873 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W6 8867 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W7 4520 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define ROW_SHIFT 11
|
||||
#define COL_SHIFT 20
|
||||
|
||||
#define W13 (W1 | (W3 << 16))
|
||||
#define W26 (W2 | (W6 << 16))
|
||||
#define W57 (W5 | (W7 << 16))
|
||||
|
||||
function idct_row_armv5te
|
||||
str lr, [sp, #-4]!
|
||||
|
||||
ldrd v1, v2, [a1, #8]
|
||||
ldrd a3, a4, [a1] /* a3 = row[1:0], a4 = row[3:2] */
|
||||
orrs v1, v1, v2
|
||||
itt eq
|
||||
cmpeq v1, a4
|
||||
cmpeq v1, a3, lsr #16
|
||||
beq row_dc_only
|
||||
|
||||
mov v1, #(1<<(ROW_SHIFT-1))
|
||||
mov ip, #16384
|
||||
sub ip, ip, #1 /* ip = W4 */
|
||||
smlabb v1, ip, a3, v1 /* v1 = W4*row[0]+(1<<(RS-1)) */
|
||||
ldr ip, =W26 /* ip = W2 | (W6 << 16) */
|
||||
smultb a2, ip, a4
|
||||
smulbb lr, ip, a4
|
||||
add v2, v1, a2
|
||||
sub v3, v1, a2
|
||||
sub v4, v1, lr
|
||||
add v1, v1, lr
|
||||
|
||||
ldr ip, =W13 /* ip = W1 | (W3 << 16) */
|
||||
ldr lr, =W57 /* lr = W5 | (W7 << 16) */
|
||||
smulbt v5, ip, a3
|
||||
smultt v6, lr, a4
|
||||
smlatt v5, ip, a4, v5
|
||||
smultt a2, ip, a3
|
||||
smulbt v7, lr, a3
|
||||
sub v6, v6, a2
|
||||
smulbt a2, ip, a4
|
||||
smultt fp, lr, a3
|
||||
sub v7, v7, a2
|
||||
smulbt a2, lr, a4
|
||||
ldrd a3, a4, [a1, #8] /* a3=row[5:4] a4=row[7:6] */
|
||||
sub fp, fp, a2
|
||||
|
||||
orrs a2, a3, a4
|
||||
beq 1f
|
||||
|
||||
smlabt v5, lr, a3, v5
|
||||
smlabt v6, ip, a3, v6
|
||||
smlatt v5, lr, a4, v5
|
||||
smlabt v6, lr, a4, v6
|
||||
smlatt v7, lr, a3, v7
|
||||
smlatt fp, ip, a3, fp
|
||||
smulbt a2, ip, a4
|
||||
smlatt v7, ip, a4, v7
|
||||
sub fp, fp, a2
|
||||
|
||||
ldr ip, =W26 /* ip = W2 | (W6 << 16) */
|
||||
mov a2, #16384
|
||||
sub a2, a2, #1 /* a2 = W4 */
|
||||
smulbb a2, a2, a3 /* a2 = W4*row[4] */
|
||||
smultb lr, ip, a4 /* lr = W6*row[6] */
|
||||
add v1, v1, a2 /* v1 += W4*row[4] */
|
||||
add v1, v1, lr /* v1 += W6*row[6] */
|
||||
add v4, v4, a2 /* v4 += W4*row[4] */
|
||||
sub v4, v4, lr /* v4 -= W6*row[6] */
|
||||
smulbb lr, ip, a4 /* lr = W2*row[6] */
|
||||
sub v2, v2, a2 /* v2 -= W4*row[4] */
|
||||
sub v2, v2, lr /* v2 -= W2*row[6] */
|
||||
sub v3, v3, a2 /* v3 -= W4*row[4] */
|
||||
add v3, v3, lr /* v3 += W2*row[6] */
|
||||
|
||||
1: add a2, v1, v5
|
||||
mov a3, a2, lsr #11
|
||||
bic a3, a3, #0x1f0000
|
||||
sub a2, v2, v6
|
||||
mov a2, a2, lsr #11
|
||||
add a3, a3, a2, lsl #16
|
||||
add a2, v3, v7
|
||||
mov a4, a2, lsr #11
|
||||
bic a4, a4, #0x1f0000
|
||||
add a2, v4, fp
|
||||
mov a2, a2, lsr #11
|
||||
add a4, a4, a2, lsl #16
|
||||
strd a3, a4, [a1]
|
||||
|
||||
sub a2, v4, fp
|
||||
mov a3, a2, lsr #11
|
||||
bic a3, a3, #0x1f0000
|
||||
sub a2, v3, v7
|
||||
mov a2, a2, lsr #11
|
||||
add a3, a3, a2, lsl #16
|
||||
add a2, v2, v6
|
||||
mov a4, a2, lsr #11
|
||||
bic a4, a4, #0x1f0000
|
||||
sub a2, v1, v5
|
||||
mov a2, a2, lsr #11
|
||||
add a4, a4, a2, lsl #16
|
||||
strd a3, a4, [a1, #8]
|
||||
|
||||
ldr pc, [sp], #4
|
||||
|
||||
row_dc_only:
|
||||
orr a3, a3, a3, lsl #16
|
||||
bic a3, a3, #0xe000
|
||||
mov a3, a3, lsl #3
|
||||
mov a4, a3
|
||||
strd a3, a4, [a1]
|
||||
strd a3, a4, [a1, #8]
|
||||
|
||||
ldr pc, [sp], #4
|
||||
endfunc
|
||||
|
||||
.macro idct_col
|
||||
ldr a4, [a1] /* a4 = col[1:0] */
|
||||
mov ip, #16384
|
||||
sub ip, ip, #1 /* ip = W4 */
|
||||
mov v1, #((1<<(COL_SHIFT-1))/W4) /* this matches the C version */
|
||||
add v2, v1, a4, asr #16
|
||||
rsb v2, v2, v2, lsl #14
|
||||
mov a4, a4, lsl #16
|
||||
add v1, v1, a4, asr #16
|
||||
ldr a4, [a1, #(16*4)]
|
||||
rsb v1, v1, v1, lsl #14
|
||||
|
||||
smulbb lr, ip, a4
|
||||
smulbt a3, ip, a4
|
||||
sub v3, v1, lr
|
||||
sub v5, v1, lr
|
||||
add v7, v1, lr
|
||||
add v1, v1, lr
|
||||
sub v4, v2, a3
|
||||
sub v6, v2, a3
|
||||
add fp, v2, a3
|
||||
ldr ip, =W26
|
||||
ldr a4, [a1, #(16*2)]
|
||||
add v2, v2, a3
|
||||
|
||||
smulbb lr, ip, a4
|
||||
smultb a3, ip, a4
|
||||
add v1, v1, lr
|
||||
sub v7, v7, lr
|
||||
add v3, v3, a3
|
||||
sub v5, v5, a3
|
||||
smulbt lr, ip, a4
|
||||
smultt a3, ip, a4
|
||||
add v2, v2, lr
|
||||
sub fp, fp, lr
|
||||
add v4, v4, a3
|
||||
ldr a4, [a1, #(16*6)]
|
||||
sub v6, v6, a3
|
||||
|
||||
smultb lr, ip, a4
|
||||
smulbb a3, ip, a4
|
||||
add v1, v1, lr
|
||||
sub v7, v7, lr
|
||||
sub v3, v3, a3
|
||||
add v5, v5, a3
|
||||
smultt lr, ip, a4
|
||||
smulbt a3, ip, a4
|
||||
add v2, v2, lr
|
||||
sub fp, fp, lr
|
||||
sub v4, v4, a3
|
||||
add v6, v6, a3
|
||||
|
||||
stmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp}
|
||||
|
||||
ldr ip, =W13
|
||||
ldr a4, [a1, #(16*1)]
|
||||
ldr lr, =W57
|
||||
smulbb v1, ip, a4
|
||||
smultb v3, ip, a4
|
||||
smulbb v5, lr, a4
|
||||
smultb v7, lr, a4
|
||||
smulbt v2, ip, a4
|
||||
smultt v4, ip, a4
|
||||
smulbt v6, lr, a4
|
||||
smultt fp, lr, a4
|
||||
rsb v4, v4, #0
|
||||
ldr a4, [a1, #(16*3)]
|
||||
rsb v3, v3, #0
|
||||
|
||||
smlatb v1, ip, a4, v1
|
||||
smlatb v3, lr, a4, v3
|
||||
smulbb a3, ip, a4
|
||||
smulbb a2, lr, a4
|
||||
sub v5, v5, a3
|
||||
sub v7, v7, a2
|
||||
smlatt v2, ip, a4, v2
|
||||
smlatt v4, lr, a4, v4
|
||||
smulbt a3, ip, a4
|
||||
smulbt a2, lr, a4
|
||||
sub v6, v6, a3
|
||||
ldr a4, [a1, #(16*5)]
|
||||
sub fp, fp, a2
|
||||
|
||||
smlabb v1, lr, a4, v1
|
||||
smlabb v3, ip, a4, v3
|
||||
smlatb v5, lr, a4, v5
|
||||
smlatb v7, ip, a4, v7
|
||||
smlabt v2, lr, a4, v2
|
||||
smlabt v4, ip, a4, v4
|
||||
smlatt v6, lr, a4, v6
|
||||
ldr a3, [a1, #(16*7)]
|
||||
smlatt fp, ip, a4, fp
|
||||
|
||||
smlatb v1, lr, a3, v1
|
||||
smlabb v3, lr, a3, v3
|
||||
smlatb v5, ip, a3, v5
|
||||
smulbb a4, ip, a3
|
||||
smlatt v2, lr, a3, v2
|
||||
sub v7, v7, a4
|
||||
smlabt v4, lr, a3, v4
|
||||
smulbt a4, ip, a3
|
||||
smlatt v6, ip, a3, v6
|
||||
sub fp, fp, a4
|
||||
.endm
|
||||
|
||||
function idct_col_armv5te
|
||||
str lr, [sp, #-4]!
|
||||
|
||||
idct_col
|
||||
|
||||
ldmfd sp!, {a3, a4}
|
||||
adds a2, a3, v1
|
||||
mov a2, a2, lsr #20
|
||||
it mi
|
||||
orrmi a2, a2, #0xf000
|
||||
add ip, a4, v2
|
||||
mov ip, ip, asr #20
|
||||
orr a2, a2, ip, lsl #16
|
||||
str a2, [a1]
|
||||
subs a3, a3, v1
|
||||
mov a2, a3, lsr #20
|
||||
it mi
|
||||
orrmi a2, a2, #0xf000
|
||||
sub a4, a4, v2
|
||||
mov a4, a4, asr #20
|
||||
orr a2, a2, a4, lsl #16
|
||||
ldmfd sp!, {a3, a4}
|
||||
str a2, [a1, #(16*7)]
|
||||
|
||||
subs a2, a3, v3
|
||||
mov a2, a2, lsr #20
|
||||
it mi
|
||||
orrmi a2, a2, #0xf000
|
||||
sub ip, a4, v4
|
||||
mov ip, ip, asr #20
|
||||
orr a2, a2, ip, lsl #16
|
||||
str a2, [a1, #(16*1)]
|
||||
adds a3, a3, v3
|
||||
mov a2, a3, lsr #20
|
||||
it mi
|
||||
orrmi a2, a2, #0xf000
|
||||
add a4, a4, v4
|
||||
mov a4, a4, asr #20
|
||||
orr a2, a2, a4, lsl #16
|
||||
ldmfd sp!, {a3, a4}
|
||||
str a2, [a1, #(16*6)]
|
||||
|
||||
adds a2, a3, v5
|
||||
mov a2, a2, lsr #20
|
||||
it mi
|
||||
orrmi a2, a2, #0xf000
|
||||
add ip, a4, v6
|
||||
mov ip, ip, asr #20
|
||||
orr a2, a2, ip, lsl #16
|
||||
str a2, [a1, #(16*2)]
|
||||
subs a3, a3, v5
|
||||
mov a2, a3, lsr #20
|
||||
it mi
|
||||
orrmi a2, a2, #0xf000
|
||||
sub a4, a4, v6
|
||||
mov a4, a4, asr #20
|
||||
orr a2, a2, a4, lsl #16
|
||||
ldmfd sp!, {a3, a4}
|
||||
str a2, [a1, #(16*5)]
|
||||
|
||||
adds a2, a3, v7
|
||||
mov a2, a2, lsr #20
|
||||
it mi
|
||||
orrmi a2, a2, #0xf000
|
||||
add ip, a4, fp
|
||||
mov ip, ip, asr #20
|
||||
orr a2, a2, ip, lsl #16
|
||||
str a2, [a1, #(16*3)]
|
||||
subs a3, a3, v7
|
||||
mov a2, a3, lsr #20
|
||||
it mi
|
||||
orrmi a2, a2, #0xf000
|
||||
sub a4, a4, fp
|
||||
mov a4, a4, asr #20
|
||||
orr a2, a2, a4, lsl #16
|
||||
str a2, [a1, #(16*4)]
|
||||
|
||||
ldr pc, [sp], #4
|
||||
endfunc
|
||||
|
||||
.macro clip dst, src:vararg
|
||||
movs \dst, \src
|
||||
it mi
|
||||
movmi \dst, #0
|
||||
cmp \dst, #255
|
||||
it gt
|
||||
movgt \dst, #255
|
||||
.endm
|
||||
|
||||
.macro aclip dst, src:vararg
|
||||
adds \dst, \src
|
||||
it mi
|
||||
movmi \dst, #0
|
||||
cmp \dst, #255
|
||||
it gt
|
||||
movgt \dst, #255
|
||||
.endm
|
||||
|
||||
function idct_col_put_armv5te
|
||||
str lr, [sp, #-4]!
|
||||
|
||||
idct_col
|
||||
|
||||
ldmfd sp!, {a3, a4}
|
||||
ldr lr, [sp, #32]
|
||||
add a2, a3, v1
|
||||
clip a2, a2, asr #20
|
||||
add ip, a4, v2
|
||||
clip ip, ip, asr #20
|
||||
orr a2, a2, ip, lsl #8
|
||||
sub a3, a3, v1
|
||||
clip a3, a3, asr #20
|
||||
sub a4, a4, v2
|
||||
clip a4, a4, asr #20
|
||||
ldr v1, [sp, #28]
|
||||
strh a2, [v1]
|
||||
add a2, v1, #2
|
||||
str a2, [sp, #28]
|
||||
orr a2, a3, a4, lsl #8
|
||||
rsb v2, lr, lr, lsl #3
|
||||
ldmfd sp!, {a3, a4}
|
||||
strh_pre a2, v2, v1
|
||||
|
||||
sub a2, a3, v3
|
||||
clip a2, a2, asr #20
|
||||
sub ip, a4, v4
|
||||
clip ip, ip, asr #20
|
||||
orr a2, a2, ip, lsl #8
|
||||
strh_pre a2, v1, lr
|
||||
add a3, a3, v3
|
||||
clip a2, a3, asr #20
|
||||
add a4, a4, v4
|
||||
clip a4, a4, asr #20
|
||||
orr a2, a2, a4, lsl #8
|
||||
ldmfd sp!, {a3, a4}
|
||||
strh_dpre a2, v2, lr
|
||||
|
||||
add a2, a3, v5
|
||||
clip a2, a2, asr #20
|
||||
add ip, a4, v6
|
||||
clip ip, ip, asr #20
|
||||
orr a2, a2, ip, lsl #8
|
||||
strh_pre a2, v1, lr
|
||||
sub a3, a3, v5
|
||||
clip a2, a3, asr #20
|
||||
sub a4, a4, v6
|
||||
clip a4, a4, asr #20
|
||||
orr a2, a2, a4, lsl #8
|
||||
ldmfd sp!, {a3, a4}
|
||||
strh_dpre a2, v2, lr
|
||||
|
||||
add a2, a3, v7
|
||||
clip a2, a2, asr #20
|
||||
add ip, a4, fp
|
||||
clip ip, ip, asr #20
|
||||
orr a2, a2, ip, lsl #8
|
||||
strh a2, [v1, lr]
|
||||
sub a3, a3, v7
|
||||
clip a2, a3, asr #20
|
||||
sub a4, a4, fp
|
||||
clip a4, a4, asr #20
|
||||
orr a2, a2, a4, lsl #8
|
||||
strh_dpre a2, v2, lr
|
||||
|
||||
ldr pc, [sp], #4
|
||||
endfunc
|
||||
|
||||
function idct_col_add_armv5te
|
||||
str lr, [sp, #-4]!
|
||||
|
||||
idct_col
|
||||
|
||||
ldr lr, [sp, #36]
|
||||
|
||||
ldmfd sp!, {a3, a4}
|
||||
ldrh ip, [lr]
|
||||
add a2, a3, v1
|
||||
sub a3, a3, v1
|
||||
and v1, ip, #255
|
||||
aclip a2, v1, a2, asr #20
|
||||
add v1, a4, v2
|
||||
mov v1, v1, asr #20
|
||||
aclip v1, v1, ip, lsr #8
|
||||
orr a2, a2, v1, lsl #8
|
||||
ldr v1, [sp, #32]
|
||||
sub a4, a4, v2
|
||||
rsb v2, v1, v1, lsl #3
|
||||
ldrh_pre ip, v2, lr
|
||||
strh a2, [lr]
|
||||
and a2, ip, #255
|
||||
aclip a3, a2, a3, asr #20
|
||||
mov a4, a4, asr #20
|
||||
aclip a4, a4, ip, lsr #8
|
||||
add a2, lr, #2
|
||||
str a2, [sp, #28]
|
||||
orr a2, a3, a4, lsl #8
|
||||
strh a2, [v2]
|
||||
|
||||
ldmfd sp!, {a3, a4}
|
||||
ldrh_pre ip, lr, v1
|
||||
sub a2, a3, v3
|
||||
add a3, a3, v3
|
||||
and v3, ip, #255
|
||||
aclip a2, v3, a2, asr #20
|
||||
sub v3, a4, v4
|
||||
mov v3, v3, asr #20
|
||||
aclip v3, v3, ip, lsr #8
|
||||
orr a2, a2, v3, lsl #8
|
||||
add a4, a4, v4
|
||||
ldrh_dpre ip, v2, v1
|
||||
strh a2, [lr]
|
||||
and a2, ip, #255
|
||||
aclip a3, a2, a3, asr #20
|
||||
mov a4, a4, asr #20
|
||||
aclip a4, a4, ip, lsr #8
|
||||
orr a2, a3, a4, lsl #8
|
||||
strh a2, [v2]
|
||||
|
||||
ldmfd sp!, {a3, a4}
|
||||
ldrh_pre ip, lr, v1
|
||||
add a2, a3, v5
|
||||
sub a3, a3, v5
|
||||
and v3, ip, #255
|
||||
aclip a2, v3, a2, asr #20
|
||||
add v3, a4, v6
|
||||
mov v3, v3, asr #20
|
||||
aclip v3, v3, ip, lsr #8
|
||||
orr a2, a2, v3, lsl #8
|
||||
sub a4, a4, v6
|
||||
ldrh_dpre ip, v2, v1
|
||||
strh a2, [lr]
|
||||
and a2, ip, #255
|
||||
aclip a3, a2, a3, asr #20
|
||||
mov a4, a4, asr #20
|
||||
aclip a4, a4, ip, lsr #8
|
||||
orr a2, a3, a4, lsl #8
|
||||
strh a2, [v2]
|
||||
|
||||
ldmfd sp!, {a3, a4}
|
||||
ldrh_pre ip, lr, v1
|
||||
add a2, a3, v7
|
||||
sub a3, a3, v7
|
||||
and v3, ip, #255
|
||||
aclip a2, v3, a2, asr #20
|
||||
add v3, a4, fp
|
||||
mov v3, v3, asr #20
|
||||
aclip v3, v3, ip, lsr #8
|
||||
orr a2, a2, v3, lsl #8
|
||||
sub a4, a4, fp
|
||||
ldrh_dpre ip, v2, v1
|
||||
strh a2, [lr]
|
||||
and a2, ip, #255
|
||||
aclip a3, a2, a3, asr #20
|
||||
mov a4, a4, asr #20
|
||||
aclip a4, a4, ip, lsr #8
|
||||
orr a2, a3, a4, lsl #8
|
||||
strh a2, [v2]
|
||||
|
||||
ldr pc, [sp], #4
|
||||
endfunc
|
||||
|
||||
function ff_simple_idct_armv5te, export=1
|
||||
stmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, lr}
|
||||
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
|
||||
sub a1, a1, #(16*7)
|
||||
|
||||
bl idct_col_armv5te
|
||||
add a1, a1, #4
|
||||
bl idct_col_armv5te
|
||||
add a1, a1, #4
|
||||
bl idct_col_armv5te
|
||||
add a1, a1, #4
|
||||
bl idct_col_armv5te
|
||||
|
||||
ldmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc}
|
||||
endfunc
|
||||
|
||||
function ff_simple_idct_add_armv5te, export=1
|
||||
stmfd sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr}
|
||||
|
||||
mov a1, a3
|
||||
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
|
||||
sub a1, a1, #(16*7)
|
||||
|
||||
bl idct_col_add_armv5te
|
||||
add a1, a1, #4
|
||||
bl idct_col_add_armv5te
|
||||
add a1, a1, #4
|
||||
bl idct_col_add_armv5te
|
||||
add a1, a1, #4
|
||||
bl idct_col_add_armv5te
|
||||
|
||||
add sp, sp, #8
|
||||
ldmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc}
|
||||
endfunc
|
||||
|
||||
function ff_simple_idct_put_armv5te, export=1
|
||||
stmfd sp!, {a1, a2, v1, v2, v3, v4, v5, v6, v7, fp, lr}
|
||||
|
||||
mov a1, a3
|
||||
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
add a1, a1, #16
|
||||
bl idct_row_armv5te
|
||||
|
||||
sub a1, a1, #(16*7)
|
||||
|
||||
bl idct_col_put_armv5te
|
||||
add a1, a1, #4
|
||||
bl idct_col_put_armv5te
|
||||
add a1, a1, #4
|
||||
bl idct_col_put_armv5te
|
||||
add a1, a1, #4
|
||||
bl idct_col_put_armv5te
|
||||
|
||||
add sp, sp, #8
|
||||
ldmfd sp!, {v1, v2, v3, v4, v5, v6, v7, fp, pc}
|
||||
endfunc
|
|
@ -0,0 +1,425 @@
|
|||
/*
|
||||
* Simple IDCT
|
||||
*
|
||||
* Copyright (c) 2001 Michael Niedermayer <michaelni@gmx.at>
|
||||
* Copyright (c) 2007 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
#define W1 22725 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W2 21407 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W3 19266 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W4 16383 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W5 12873 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W6 8867 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define W7 4520 /* cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5 */
|
||||
#define ROW_SHIFT 11
|
||||
#define COL_SHIFT 20
|
||||
|
||||
#define W13 (W1 | (W3 << 16))
|
||||
#define W26 (W2 | (W6 << 16))
|
||||
#define W42 (W4 | (W2 << 16))
|
||||
#define W42n (-W4&0xffff | (-W2 << 16))
|
||||
#define W46 (W4 | (W6 << 16))
|
||||
#define W57 (W5 | (W7 << 16))
|
||||
|
||||
/*
|
||||
Compute partial IDCT of single row.
|
||||
shift = left-shift amount
|
||||
r0 = source address
|
||||
r2 = row[2,0] <= 2 cycles
|
||||
r3 = row[3,1]
|
||||
ip = w42 <= 2 cycles
|
||||
|
||||
Output in registers r4--r11
|
||||
*/
|
||||
.macro idct_row shift
|
||||
ldr lr, =W46 /* lr = W4 | (W6 << 16) */
|
||||
mov r1, #(1<<(\shift-1))
|
||||
smlad r4, r2, ip, r1
|
||||
smlsd r7, r2, ip, r1
|
||||
ldr ip, =W13 /* ip = W1 | (W3 << 16) */
|
||||
ldr r10,=W57 /* r10 = W5 | (W7 << 16) */
|
||||
smlad r5, r2, lr, r1
|
||||
smlsd r6, r2, lr, r1
|
||||
|
||||
smuad r8, r3, ip /* r8 = B0 = W1*row[1] + W3*row[3] */
|
||||
smusdx r11,r3, r10 /* r11 = B3 = W7*row[1] - W5*row[3] */
|
||||
ldr lr, [r0, #12] /* lr = row[7,5] */
|
||||
pkhtb r2, ip, r10,asr #16 /* r3 = W7 | (W3 << 16) */
|
||||
pkhbt r1, ip, r10,lsl #16 /* r1 = W1 | (W5 << 16) */
|
||||
smusdx r9, r2, r3 /* r9 = -B1 = W7*row[3] - W3*row[1] */
|
||||
smlad r8, lr, r10,r8 /* B0 += W5*row[5] + W7*row[7] */
|
||||
smusdx r10,r3, r1 /* r10 = B2 = W5*row[1] - W1*row[3] */
|
||||
|
||||
ldr r3, =W42n /* r3 = -W4 | (-W2 << 16) */
|
||||
smlad r10,lr, r2, r10 /* B2 += W7*row[5] + W3*row[7] */
|
||||
ldr r2, [r0, #4] /* r2 = row[6,4] */
|
||||
smlsdx r11,lr, ip, r11 /* B3 += W3*row[5] - W1*row[7] */
|
||||
ldr ip, =W46 /* ip = W4 | (W6 << 16) */
|
||||
smlad r9, lr, r1, r9 /* B1 -= W1*row[5] + W5*row[7] */
|
||||
|
||||
smlad r5, r2, r3, r5 /* A1 += -W4*row[4] - W2*row[6] */
|
||||
smlsd r6, r2, r3, r6 /* A2 += -W4*row[4] + W2*row[6] */
|
||||
smlad r4, r2, ip, r4 /* A0 += W4*row[4] + W6*row[6] */
|
||||
smlsd r7, r2, ip, r7 /* A3 += W4*row[4] - W6*row[6] */
|
||||
.endm
|
||||
|
||||
/*
|
||||
Compute partial IDCT of half row.
|
||||
shift = left-shift amount
|
||||
r2 = row[2,0]
|
||||
r3 = row[3,1]
|
||||
ip = w42
|
||||
|
||||
Output in registers r4--r11
|
||||
*/
|
||||
.macro idct_row4 shift
|
||||
ldr lr, =W46 /* lr = W4 | (W6 << 16) */
|
||||
ldr r10,=W57 /* r10 = W5 | (W7 << 16) */
|
||||
mov r1, #(1<<(\shift-1))
|
||||
smlad r4, r2, ip, r1
|
||||
smlsd r7, r2, ip, r1
|
||||
ldr ip, =W13 /* ip = W1 | (W3 << 16) */
|
||||
smlad r5, r2, lr, r1
|
||||
smlsd r6, r2, lr, r1
|
||||
smusdx r11,r3, r10 /* r11 = B3 = W7*row[1] - W5*row[3] */
|
||||
smuad r8, r3, ip /* r8 = B0 = W1*row[1] + W3*row[3] */
|
||||
pkhtb r2, ip, r10,asr #16 /* r3 = W7 | (W3 << 16) */
|
||||
pkhbt r1, ip, r10,lsl #16 /* r1 = W1 | (W5 << 16) */
|
||||
smusdx r9, r2, r3 /* r9 = -B1 = W7*row[3] - W3*row[1] */
|
||||
smusdx r10,r3, r1 /* r10 = B2 = W5*row[1] - W1*row[3] */
|
||||
.endm
|
||||
|
||||
/*
|
||||
Compute final part of IDCT single row without shift.
|
||||
Input in registers r4--r11
|
||||
Output in registers ip, r4--r6, lr, r8--r10
|
||||
*/
|
||||
.macro idct_finish
|
||||
add ip, r4, r8 /* r1 = A0 + B0 */
|
||||
sub lr, r4, r8 /* r2 = A0 - B0 */
|
||||
sub r4, r5, r9 /* r2 = A1 + B1 */
|
||||
add r8, r5, r9 /* r2 = A1 - B1 */
|
||||
add r5, r6, r10 /* r1 = A2 + B2 */
|
||||
sub r9, r6, r10 /* r1 = A2 - B2 */
|
||||
add r6, r7, r11 /* r2 = A3 + B3 */
|
||||
sub r10,r7, r11 /* r2 = A3 - B3 */
|
||||
.endm
|
||||
|
||||
/*
|
||||
Compute final part of IDCT single row.
|
||||
shift = right-shift amount
|
||||
Input/output in registers r4--r11
|
||||
*/
|
||||
.macro idct_finish_shift shift
|
||||
add r3, r4, r8 /* r3 = A0 + B0 */
|
||||
sub r2, r4, r8 /* r2 = A0 - B0 */
|
||||
mov r4, r3, asr #\shift
|
||||
mov r8, r2, asr #\shift
|
||||
|
||||
sub r3, r5, r9 /* r3 = A1 + B1 */
|
||||
add r2, r5, r9 /* r2 = A1 - B1 */
|
||||
mov r5, r3, asr #\shift
|
||||
mov r9, r2, asr #\shift
|
||||
|
||||
add r3, r6, r10 /* r3 = A2 + B2 */
|
||||
sub r2, r6, r10 /* r2 = A2 - B2 */
|
||||
mov r6, r3, asr #\shift
|
||||
mov r10,r2, asr #\shift
|
||||
|
||||
add r3, r7, r11 /* r3 = A3 + B3 */
|
||||
sub r2, r7, r11 /* r2 = A3 - B3 */
|
||||
mov r7, r3, asr #\shift
|
||||
mov r11,r2, asr #\shift
|
||||
.endm
|
||||
|
||||
/*
|
||||
Compute final part of IDCT single row, saturating results at 8 bits.
|
||||
shift = right-shift amount
|
||||
Input/output in registers r4--r11
|
||||
*/
|
||||
.macro idct_finish_shift_sat shift
|
||||
add r3, r4, r8 /* r3 = A0 + B0 */
|
||||
sub ip, r4, r8 /* ip = A0 - B0 */
|
||||
usat r4, #8, r3, asr #\shift
|
||||
usat r8, #8, ip, asr #\shift
|
||||
|
||||
sub r3, r5, r9 /* r3 = A1 + B1 */
|
||||
add ip, r5, r9 /* ip = A1 - B1 */
|
||||
usat r5, #8, r3, asr #\shift
|
||||
usat r9, #8, ip, asr #\shift
|
||||
|
||||
add r3, r6, r10 /* r3 = A2 + B2 */
|
||||
sub ip, r6, r10 /* ip = A2 - B2 */
|
||||
usat r6, #8, r3, asr #\shift
|
||||
usat r10,#8, ip, asr #\shift
|
||||
|
||||
add r3, r7, r11 /* r3 = A3 + B3 */
|
||||
sub ip, r7, r11 /* ip = A3 - B3 */
|
||||
usat r7, #8, r3, asr #\shift
|
||||
usat r11,#8, ip, asr #\shift
|
||||
.endm
|
||||
|
||||
/*
|
||||
Compute IDCT of single row, storing as column.
|
||||
r0 = source
|
||||
r1 = dest
|
||||
*/
|
||||
function idct_row_armv6
|
||||
push {lr}
|
||||
|
||||
ldr lr, [r0, #12] /* lr = row[7,5] */
|
||||
ldr ip, [r0, #4] /* ip = row[6,4] */
|
||||
ldr r3, [r0, #8] /* r3 = row[3,1] */
|
||||
ldr r2, [r0] /* r2 = row[2,0] */
|
||||
orrs lr, lr, ip
|
||||
itt eq
|
||||
cmpeq lr, r3
|
||||
cmpeq lr, r2, lsr #16
|
||||
beq 1f
|
||||
push {r1}
|
||||
ldr ip, =W42 /* ip = W4 | (W2 << 16) */
|
||||
cmp lr, #0
|
||||
beq 2f
|
||||
|
||||
idct_row ROW_SHIFT
|
||||
b 3f
|
||||
|
||||
2: idct_row4 ROW_SHIFT
|
||||
|
||||
3: pop {r1}
|
||||
idct_finish_shift ROW_SHIFT
|
||||
|
||||
strh r4, [r1]
|
||||
strh r5, [r1, #(16*2)]
|
||||
strh r6, [r1, #(16*4)]
|
||||
strh r7, [r1, #(16*6)]
|
||||
strh r11,[r1, #(16*1)]
|
||||
strh r10,[r1, #(16*3)]
|
||||
strh r9, [r1, #(16*5)]
|
||||
strh r8, [r1, #(16*7)]
|
||||
|
||||
pop {pc}
|
||||
|
||||
1: mov r2, r2, lsl #3
|
||||
strh r2, [r1]
|
||||
strh r2, [r1, #(16*2)]
|
||||
strh r2, [r1, #(16*4)]
|
||||
strh r2, [r1, #(16*6)]
|
||||
strh r2, [r1, #(16*1)]
|
||||
strh r2, [r1, #(16*3)]
|
||||
strh r2, [r1, #(16*5)]
|
||||
strh r2, [r1, #(16*7)]
|
||||
pop {pc}
|
||||
endfunc
|
||||
|
||||
/*
|
||||
Compute IDCT of single column, read as row.
|
||||
r0 = source
|
||||
r1 = dest
|
||||
*/
|
||||
function idct_col_armv6
|
||||
push {r1, lr}
|
||||
|
||||
ldr r2, [r0] /* r2 = row[2,0] */
|
||||
ldr ip, =W42 /* ip = W4 | (W2 << 16) */
|
||||
ldr r3, [r0, #8] /* r3 = row[3,1] */
|
||||
idct_row COL_SHIFT
|
||||
pop {r1}
|
||||
idct_finish_shift COL_SHIFT
|
||||
|
||||
strh r4, [r1]
|
||||
strh r5, [r1, #(16*1)]
|
||||
strh r6, [r1, #(16*2)]
|
||||
strh r7, [r1, #(16*3)]
|
||||
strh r11,[r1, #(16*4)]
|
||||
strh r10,[r1, #(16*5)]
|
||||
strh r9, [r1, #(16*6)]
|
||||
strh r8, [r1, #(16*7)]
|
||||
|
||||
pop {pc}
|
||||
endfunc
|
||||
|
||||
/*
|
||||
Compute IDCT of single column, read as row, store saturated 8-bit.
|
||||
r0 = source
|
||||
r1 = dest
|
||||
r2 = line size
|
||||
*/
|
||||
function idct_col_put_armv6
|
||||
push {r1, r2, lr}
|
||||
|
||||
ldr r2, [r0] /* r2 = row[2,0] */
|
||||
ldr ip, =W42 /* ip = W4 | (W2 << 16) */
|
||||
ldr r3, [r0, #8] /* r3 = row[3,1] */
|
||||
idct_row COL_SHIFT
|
||||
pop {r1, r2}
|
||||
idct_finish_shift_sat COL_SHIFT
|
||||
|
||||
strb_post r4, r1, r2
|
||||
strb_post r5, r1, r2
|
||||
strb_post r6, r1, r2
|
||||
strb_post r7, r1, r2
|
||||
strb_post r11,r1, r2
|
||||
strb_post r10,r1, r2
|
||||
strb_post r9, r1, r2
|
||||
strb_post r8, r1, r2
|
||||
|
||||
sub r1, r1, r2, lsl #3
|
||||
|
||||
pop {pc}
|
||||
endfunc
|
||||
|
||||
/*
|
||||
Compute IDCT of single column, read as row, add/store saturated 8-bit.
|
||||
r0 = source
|
||||
r1 = dest
|
||||
r2 = line size
|
||||
*/
|
||||
function idct_col_add_armv6
|
||||
push {r1, r2, lr}
|
||||
|
||||
ldr r2, [r0] /* r2 = row[2,0] */
|
||||
ldr ip, =W42 /* ip = W4 | (W2 << 16) */
|
||||
ldr r3, [r0, #8] /* r3 = row[3,1] */
|
||||
idct_row COL_SHIFT
|
||||
pop {r1, r2}
|
||||
idct_finish
|
||||
|
||||
ldrb r3, [r1]
|
||||
ldrb r7, [r1, r2]
|
||||
ldrb r11,[r1, r2, lsl #2]
|
||||
add ip, r3, ip, asr #COL_SHIFT
|
||||
usat ip, #8, ip
|
||||
add r4, r7, r4, asr #COL_SHIFT
|
||||
strb_post ip, r1, r2
|
||||
ldrb ip, [r1, r2]
|
||||
usat r4, #8, r4
|
||||
ldrb r11,[r1, r2, lsl #2]
|
||||
add r5, ip, r5, asr #COL_SHIFT
|
||||
usat r5, #8, r5
|
||||
strb_post r4, r1, r2
|
||||
ldrb r3, [r1, r2]
|
||||
ldrb ip, [r1, r2, lsl #2]
|
||||
strb_post r5, r1, r2
|
||||
ldrb r7, [r1, r2]
|
||||
ldrb r4, [r1, r2, lsl #2]
|
||||
add r6, r3, r6, asr #COL_SHIFT
|
||||
usat r6, #8, r6
|
||||
add r10,r7, r10,asr #COL_SHIFT
|
||||
usat r10,#8, r10
|
||||
add r9, r11,r9, asr #COL_SHIFT
|
||||
usat r9, #8, r9
|
||||
add r8, ip, r8, asr #COL_SHIFT
|
||||
usat r8, #8, r8
|
||||
add lr, r4, lr, asr #COL_SHIFT
|
||||
usat lr, #8, lr
|
||||
strb_post r6, r1, r2
|
||||
strb_post r10,r1, r2
|
||||
strb_post r9, r1, r2
|
||||
strb_post r8, r1, r2
|
||||
strb_post lr, r1, r2
|
||||
|
||||
sub r1, r1, r2, lsl #3
|
||||
|
||||
pop {pc}
|
||||
endfunc
|
||||
|
||||
/*
|
||||
Compute 8 IDCT row transforms.
|
||||
func = IDCT row->col function
|
||||
width = width of columns in bytes
|
||||
*/
|
||||
.macro idct_rows func width
|
||||
bl \func
|
||||
add r0, r0, #(16*2)
|
||||
add r1, r1, #\width
|
||||
bl \func
|
||||
add r0, r0, #(16*2)
|
||||
add r1, r1, #\width
|
||||
bl \func
|
||||
add r0, r0, #(16*2)
|
||||
add r1, r1, #\width
|
||||
bl \func
|
||||
sub r0, r0, #(16*5)
|
||||
add r1, r1, #\width
|
||||
bl \func
|
||||
add r0, r0, #(16*2)
|
||||
add r1, r1, #\width
|
||||
bl \func
|
||||
add r0, r0, #(16*2)
|
||||
add r1, r1, #\width
|
||||
bl \func
|
||||
add r0, r0, #(16*2)
|
||||
add r1, r1, #\width
|
||||
bl \func
|
||||
|
||||
sub r0, r0, #(16*7)
|
||||
.endm
|
||||
|
||||
/* void ff_simple_idct_armv6(int16_t *data); */
|
||||
function ff_simple_idct_armv6, export=1
|
||||
push {r4-r11, lr}
|
||||
sub sp, sp, #128
|
||||
|
||||
mov r1, sp
|
||||
idct_rows idct_row_armv6, 2
|
||||
mov r1, r0
|
||||
mov r0, sp
|
||||
idct_rows idct_col_armv6, 2
|
||||
|
||||
add sp, sp, #128
|
||||
pop {r4-r11, pc}
|
||||
endfunc
|
||||
|
||||
/* ff_simple_idct_add_armv6(uint8_t *dest, ptrdiff_t line_size, int16_t *data); */
|
||||
function ff_simple_idct_add_armv6, export=1
|
||||
push {r0, r1, r4-r11, lr}
|
||||
sub sp, sp, #128
|
||||
|
||||
mov r0, r2
|
||||
mov r1, sp
|
||||
idct_rows idct_row_armv6, 2
|
||||
mov r0, sp
|
||||
ldr r1, [sp, #128]
|
||||
ldr r2, [sp, #(128+4)]
|
||||
idct_rows idct_col_add_armv6, 1
|
||||
|
||||
add sp, sp, #(128+8)
|
||||
pop {r4-r11, pc}
|
||||
endfunc
|
||||
|
||||
/* ff_simple_idct_put_armv6(uint8_t *dest, ptrdiff_t line_size, int16_t *data); */
|
||||
function ff_simple_idct_put_armv6, export=1
|
||||
push {r0, r1, r4-r11, lr}
|
||||
sub sp, sp, #128
|
||||
|
||||
mov r0, r2
|
||||
mov r1, sp
|
||||
idct_rows idct_row_armv6, 2
|
||||
mov r0, sp
|
||||
ldr r1, [sp, #128]
|
||||
ldr r2, [sp, #(128+4)]
|
||||
idct_rows idct_col_put_armv6, 1
|
||||
|
||||
add sp, sp, #(128+8)
|
||||
pop {r4-r11, pc}
|
||||
endfunc
|
|
@ -0,0 +1,375 @@
|
|||
/*
|
||||
* ARM NEON IDCT
|
||||
*
|
||||
* Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
|
||||
*
|
||||
* Based on Simple IDCT
|
||||
* Copyright (c) 2001 Michael Niedermayer <michaelni@gmx.at>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/arm/asm.S"
|
||||
|
||||
#define W1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
|
||||
#define W2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
|
||||
#define W3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
|
||||
#define W4 16383 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
|
||||
#define W5 12873 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
|
||||
#define W6 8867 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
|
||||
#define W7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
|
||||
#define W4c ((1<<(COL_SHIFT-1))/W4)
|
||||
#define ROW_SHIFT 11
|
||||
#define COL_SHIFT 20
|
||||
|
||||
#define w1 d0[0]
|
||||
#define w2 d0[1]
|
||||
#define w3 d0[2]
|
||||
#define w4 d0[3]
|
||||
#define w5 d1[0]
|
||||
#define w6 d1[1]
|
||||
#define w7 d1[2]
|
||||
#define w4c d1[3]
|
||||
|
||||
.macro idct_col4_top
|
||||
vmull.s16 q7, d6, w2 /* q9 = W2 * col[2] */
|
||||
vmull.s16 q8, d6, w6 /* q10 = W6 * col[2] */
|
||||
vmull.s16 q9, d4, w1 /* q9 = W1 * col[1] */
|
||||
vadd.i32 q11, q15, q7
|
||||
vmull.s16 q10, d4, w3 /* q10 = W3 * col[1] */
|
||||
vadd.i32 q12, q15, q8
|
||||
vmull.s16 q5, d4, w5 /* q5 = W5 * col[1] */
|
||||
vsub.i32 q13, q15, q8
|
||||
vmull.s16 q6, d4, w7 /* q6 = W7 * col[1] */
|
||||
vsub.i32 q14, q15, q7
|
||||
|
||||
vmlal.s16 q9, d8, w3 /* q9 += W3 * col[3] */
|
||||
vmlsl.s16 q10, d8, w7 /* q10 -= W7 * col[3] */
|
||||
vmlsl.s16 q5, d8, w1 /* q5 -= W1 * col[3] */
|
||||
vmlsl.s16 q6, d8, w5 /* q6 -= W5 * col[3] */
|
||||
.endm
|
||||
|
||||
.text
|
||||
.align 6
|
||||
|
||||
function idct_row4_pld_neon
|
||||
pld [r0]
|
||||
add r3, r0, r1, lsl #2
|
||||
pld [r0, r1]
|
||||
pld [r0, r1, lsl #1]
|
||||
A pld [r3, -r1]
|
||||
pld [r3]
|
||||
pld [r3, r1]
|
||||
add r3, r3, r1, lsl #1
|
||||
pld [r3]
|
||||
pld [r3, r1]
|
||||
endfunc
|
||||
|
||||
function idct_row4_neon
|
||||
vmov.i32 q15, #(1<<(ROW_SHIFT-1))
|
||||
vld1.64 {d2-d5}, [r2,:128]!
|
||||
vmlal.s16 q15, d2, w4 /* q15 += W4 * col[0] */
|
||||
vld1.64 {d6,d7}, [r2,:128]!
|
||||
vorr d10, d3, d5
|
||||
vld1.64 {d8,d9}, [r2,:128]!
|
||||
add r2, r2, #-64
|
||||
|
||||
vorr d11, d7, d9
|
||||
vorr d10, d10, d11
|
||||
vmov r3, r4, d10
|
||||
|
||||
idct_col4_top
|
||||
|
||||
orrs r3, r3, r4
|
||||
beq 1f
|
||||
|
||||
vmull.s16 q7, d3, w4 /* q7 = W4 * col[4] */
|
||||
vmlal.s16 q9, d5, w5 /* q9 += W5 * col[5] */
|
||||
vmlsl.s16 q10, d5, w1 /* q10 -= W1 * col[5] */
|
||||
vmull.s16 q8, d7, w2 /* q8 = W2 * col[6] */
|
||||
vmlal.s16 q5, d5, w7 /* q5 += W7 * col[5] */
|
||||
vadd.i32 q11, q11, q7
|
||||
vsub.i32 q12, q12, q7
|
||||
vsub.i32 q13, q13, q7
|
||||
vadd.i32 q14, q14, q7
|
||||
vmlal.s16 q6, d5, w3 /* q6 += W3 * col[5] */
|
||||
vmull.s16 q7, d7, w6 /* q7 = W6 * col[6] */
|
||||
vmlal.s16 q9, d9, w7
|
||||
vmlsl.s16 q10, d9, w5
|
||||
vmlal.s16 q5, d9, w3
|
||||
vmlsl.s16 q6, d9, w1
|
||||
vadd.i32 q11, q11, q7
|
||||
vsub.i32 q12, q12, q8
|
||||
vadd.i32 q13, q13, q8
|
||||
vsub.i32 q14, q14, q7
|
||||
|
||||
1: vadd.i32 q3, q11, q9
|
||||
vadd.i32 q4, q12, q10
|
||||
vshrn.i32 d2, q3, #ROW_SHIFT
|
||||
vshrn.i32 d4, q4, #ROW_SHIFT
|
||||
vadd.i32 q7, q13, q5
|
||||
vadd.i32 q8, q14, q6
|
||||
vtrn.16 d2, d4
|
||||
vshrn.i32 d6, q7, #ROW_SHIFT
|
||||
vshrn.i32 d8, q8, #ROW_SHIFT
|
||||
vsub.i32 q14, q14, q6
|
||||
vsub.i32 q11, q11, q9
|
||||
vtrn.16 d6, d8
|
||||
vsub.i32 q13, q13, q5
|
||||
vshrn.i32 d3, q14, #ROW_SHIFT
|
||||
vtrn.32 d2, d6
|
||||
vsub.i32 q12, q12, q10
|
||||
vtrn.32 d4, d8
|
||||
vshrn.i32 d5, q13, #ROW_SHIFT
|
||||
vshrn.i32 d7, q12, #ROW_SHIFT
|
||||
vshrn.i32 d9, q11, #ROW_SHIFT
|
||||
|
||||
vtrn.16 d3, d5
|
||||
vtrn.16 d7, d9
|
||||
vtrn.32 d3, d7
|
||||
vtrn.32 d5, d9
|
||||
|
||||
vst1.64 {d2-d5}, [r2,:128]!
|
||||
vst1.64 {d6-d9}, [r2,:128]!
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
function idct_col4_neon
|
||||
mov ip, #16
|
||||
vld1.64 {d2}, [r2,:64], ip /* d2 = col[0] */
|
||||
vdup.16 d30, w4c
|
||||
vld1.64 {d4}, [r2,:64], ip /* d3 = col[1] */
|
||||
vadd.i16 d30, d30, d2
|
||||
vld1.64 {d6}, [r2,:64], ip /* d4 = col[2] */
|
||||
vmull.s16 q15, d30, w4 /* q15 = W4*(col[0]+(1<<COL_SHIFT-1)/W4)*/
|
||||
vld1.64 {d8}, [r2,:64], ip /* d5 = col[3] */
|
||||
|
||||
ldrd r4, r5, [r2]
|
||||
ldrd r6, r7, [r2, #16]
|
||||
orrs r4, r4, r5
|
||||
|
||||
idct_col4_top
|
||||
it eq
|
||||
addeq r2, r2, #16
|
||||
beq 1f
|
||||
|
||||
vld1.64 {d3}, [r2,:64], ip /* d6 = col[4] */
|
||||
vmull.s16 q7, d3, w4 /* q7 = W4 * col[4] */
|
||||
vadd.i32 q11, q11, q7
|
||||
vsub.i32 q12, q12, q7
|
||||
vsub.i32 q13, q13, q7
|
||||
vadd.i32 q14, q14, q7
|
||||
|
||||
1: orrs r6, r6, r7
|
||||
ldrd r4, r5, [r2, #16]
|
||||
it eq
|
||||
addeq r2, r2, #16
|
||||
beq 2f
|
||||
|
||||
vld1.64 {d5}, [r2,:64], ip /* d7 = col[5] */
|
||||
vmlal.s16 q9, d5, w5 /* q9 += W5 * col[5] */
|
||||
vmlsl.s16 q10, d5, w1 /* q10 -= W1 * col[5] */
|
||||
vmlal.s16 q5, d5, w7 /* q5 += W7 * col[5] */
|
||||
vmlal.s16 q6, d5, w3 /* q6 += W3 * col[5] */
|
||||
|
||||
2: orrs r4, r4, r5
|
||||
ldrd r4, r5, [r2, #16]
|
||||
it eq
|
||||
addeq r2, r2, #16
|
||||
beq 3f
|
||||
|
||||
vld1.64 {d7}, [r2,:64], ip /* d8 = col[6] */
|
||||
vmull.s16 q7, d7, w6 /* q7 = W6 * col[6] */
|
||||
vmull.s16 q8, d7, w2 /* q8 = W2 * col[6] */
|
||||
vadd.i32 q11, q11, q7
|
||||
vsub.i32 q14, q14, q7
|
||||
vsub.i32 q12, q12, q8
|
||||
vadd.i32 q13, q13, q8
|
||||
|
||||
3: orrs r4, r4, r5
|
||||
it eq
|
||||
addeq r2, r2, #16
|
||||
beq 4f
|
||||
|
||||
vld1.64 {d9}, [r2,:64], ip /* d9 = col[7] */
|
||||
vmlal.s16 q9, d9, w7
|
||||
vmlsl.s16 q10, d9, w5
|
||||
vmlal.s16 q5, d9, w3
|
||||
vmlsl.s16 q6, d9, w1
|
||||
|
||||
4: vaddhn.i32 d2, q11, q9
|
||||
vaddhn.i32 d3, q12, q10
|
||||
vaddhn.i32 d4, q13, q5
|
||||
vaddhn.i32 d5, q14, q6
|
||||
vsubhn.i32 d9, q11, q9
|
||||
vsubhn.i32 d8, q12, q10
|
||||
vsubhn.i32 d7, q13, q5
|
||||
vsubhn.i32 d6, q14, q6
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
.align 6
|
||||
|
||||
function idct_col4_st8_neon
|
||||
vqshrun.s16 d2, q1, #COL_SHIFT-16
|
||||
vqshrun.s16 d3, q2, #COL_SHIFT-16
|
||||
vqshrun.s16 d4, q3, #COL_SHIFT-16
|
||||
vqshrun.s16 d5, q4, #COL_SHIFT-16
|
||||
vst1.32 {d2[0]}, [r0,:32], r1
|
||||
vst1.32 {d2[1]}, [r0,:32], r1
|
||||
vst1.32 {d3[0]}, [r0,:32], r1
|
||||
vst1.32 {d3[1]}, [r0,:32], r1
|
||||
vst1.32 {d4[0]}, [r0,:32], r1
|
||||
vst1.32 {d4[1]}, [r0,:32], r1
|
||||
vst1.32 {d5[0]}, [r0,:32], r1
|
||||
vst1.32 {d5[1]}, [r0,:32], r1
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
const idct_coeff_neon, align=4
|
||||
.short W1, W2, W3, W4, W5, W6, W7, W4c
|
||||
endconst
|
||||
|
||||
.macro idct_start data
|
||||
push {r4-r7, lr}
|
||||
pld [\data]
|
||||
pld [\data, #64]
|
||||
vpush {d8-d15}
|
||||
movrel r3, idct_coeff_neon
|
||||
vld1.64 {d0,d1}, [r3,:128]
|
||||
.endm
|
||||
|
||||
.macro idct_end
|
||||
vpop {d8-d15}
|
||||
pop {r4-r7, pc}
|
||||
.endm
|
||||
|
||||
/* void ff_simple_idct_put_neon(uint8_t *dst, ptrdiff_t line_size, int16_t *data); */
|
||||
function ff_simple_idct_put_neon, export=1
|
||||
idct_start r2
|
||||
|
||||
bl idct_row4_pld_neon
|
||||
bl idct_row4_neon
|
||||
add r2, r2, #-128
|
||||
bl idct_col4_neon
|
||||
bl idct_col4_st8_neon
|
||||
sub r0, r0, r1, lsl #3
|
||||
add r0, r0, #4
|
||||
add r2, r2, #-120
|
||||
bl idct_col4_neon
|
||||
bl idct_col4_st8_neon
|
||||
|
||||
idct_end
|
||||
endfunc
|
||||
|
||||
.align 6
|
||||
|
||||
function idct_col4_add8_neon
|
||||
mov ip, r0
|
||||
|
||||
vld1.32 {d10[0]}, [r0,:32], r1
|
||||
vshr.s16 q1, q1, #COL_SHIFT-16
|
||||
vld1.32 {d10[1]}, [r0,:32], r1
|
||||
vshr.s16 q2, q2, #COL_SHIFT-16
|
||||
vld1.32 {d11[0]}, [r0,:32], r1
|
||||
vshr.s16 q3, q3, #COL_SHIFT-16
|
||||
vld1.32 {d11[1]}, [r0,:32], r1
|
||||
vshr.s16 q4, q4, #COL_SHIFT-16
|
||||
vld1.32 {d12[0]}, [r0,:32], r1
|
||||
vaddw.u8 q1, q1, d10
|
||||
vld1.32 {d12[1]}, [r0,:32], r1
|
||||
vaddw.u8 q2, q2, d11
|
||||
vld1.32 {d13[0]}, [r0,:32], r1
|
||||
vqmovun.s16 d2, q1
|
||||
vld1.32 {d13[1]}, [r0,:32], r1
|
||||
vaddw.u8 q3, q3, d12
|
||||
vst1.32 {d2[0]}, [ip,:32], r1
|
||||
vqmovun.s16 d3, q2
|
||||
vst1.32 {d2[1]}, [ip,:32], r1
|
||||
vaddw.u8 q4, q4, d13
|
||||
vst1.32 {d3[0]}, [ip,:32], r1
|
||||
vqmovun.s16 d4, q3
|
||||
vst1.32 {d3[1]}, [ip,:32], r1
|
||||
vqmovun.s16 d5, q4
|
||||
vst1.32 {d4[0]}, [ip,:32], r1
|
||||
vst1.32 {d4[1]}, [ip,:32], r1
|
||||
vst1.32 {d5[0]}, [ip,:32], r1
|
||||
vst1.32 {d5[1]}, [ip,:32], r1
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
/* void ff_simple_idct_add_neon(uint8_t *dst, ptrdiff_t line_size, int16_t *data); */
|
||||
function ff_simple_idct_add_neon, export=1
|
||||
idct_start r2
|
||||
|
||||
bl idct_row4_pld_neon
|
||||
bl idct_row4_neon
|
||||
add r2, r2, #-128
|
||||
bl idct_col4_neon
|
||||
bl idct_col4_add8_neon
|
||||
sub r0, r0, r1, lsl #3
|
||||
add r0, r0, #4
|
||||
add r2, r2, #-120
|
||||
bl idct_col4_neon
|
||||
bl idct_col4_add8_neon
|
||||
|
||||
idct_end
|
||||
endfunc
|
||||
|
||||
.align 6
|
||||
|
||||
function idct_col4_st16_neon
|
||||
mov ip, #16
|
||||
|
||||
vshr.s16 q1, q1, #COL_SHIFT-16
|
||||
vshr.s16 q2, q2, #COL_SHIFT-16
|
||||
vst1.64 {d2}, [r2,:64], ip
|
||||
vshr.s16 q3, q3, #COL_SHIFT-16
|
||||
vst1.64 {d3}, [r2,:64], ip
|
||||
vshr.s16 q4, q4, #COL_SHIFT-16
|
||||
vst1.64 {d4}, [r2,:64], ip
|
||||
vst1.64 {d5}, [r2,:64], ip
|
||||
vst1.64 {d6}, [r2,:64], ip
|
||||
vst1.64 {d7}, [r2,:64], ip
|
||||
vst1.64 {d8}, [r2,:64], ip
|
||||
vst1.64 {d9}, [r2,:64], ip
|
||||
|
||||
bx lr
|
||||
endfunc
|
||||
|
||||
/* void ff_simple_idct_neon(int16_t *data); */
|
||||
function ff_simple_idct_neon, export=1
|
||||
idct_start r0
|
||||
|
||||
mov r2, r0
|
||||
bl idct_row4_neon
|
||||
bl idct_row4_neon
|
||||
add r2, r2, #-128
|
||||
bl idct_col4_neon
|
||||
add r2, r2, #-128
|
||||
bl idct_col4_st16_neon
|
||||
add r2, r2, #-120
|
||||
bl idct_col4_neon
|
||||
add r2, r2, #-128
|
||||
bl idct_col4_st16_neon
|
||||
|
||||
idct_end
|
||||
endfunc
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* Copyright (c) 2014 Michael Niedermayer <michaelni@gmx.at>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "idctdsp.h"
|
||||
#include "fdctdsp.h"
|
||||
#include "pixblockdsp.h"
|
||||
#include "avdct.h"
|
||||
|
||||
#define OFFSET(x) offsetof(AVDCT,x)
|
||||
#define DEFAULT 0 //should be NAN but it does not work as it is not a constant in glibc as required by ANSI/ISO C
|
||||
//these names are too long to be readable
|
||||
#define V AV_OPT_FLAG_VIDEO_PARAM
|
||||
#define A AV_OPT_FLAG_AUDIO_PARAM
|
||||
#define E AV_OPT_FLAG_ENCODING_PARAM
|
||||
#define D AV_OPT_FLAG_DECODING_PARAM
|
||||
|
||||
static const AVOption avdct_options[] = {
|
||||
{"dct", "DCT algorithm", OFFSET(dct_algo), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, V|E, "dct"},
|
||||
{"auto", "autoselect a good one", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_AUTO }, INT_MIN, INT_MAX, V|E, "dct"},
|
||||
{"fastint", "fast integer (experimental / for debugging)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_FASTINT }, INT_MIN, INT_MAX, V|E, "dct"},
|
||||
{"int", "accurate integer", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_INT }, INT_MIN, INT_MAX, V|E, "dct"},
|
||||
{"mmx", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_MMX }, INT_MIN, INT_MAX, V|E, "dct"},
|
||||
{"altivec", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_ALTIVEC }, INT_MIN, INT_MAX, V|E, "dct"},
|
||||
{"faan", "floating point AAN DCT (experimental / for debugging)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_FAAN }, INT_MIN, INT_MAX, V|E, "dct"},
|
||||
|
||||
{"idct", "select IDCT implementation", OFFSET(idct_algo), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, V|E|D, "idct"},
|
||||
{"auto", "autoselect a good one", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_AUTO }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"int", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_INT }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"simple", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLE }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"simplemmx", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEMMX }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"arm", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_ARM }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"altivec", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_ALTIVEC }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"simplearm", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARM }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"simplearmv5te", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARMV5TE }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"simplearmv6", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARMV6 }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"simpleneon", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLENEON }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"xvid", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_XVID }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"xvidmmx", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_XVID }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
{"faani", "floating point AAN IDCT (experimental / for debugging)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_FAAN }, INT_MIN, INT_MAX, V|D|E, "idct"},
|
||||
{"simpleauto", "experimental / for debugging", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEAUTO }, INT_MIN, INT_MAX, V|E|D, "idct"},
|
||||
|
||||
{"bits_per_sample", "", OFFSET(bits_per_sample), AV_OPT_TYPE_INT, {.i64 = 8 }, 0, 14, 0,},
|
||||
{NULL},
|
||||
};
|
||||
|
||||
static const AVClass avdct_class = {
|
||||
.class_name = "AVDCT",
|
||||
.option = avdct_options,
|
||||
.version = LIBAVUTIL_VERSION_INT,
|
||||
};
|
||||
|
||||
const AVClass *avcodec_dct_get_class(void)
|
||||
{
|
||||
return &avdct_class;
|
||||
}
|
||||
|
||||
AVDCT *avcodec_dct_alloc(void)
|
||||
{
|
||||
AVDCT *dsp = av_mallocz(sizeof(AVDCT));
|
||||
|
||||
if (!dsp)
|
||||
return NULL;
|
||||
|
||||
dsp->av_class = &avdct_class;
|
||||
av_opt_set_defaults(dsp);
|
||||
|
||||
return dsp;
|
||||
}
|
||||
|
||||
int avcodec_dct_init(AVDCT *dsp)
|
||||
{
|
||||
AVCodecContext *avctx = avcodec_alloc_context3(NULL);
|
||||
|
||||
if (!avctx)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
avctx->idct_algo = dsp->idct_algo;
|
||||
avctx->dct_algo = dsp->dct_algo;
|
||||
avctx->bits_per_raw_sample = dsp->bits_per_sample;
|
||||
|
||||
#define COPY(src, name) memcpy(&dsp->name, &src.name, sizeof(dsp->name))
|
||||
|
||||
#if CONFIG_IDCTDSP
|
||||
{
|
||||
IDCTDSPContext idsp;
|
||||
ff_idctdsp_init(&idsp, avctx);
|
||||
COPY(idsp, idct);
|
||||
COPY(idsp, idct_permutation);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_FDCTDSP
|
||||
{
|
||||
FDCTDSPContext fdsp;
|
||||
ff_fdctdsp_init(&fdsp, avctx);
|
||||
COPY(fdsp, fdct);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_PIXBLOCKDSP
|
||||
{
|
||||
PixblockDSPContext pdsp;
|
||||
ff_pixblockdsp_init(&pdsp, avctx);
|
||||
COPY(pdsp, get_pixels);
|
||||
}
|
||||
#endif
|
||||
|
||||
avcodec_free_context(&avctx);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_AVDCT_H
|
||||
#define AVCODEC_AVDCT_H
|
||||
|
||||
#include "libavutil/opt.h"
|
||||
|
||||
/**
|
||||
* AVDCT context.
|
||||
* @note function pointers can be NULL if the specific features have been
|
||||
* disabled at build time.
|
||||
*/
|
||||
typedef struct AVDCT {
|
||||
const AVClass *av_class;
|
||||
|
||||
void (*idct)(int16_t *block /* align 16 */);
|
||||
|
||||
/**
|
||||
* IDCT input permutation.
|
||||
* Several optimized IDCTs need a permutated input (relative to the
|
||||
* normal order of the reference IDCT).
|
||||
* This permutation must be performed before the idct_put/add.
|
||||
* Note, normally this can be merged with the zigzag/alternate scan<br>
|
||||
* An example to avoid confusion:
|
||||
* - (->decode coeffs -> zigzag reorder -> dequant -> reference IDCT -> ...)
|
||||
* - (x -> reference DCT -> reference IDCT -> x)
|
||||
* - (x -> reference DCT -> simple_mmx_perm = idct_permutation
|
||||
* -> simple_idct_mmx -> x)
|
||||
* - (-> decode coeffs -> zigzag reorder -> simple_mmx_perm -> dequant
|
||||
* -> simple_idct_mmx -> ...)
|
||||
*/
|
||||
uint8_t idct_permutation[64];
|
||||
|
||||
void (*fdct)(int16_t *block /* align 16 */);
|
||||
|
||||
|
||||
/**
|
||||
* DCT algorithm.
|
||||
* must use AVOptions to set this field.
|
||||
*/
|
||||
int dct_algo;
|
||||
|
||||
/**
|
||||
* IDCT algorithm.
|
||||
* must use AVOptions to set this field.
|
||||
*/
|
||||
int idct_algo;
|
||||
|
||||
void (*get_pixels)(int16_t *block /* align 16 */,
|
||||
const uint8_t *pixels /* align 8 */,
|
||||
ptrdiff_t line_size);
|
||||
|
||||
int bits_per_sample;
|
||||
} AVDCT;
|
||||
|
||||
/**
|
||||
* Allocates a AVDCT context.
|
||||
* This needs to be initialized with avcodec_dct_init() after optionally
|
||||
* configuring it with AVOptions.
|
||||
*
|
||||
* To free it use av_free()
|
||||
*/
|
||||
AVDCT *avcodec_dct_alloc(void);
|
||||
int avcodec_dct_init(AVDCT *);
|
||||
|
||||
const AVClass *avcodec_dct_get_class(void);
|
||||
|
||||
#endif /* AVCODEC_AVDCT_H */
|
|
@ -7,5 +7,8 @@ static const AVCodec * const codec_list[] = {
|
|||
#endif
|
||||
#if CONFIG_FLAC_DECODER
|
||||
&ff_flac_decoder,
|
||||
#endif
|
||||
#if CONFIG_MP3_DECODER
|
||||
&ff_mp3_decoder,
|
||||
#endif
|
||||
NULL };
|
||||
|
|
|
@ -0,0 +1,224 @@
|
|||
/*
|
||||
* (I)DCT Transforms
|
||||
* Copyright (c) 2009 Peter Ross <pross@xvid.org>
|
||||
* Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
|
||||
* Copyright (c) 2010 Vitor Sessak
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* (Inverse) Discrete Cosine Transforms. These are also known as the
|
||||
* type II and type III DCTs respectively.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "libavutil/mathematics.h"
|
||||
#include "dct.h"
|
||||
#include "dct32.h"
|
||||
|
||||
/* sin((M_PI * x / (2 * n)) */
|
||||
#define SIN(s, n, x) (s->costab[(n) - (x)])
|
||||
|
||||
/* cos((M_PI * x / (2 * n)) */
|
||||
#define COS(s, n, x) (s->costab[x])
|
||||
|
||||
static void dst_calc_I_c(DCTContext *ctx, FFTSample *data)
|
||||
{
|
||||
int n = 1 << ctx->nbits;
|
||||
int i;
|
||||
|
||||
data[0] = 0;
|
||||
for (i = 1; i < n / 2; i++) {
|
||||
float tmp1 = data[i ];
|
||||
float tmp2 = data[n - i];
|
||||
float s = SIN(ctx, n, 2 * i);
|
||||
|
||||
s *= tmp1 + tmp2;
|
||||
tmp1 = (tmp1 - tmp2) * 0.5f;
|
||||
data[i] = s + tmp1;
|
||||
data[n - i] = s - tmp1;
|
||||
}
|
||||
|
||||
data[n / 2] *= 2;
|
||||
ctx->rdft.rdft_calc(&ctx->rdft, data);
|
||||
|
||||
data[0] *= 0.5f;
|
||||
|
||||
for (i = 1; i < n - 2; i += 2) {
|
||||
data[i + 1] += data[i - 1];
|
||||
data[i] = -data[i + 2];
|
||||
}
|
||||
|
||||
data[n - 1] = 0;
|
||||
}
|
||||
|
||||
static void dct_calc_I_c(DCTContext *ctx, FFTSample *data)
|
||||
{
|
||||
int n = 1 << ctx->nbits;
|
||||
int i;
|
||||
float next = -0.5f * (data[0] - data[n]);
|
||||
|
||||
for (i = 0; i < n / 2; i++) {
|
||||
float tmp1 = data[i];
|
||||
float tmp2 = data[n - i];
|
||||
float s = SIN(ctx, n, 2 * i);
|
||||
float c = COS(ctx, n, 2 * i);
|
||||
|
||||
c *= tmp1 - tmp2;
|
||||
s *= tmp1 - tmp2;
|
||||
|
||||
next += c;
|
||||
|
||||
tmp1 = (tmp1 + tmp2) * 0.5f;
|
||||
data[i] = tmp1 - s;
|
||||
data[n - i] = tmp1 + s;
|
||||
}
|
||||
|
||||
ctx->rdft.rdft_calc(&ctx->rdft, data);
|
||||
data[n] = data[1];
|
||||
data[1] = next;
|
||||
|
||||
for (i = 3; i <= n; i += 2)
|
||||
data[i] = data[i - 2] - data[i];
|
||||
}
|
||||
|
||||
static void dct_calc_III_c(DCTContext *ctx, FFTSample *data)
|
||||
{
|
||||
int n = 1 << ctx->nbits;
|
||||
int i;
|
||||
|
||||
float next = data[n - 1];
|
||||
float inv_n = 1.0f / n;
|
||||
|
||||
for (i = n - 2; i >= 2; i -= 2) {
|
||||
float val1 = data[i];
|
||||
float val2 = data[i - 1] - data[i + 1];
|
||||
float c = COS(ctx, n, i);
|
||||
float s = SIN(ctx, n, i);
|
||||
|
||||
data[i] = c * val1 + s * val2;
|
||||
data[i + 1] = s * val1 - c * val2;
|
||||
}
|
||||
|
||||
data[1] = 2 * next;
|
||||
|
||||
ctx->rdft.rdft_calc(&ctx->rdft, data);
|
||||
|
||||
for (i = 0; i < n / 2; i++) {
|
||||
float tmp1 = data[i] * inv_n;
|
||||
float tmp2 = data[n - i - 1] * inv_n;
|
||||
float csc = ctx->csc2[i] * (tmp1 - tmp2);
|
||||
|
||||
tmp1 += tmp2;
|
||||
data[i] = tmp1 + csc;
|
||||
data[n - i - 1] = tmp1 - csc;
|
||||
}
|
||||
}
|
||||
|
||||
static void dct_calc_II_c(DCTContext *ctx, FFTSample *data)
|
||||
{
|
||||
int n = 1 << ctx->nbits;
|
||||
int i;
|
||||
float next;
|
||||
|
||||
for (i = 0; i < n / 2; i++) {
|
||||
float tmp1 = data[i];
|
||||
float tmp2 = data[n - i - 1];
|
||||
float s = SIN(ctx, n, 2 * i + 1);
|
||||
|
||||
s *= tmp1 - tmp2;
|
||||
tmp1 = (tmp1 + tmp2) * 0.5f;
|
||||
|
||||
data[i] = tmp1 + s;
|
||||
data[n-i-1] = tmp1 - s;
|
||||
}
|
||||
|
||||
ctx->rdft.rdft_calc(&ctx->rdft, data);
|
||||
|
||||
next = data[1] * 0.5;
|
||||
data[1] *= -1;
|
||||
|
||||
for (i = n - 2; i >= 0; i -= 2) {
|
||||
float inr = data[i ];
|
||||
float ini = data[i + 1];
|
||||
float c = COS(ctx, n, i);
|
||||
float s = SIN(ctx, n, i);
|
||||
|
||||
data[i] = c * inr + s * ini;
|
||||
data[i + 1] = next;
|
||||
|
||||
next += s * inr - c * ini;
|
||||
}
|
||||
}
|
||||
|
||||
static void dct32_func(DCTContext *ctx, FFTSample *data)
|
||||
{
|
||||
ctx->dct32(data, data);
|
||||
}
|
||||
|
||||
av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType inverse)
|
||||
{
|
||||
int n = 1 << nbits;
|
||||
int i;
|
||||
|
||||
memset(s, 0, sizeof(*s));
|
||||
|
||||
s->nbits = nbits;
|
||||
s->inverse = inverse;
|
||||
|
||||
if (inverse == DCT_II && nbits == 5) {
|
||||
s->dct_calc = dct32_func;
|
||||
} else {
|
||||
ff_init_ff_cos_tabs(nbits + 2);
|
||||
|
||||
s->costab = ff_cos_tabs[nbits + 2];
|
||||
s->csc2 = av_malloc_array(n / 2, sizeof(FFTSample));
|
||||
if (!s->csc2)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if (ff_rdft_init(&s->rdft, nbits, inverse == DCT_III) < 0) {
|
||||
av_freep(&s->csc2);
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < n / 2; i++)
|
||||
s->csc2[i] = 0.5 / sin((M_PI / (2 * n) * (2 * i + 1)));
|
||||
|
||||
switch (inverse) {
|
||||
case DCT_I : s->dct_calc = dct_calc_I_c; break;
|
||||
case DCT_II : s->dct_calc = dct_calc_II_c; break;
|
||||
case DCT_III: s->dct_calc = dct_calc_III_c; break;
|
||||
case DST_I : s->dct_calc = dst_calc_I_c; break;
|
||||
}
|
||||
}
|
||||
|
||||
s->dct32 = ff_dct32_float;
|
||||
if (ARCH_X86)
|
||||
ff_dct_init_x86(s);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
av_cold void ff_dct_end(DCTContext *s)
|
||||
{
|
||||
ff_rdft_end(&s->rdft);
|
||||
av_freep(&s->csc2);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_DCT32_H
|
||||
#define AVCODEC_DCT32_H
|
||||
|
||||
void ff_dct32_float(float *dst, const float *src);
|
||||
void ff_dct32_fixed(int *dst, const int *src);
|
||||
|
||||
#endif /* AVCODEC_DCT32_H */
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#define DCT32_FLOAT 0
|
||||
#include "dct32_template.c"
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#define DCT32_FLOAT 1
|
||||
#include "dct32_template.c"
|
|
@ -0,0 +1,288 @@
|
|||
/*
|
||||
* Template for the Discrete Cosine Transform for 32 samples
|
||||
* Copyright (c) 2001, 2002 Fabrice Bellard
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "dct32.h"
|
||||
#include "mathops.h"
|
||||
#include "libavutil/internal.h"
|
||||
|
||||
#ifdef CHECKED
|
||||
#define SUINT int
|
||||
#define SUINT32 int32_t
|
||||
#else
|
||||
#define SUINT unsigned
|
||||
#define SUINT32 uint32_t
|
||||
#endif
|
||||
|
||||
#if DCT32_FLOAT
|
||||
# define dct32 ff_dct32_float
|
||||
# define FIXHR(x) ((float)(x))
|
||||
# define MULH3(x, y, s) ((s)*(y)*(x))
|
||||
# define INTFLOAT float
|
||||
# define SUINTFLOAT float
|
||||
#else
|
||||
# define dct32 ff_dct32_fixed
|
||||
# define FIXHR(a) ((int)((a) * (1LL<<32) + 0.5))
|
||||
# define MULH3(x, y, s) MULH((s)*(x), y)
|
||||
# define INTFLOAT int
|
||||
# define SUINTFLOAT SUINT
|
||||
#endif
|
||||
|
||||
|
||||
/* tab[i][j] = 1.0 / (2.0 * cos(pi*(2*k+1) / 2^(6 - j))) */
|
||||
|
||||
/* cos(i*pi/64) */
|
||||
|
||||
#define COS0_0 FIXHR(0.50060299823519630134/2)
|
||||
#define COS0_1 FIXHR(0.50547095989754365998/2)
|
||||
#define COS0_2 FIXHR(0.51544730992262454697/2)
|
||||
#define COS0_3 FIXHR(0.53104259108978417447/2)
|
||||
#define COS0_4 FIXHR(0.55310389603444452782/2)
|
||||
#define COS0_5 FIXHR(0.58293496820613387367/2)
|
||||
#define COS0_6 FIXHR(0.62250412303566481615/2)
|
||||
#define COS0_7 FIXHR(0.67480834145500574602/2)
|
||||
#define COS0_8 FIXHR(0.74453627100229844977/2)
|
||||
#define COS0_9 FIXHR(0.83934964541552703873/2)
|
||||
#define COS0_10 FIXHR(0.97256823786196069369/2)
|
||||
#define COS0_11 FIXHR(1.16943993343288495515/4)
|
||||
#define COS0_12 FIXHR(1.48416461631416627724/4)
|
||||
#define COS0_13 FIXHR(2.05778100995341155085/8)
|
||||
#define COS0_14 FIXHR(3.40760841846871878570/8)
|
||||
#define COS0_15 FIXHR(10.19000812354805681150/32)
|
||||
|
||||
#define COS1_0 FIXHR(0.50241928618815570551/2)
|
||||
#define COS1_1 FIXHR(0.52249861493968888062/2)
|
||||
#define COS1_2 FIXHR(0.56694403481635770368/2)
|
||||
#define COS1_3 FIXHR(0.64682178335999012954/2)
|
||||
#define COS1_4 FIXHR(0.78815462345125022473/2)
|
||||
#define COS1_5 FIXHR(1.06067768599034747134/4)
|
||||
#define COS1_6 FIXHR(1.72244709823833392782/4)
|
||||
#define COS1_7 FIXHR(5.10114861868916385802/16)
|
||||
|
||||
#define COS2_0 FIXHR(0.50979557910415916894/2)
|
||||
#define COS2_1 FIXHR(0.60134488693504528054/2)
|
||||
#define COS2_2 FIXHR(0.89997622313641570463/2)
|
||||
#define COS2_3 FIXHR(2.56291544774150617881/8)
|
||||
|
||||
#define COS3_0 FIXHR(0.54119610014619698439/2)
|
||||
#define COS3_1 FIXHR(1.30656296487637652785/4)
|
||||
|
||||
#define COS4_0 FIXHR(M_SQRT1_2/2)
|
||||
|
||||
/* butterfly operator */
|
||||
#define BF(a, b, c, s)\
|
||||
{\
|
||||
tmp0 = val##a + val##b;\
|
||||
tmp1 = val##a - val##b;\
|
||||
val##a = tmp0;\
|
||||
val##b = MULH3(tmp1, c, 1<<(s));\
|
||||
}
|
||||
|
||||
#define BF0(a, b, c, s)\
|
||||
{\
|
||||
tmp0 = tab[a] + tab[b];\
|
||||
tmp1 = tab[a] - tab[b];\
|
||||
val##a = tmp0;\
|
||||
val##b = MULH3(tmp1, c, 1<<(s));\
|
||||
}
|
||||
|
||||
#define BF1(a, b, c, d)\
|
||||
{\
|
||||
BF(a, b, COS4_0, 1);\
|
||||
BF(c, d,-COS4_0, 1);\
|
||||
val##c += val##d;\
|
||||
}
|
||||
|
||||
#define BF2(a, b, c, d)\
|
||||
{\
|
||||
BF(a, b, COS4_0, 1);\
|
||||
BF(c, d,-COS4_0, 1);\
|
||||
val##c += val##d;\
|
||||
val##a += val##c;\
|
||||
val##c += val##b;\
|
||||
val##b += val##d;\
|
||||
}
|
||||
|
||||
#define ADD(a, b) val##a += val##b
|
||||
|
||||
/* DCT32 without 1/sqrt(2) coef zero scaling. */
|
||||
void dct32(INTFLOAT *out, const INTFLOAT *tab_arg)
|
||||
{
|
||||
const SUINTFLOAT *tab = tab_arg;
|
||||
SUINTFLOAT tmp0, tmp1;
|
||||
|
||||
SUINTFLOAT val0 , val1 , val2 , val3 , val4 , val5 , val6 , val7 ,
|
||||
val8 , val9 , val10, val11, val12, val13, val14, val15,
|
||||
val16, val17, val18, val19, val20, val21, val22, val23,
|
||||
val24, val25, val26, val27, val28, val29, val30, val31;
|
||||
|
||||
/* pass 1 */
|
||||
BF0( 0, 31, COS0_0 , 1);
|
||||
BF0(15, 16, COS0_15, 5);
|
||||
/* pass 2 */
|
||||
BF( 0, 15, COS1_0 , 1);
|
||||
BF(16, 31,-COS1_0 , 1);
|
||||
/* pass 1 */
|
||||
BF0( 7, 24, COS0_7 , 1);
|
||||
BF0( 8, 23, COS0_8 , 1);
|
||||
/* pass 2 */
|
||||
BF( 7, 8, COS1_7 , 4);
|
||||
BF(23, 24,-COS1_7 , 4);
|
||||
/* pass 3 */
|
||||
BF( 0, 7, COS2_0 , 1);
|
||||
BF( 8, 15,-COS2_0 , 1);
|
||||
BF(16, 23, COS2_0 , 1);
|
||||
BF(24, 31,-COS2_0 , 1);
|
||||
/* pass 1 */
|
||||
BF0( 3, 28, COS0_3 , 1);
|
||||
BF0(12, 19, COS0_12, 2);
|
||||
/* pass 2 */
|
||||
BF( 3, 12, COS1_3 , 1);
|
||||
BF(19, 28,-COS1_3 , 1);
|
||||
/* pass 1 */
|
||||
BF0( 4, 27, COS0_4 , 1);
|
||||
BF0(11, 20, COS0_11, 2);
|
||||
/* pass 2 */
|
||||
BF( 4, 11, COS1_4 , 1);
|
||||
BF(20, 27,-COS1_4 , 1);
|
||||
/* pass 3 */
|
||||
BF( 3, 4, COS2_3 , 3);
|
||||
BF(11, 12,-COS2_3 , 3);
|
||||
BF(19, 20, COS2_3 , 3);
|
||||
BF(27, 28,-COS2_3 , 3);
|
||||
/* pass 4 */
|
||||
BF( 0, 3, COS3_0 , 1);
|
||||
BF( 4, 7,-COS3_0 , 1);
|
||||
BF( 8, 11, COS3_0 , 1);
|
||||
BF(12, 15,-COS3_0 , 1);
|
||||
BF(16, 19, COS3_0 , 1);
|
||||
BF(20, 23,-COS3_0 , 1);
|
||||
BF(24, 27, COS3_0 , 1);
|
||||
BF(28, 31,-COS3_0 , 1);
|
||||
|
||||
|
||||
|
||||
/* pass 1 */
|
||||
BF0( 1, 30, COS0_1 , 1);
|
||||
BF0(14, 17, COS0_14, 3);
|
||||
/* pass 2 */
|
||||
BF( 1, 14, COS1_1 , 1);
|
||||
BF(17, 30,-COS1_1 , 1);
|
||||
/* pass 1 */
|
||||
BF0( 6, 25, COS0_6 , 1);
|
||||
BF0( 9, 22, COS0_9 , 1);
|
||||
/* pass 2 */
|
||||
BF( 6, 9, COS1_6 , 2);
|
||||
BF(22, 25,-COS1_6 , 2);
|
||||
/* pass 3 */
|
||||
BF( 1, 6, COS2_1 , 1);
|
||||
BF( 9, 14,-COS2_1 , 1);
|
||||
BF(17, 22, COS2_1 , 1);
|
||||
BF(25, 30,-COS2_1 , 1);
|
||||
|
||||
/* pass 1 */
|
||||
BF0( 2, 29, COS0_2 , 1);
|
||||
BF0(13, 18, COS0_13, 3);
|
||||
/* pass 2 */
|
||||
BF( 2, 13, COS1_2 , 1);
|
||||
BF(18, 29,-COS1_2 , 1);
|
||||
/* pass 1 */
|
||||
BF0( 5, 26, COS0_5 , 1);
|
||||
BF0(10, 21, COS0_10, 1);
|
||||
/* pass 2 */
|
||||
BF( 5, 10, COS1_5 , 2);
|
||||
BF(21, 26,-COS1_5 , 2);
|
||||
/* pass 3 */
|
||||
BF( 2, 5, COS2_2 , 1);
|
||||
BF(10, 13,-COS2_2 , 1);
|
||||
BF(18, 21, COS2_2 , 1);
|
||||
BF(26, 29,-COS2_2 , 1);
|
||||
/* pass 4 */
|
||||
BF( 1, 2, COS3_1 , 2);
|
||||
BF( 5, 6,-COS3_1 , 2);
|
||||
BF( 9, 10, COS3_1 , 2);
|
||||
BF(13, 14,-COS3_1 , 2);
|
||||
BF(17, 18, COS3_1 , 2);
|
||||
BF(21, 22,-COS3_1 , 2);
|
||||
BF(25, 26, COS3_1 , 2);
|
||||
BF(29, 30,-COS3_1 , 2);
|
||||
|
||||
/* pass 5 */
|
||||
BF1( 0, 1, 2, 3);
|
||||
BF2( 4, 5, 6, 7);
|
||||
BF1( 8, 9, 10, 11);
|
||||
BF2(12, 13, 14, 15);
|
||||
BF1(16, 17, 18, 19);
|
||||
BF2(20, 21, 22, 23);
|
||||
BF1(24, 25, 26, 27);
|
||||
BF2(28, 29, 30, 31);
|
||||
|
||||
/* pass 6 */
|
||||
|
||||
ADD( 8, 12);
|
||||
ADD(12, 10);
|
||||
ADD(10, 14);
|
||||
ADD(14, 9);
|
||||
ADD( 9, 13);
|
||||
ADD(13, 11);
|
||||
ADD(11, 15);
|
||||
|
||||
out[ 0] = val0;
|
||||
out[16] = val1;
|
||||
out[ 8] = val2;
|
||||
out[24] = val3;
|
||||
out[ 4] = val4;
|
||||
out[20] = val5;
|
||||
out[12] = val6;
|
||||
out[28] = val7;
|
||||
out[ 2] = val8;
|
||||
out[18] = val9;
|
||||
out[10] = val10;
|
||||
out[26] = val11;
|
||||
out[ 6] = val12;
|
||||
out[22] = val13;
|
||||
out[14] = val14;
|
||||
out[30] = val15;
|
||||
|
||||
ADD(24, 28);
|
||||
ADD(28, 26);
|
||||
ADD(26, 30);
|
||||
ADD(30, 25);
|
||||
ADD(25, 29);
|
||||
ADD(29, 27);
|
||||
ADD(27, 31);
|
||||
|
||||
out[ 1] = val16 + val24;
|
||||
out[17] = val17 + val25;
|
||||
out[ 9] = val18 + val26;
|
||||
out[25] = val19 + val27;
|
||||
out[ 5] = val20 + val28;
|
||||
out[21] = val21 + val29;
|
||||
out[13] = val22 + val30;
|
||||
out[29] = val23 + val31;
|
||||
out[ 3] = val24 + val20;
|
||||
out[19] = val25 + val21;
|
||||
out[11] = val26 + val22;
|
||||
out[27] = val27 + val23;
|
||||
out[ 7] = val28 + val18;
|
||||
out[23] = val29 + val19;
|
||||
out[15] = val30 + val17;
|
||||
out[31] = val31;
|
||||
}
|
|
@ -0,0 +1,215 @@
|
|||
/*
|
||||
* Floating point AAN DCT
|
||||
* this implementation is based upon the IJG integer AAN DCT (see jfdctfst.c)
|
||||
*
|
||||
* Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
|
||||
* Copyright (c) 2003 Roman Shaposhnik
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief
|
||||
* Floating point AAN DCT
|
||||
* @author Michael Niedermayer <michaelni@gmx.at>
|
||||
*/
|
||||
|
||||
#include "faandct.h"
|
||||
#include "libavutil/internal.h"
|
||||
#include "libavutil/libm.h"
|
||||
|
||||
typedef float FLOAT;
|
||||
|
||||
/* numbers generated by arbitrary precision arithmetic followed by truncation
|
||||
to 36 fractional digits (enough for a 128-bit IEEE quad, see /usr/include/math.h
|
||||
for this approach). Unfortunately, long double is not always available correctly,
|
||||
e.g ppc has issues.
|
||||
TODO: add L suffixes when ppc and toolchains sort out their stuff.
|
||||
*/
|
||||
#define B0 1.000000000000000000000000000000000000
|
||||
#define B1 0.720959822006947913789091890943021267 // (cos(pi*1/16)sqrt(2))^-1
|
||||
#define B2 0.765366864730179543456919968060797734 // (cos(pi*2/16)sqrt(2))^-1
|
||||
#define B3 0.850430094767256448766702844371412325 // (cos(pi*3/16)sqrt(2))^-1
|
||||
#define B4 1.000000000000000000000000000000000000 // (cos(pi*4/16)sqrt(2))^-1
|
||||
#define B5 1.272758580572833938461007018281767032 // (cos(pi*5/16)sqrt(2))^-1
|
||||
#define B6 1.847759065022573512256366378793576574 // (cos(pi*6/16)sqrt(2))^-1
|
||||
#define B7 3.624509785411551372409941227504289587 // (cos(pi*7/16)sqrt(2))^-1
|
||||
|
||||
#define A1 M_SQRT1_2 // cos(pi*4/16)
|
||||
#define A2 0.54119610014619698435 // cos(pi*6/16)sqrt(2)
|
||||
#define A5 0.38268343236508977170 // cos(pi*6/16)
|
||||
#define A4 1.30656296487637652774 // cos(pi*2/16)sqrt(2)
|
||||
|
||||
static const FLOAT postscale[64]={
|
||||
B0*B0, B0*B1, B0*B2, B0*B3, B0*B4, B0*B5, B0*B6, B0*B7,
|
||||
B1*B0, B1*B1, B1*B2, B1*B3, B1*B4, B1*B5, B1*B6, B1*B7,
|
||||
B2*B0, B2*B1, B2*B2, B2*B3, B2*B4, B2*B5, B2*B6, B2*B7,
|
||||
B3*B0, B3*B1, B3*B2, B3*B3, B3*B4, B3*B5, B3*B6, B3*B7,
|
||||
B4*B0, B4*B1, B4*B2, B4*B3, B4*B4, B4*B5, B4*B6, B4*B7,
|
||||
B5*B0, B5*B1, B5*B2, B5*B3, B5*B4, B5*B5, B5*B6, B5*B7,
|
||||
B6*B0, B6*B1, B6*B2, B6*B3, B6*B4, B6*B5, B6*B6, B6*B7,
|
||||
B7*B0, B7*B1, B7*B2, B7*B3, B7*B4, B7*B5, B7*B6, B7*B7,
|
||||
};
|
||||
|
||||
static av_always_inline void row_fdct(FLOAT temp[64], int16_t *data)
|
||||
{
|
||||
FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||
FLOAT tmp10, tmp11, tmp12, tmp13;
|
||||
FLOAT z2, z4, z11, z13;
|
||||
int i;
|
||||
|
||||
for (i=0; i<8*8; i+=8) {
|
||||
tmp0= data[0 + i] + data[7 + i];
|
||||
tmp7= data[0 + i] - data[7 + i];
|
||||
tmp1= data[1 + i] + data[6 + i];
|
||||
tmp6= data[1 + i] - data[6 + i];
|
||||
tmp2= data[2 + i] + data[5 + i];
|
||||
tmp5= data[2 + i] - data[5 + i];
|
||||
tmp3= data[3 + i] + data[4 + i];
|
||||
tmp4= data[3 + i] - data[4 + i];
|
||||
|
||||
tmp10= tmp0 + tmp3;
|
||||
tmp13= tmp0 - tmp3;
|
||||
tmp11= tmp1 + tmp2;
|
||||
tmp12= tmp1 - tmp2;
|
||||
|
||||
temp[0 + i]= tmp10 + tmp11;
|
||||
temp[4 + i]= tmp10 - tmp11;
|
||||
|
||||
tmp12 += tmp13;
|
||||
tmp12 *= A1;
|
||||
temp[2 + i]= tmp13 + tmp12;
|
||||
temp[6 + i]= tmp13 - tmp12;
|
||||
|
||||
tmp4 += tmp5;
|
||||
tmp5 += tmp6;
|
||||
tmp6 += tmp7;
|
||||
|
||||
z2= tmp4*(A2+A5) - tmp6*A5;
|
||||
z4= tmp6*(A4-A5) + tmp4*A5;
|
||||
|
||||
tmp5*=A1;
|
||||
|
||||
z11= tmp7 + tmp5;
|
||||
z13= tmp7 - tmp5;
|
||||
|
||||
temp[5 + i]= z13 + z2;
|
||||
temp[3 + i]= z13 - z2;
|
||||
temp[1 + i]= z11 + z4;
|
||||
temp[7 + i]= z11 - z4;
|
||||
}
|
||||
}
|
||||
|
||||
void ff_faandct(int16_t *data)
|
||||
{
|
||||
FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||
FLOAT tmp10, tmp11, tmp12, tmp13;
|
||||
FLOAT z2, z4, z11, z13;
|
||||
FLOAT temp[64];
|
||||
int i;
|
||||
|
||||
emms_c();
|
||||
|
||||
row_fdct(temp, data);
|
||||
|
||||
for (i=0; i<8; i++) {
|
||||
tmp0= temp[8*0 + i] + temp[8*7 + i];
|
||||
tmp7= temp[8*0 + i] - temp[8*7 + i];
|
||||
tmp1= temp[8*1 + i] + temp[8*6 + i];
|
||||
tmp6= temp[8*1 + i] - temp[8*6 + i];
|
||||
tmp2= temp[8*2 + i] + temp[8*5 + i];
|
||||
tmp5= temp[8*2 + i] - temp[8*5 + i];
|
||||
tmp3= temp[8*3 + i] + temp[8*4 + i];
|
||||
tmp4= temp[8*3 + i] - temp[8*4 + i];
|
||||
|
||||
tmp10= tmp0 + tmp3;
|
||||
tmp13= tmp0 - tmp3;
|
||||
tmp11= tmp1 + tmp2;
|
||||
tmp12= tmp1 - tmp2;
|
||||
|
||||
data[8*0 + i]= lrintf(postscale[8*0 + i] * (tmp10 + tmp11));
|
||||
data[8*4 + i]= lrintf(postscale[8*4 + i] * (tmp10 - tmp11));
|
||||
|
||||
tmp12 += tmp13;
|
||||
tmp12 *= A1;
|
||||
data[8*2 + i]= lrintf(postscale[8*2 + i] * (tmp13 + tmp12));
|
||||
data[8*6 + i]= lrintf(postscale[8*6 + i] * (tmp13 - tmp12));
|
||||
|
||||
tmp4 += tmp5;
|
||||
tmp5 += tmp6;
|
||||
tmp6 += tmp7;
|
||||
|
||||
z2= tmp4*(A2+A5) - tmp6*A5;
|
||||
z4= tmp6*(A4-A5) + tmp4*A5;
|
||||
|
||||
tmp5*=A1;
|
||||
|
||||
z11= tmp7 + tmp5;
|
||||
z13= tmp7 - tmp5;
|
||||
|
||||
data[8*5 + i]= lrintf(postscale[8*5 + i] * (z13 + z2));
|
||||
data[8*3 + i]= lrintf(postscale[8*3 + i] * (z13 - z2));
|
||||
data[8*1 + i]= lrintf(postscale[8*1 + i] * (z11 + z4));
|
||||
data[8*7 + i]= lrintf(postscale[8*7 + i] * (z11 - z4));
|
||||
}
|
||||
}
|
||||
|
||||
void ff_faandct248(int16_t *data)
|
||||
{
|
||||
FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||
FLOAT tmp10, tmp11, tmp12, tmp13;
|
||||
FLOAT temp[64];
|
||||
int i;
|
||||
|
||||
emms_c();
|
||||
|
||||
row_fdct(temp, data);
|
||||
|
||||
for (i=0; i<8; i++) {
|
||||
tmp0 = temp[8*0 + i] + temp[8*1 + i];
|
||||
tmp1 = temp[8*2 + i] + temp[8*3 + i];
|
||||
tmp2 = temp[8*4 + i] + temp[8*5 + i];
|
||||
tmp3 = temp[8*6 + i] + temp[8*7 + i];
|
||||
tmp4 = temp[8*0 + i] - temp[8*1 + i];
|
||||
tmp5 = temp[8*2 + i] - temp[8*3 + i];
|
||||
tmp6 = temp[8*4 + i] - temp[8*5 + i];
|
||||
tmp7 = temp[8*6 + i] - temp[8*7 + i];
|
||||
|
||||
tmp10 = tmp0 + tmp3;
|
||||
tmp11 = tmp1 + tmp2;
|
||||
tmp12 = tmp1 - tmp2;
|
||||
tmp13 = tmp0 - tmp3;
|
||||
|
||||
data[8*0 + i] = lrintf(postscale[8*0 + i] * (tmp10 + tmp11));
|
||||
data[8*4 + i] = lrintf(postscale[8*4 + i] * (tmp10 - tmp11));
|
||||
|
||||
tmp12 += tmp13;
|
||||
tmp12 *= A1;
|
||||
data[8*2 + i] = lrintf(postscale[8*2 + i] * (tmp13 + tmp12));
|
||||
data[8*6 + i] = lrintf(postscale[8*6 + i] * (tmp13 - tmp12));
|
||||
|
||||
tmp10 = tmp4 + tmp7;
|
||||
tmp11 = tmp5 + tmp6;
|
||||
tmp12 = tmp5 - tmp6;
|
||||
tmp13 = tmp4 - tmp7;
|
||||
|
||||
data[8*1 + i] = lrintf(postscale[8*0 + i] * (tmp10 + tmp11));
|
||||
data[8*5 + i] = lrintf(postscale[8*4 + i] * (tmp10 - tmp11));
|
||||
|
||||
tmp12 += tmp13;
|
||||
tmp12 *= A1;
|
||||
data[8*3 + i] = lrintf(postscale[8*2 + i] * (tmp13 + tmp12));
|
||||
data[8*7 + i] = lrintf(postscale[8*6 + i] * (tmp13 - tmp12));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Floating point AAN DCT
|
||||
* Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief
|
||||
* Floating point AAN DCT
|
||||
* @author Michael Niedermayer <michaelni@gmx.at>
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_FAANDCT_H
|
||||
#define AVCODEC_FAANDCT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void ff_faandct(int16_t *data);
|
||||
void ff_faandct248(int16_t *data);
|
||||
|
||||
#endif /* AVCODEC_FAANDCT_H */
|
|
@ -0,0 +1,166 @@
|
|||
/*
|
||||
* Floating point AAN IDCT
|
||||
* Copyright (c) 2008 Michael Niedermayer <michaelni@gmx.at>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#include "faanidct.h"
|
||||
#include "libavutil/common.h"
|
||||
|
||||
/* To allow switching to double. */
|
||||
typedef float FLOAT;
|
||||
|
||||
#define B0 1.0000000000000000000000
|
||||
#define B1 1.3870398453221474618216 // cos(pi*1/16)sqrt(2)
|
||||
#define B2 1.3065629648763765278566 // cos(pi*2/16)sqrt(2)
|
||||
#define B3 1.1758756024193587169745 // cos(pi*3/16)sqrt(2)
|
||||
#define B4 1.0000000000000000000000 // cos(pi*4/16)sqrt(2)
|
||||
#define B5 0.7856949583871021812779 // cos(pi*5/16)sqrt(2)
|
||||
#define B6 0.5411961001461969843997 // cos(pi*6/16)sqrt(2)
|
||||
#define B7 0.2758993792829430123360 // cos(pi*7/16)sqrt(2)
|
||||
|
||||
#define A4 0.70710678118654752438 // cos(pi*4/16)
|
||||
#define A2 0.92387953251128675613 // cos(pi*2/16)
|
||||
|
||||
static const FLOAT prescale[64]={
|
||||
B0*B0/8, B0*B1/8, B0*B2/8, B0*B3/8, B0*B4/8, B0*B5/8, B0*B6/8, B0*B7/8,
|
||||
B1*B0/8, B1*B1/8, B1*B2/8, B1*B3/8, B1*B4/8, B1*B5/8, B1*B6/8, B1*B7/8,
|
||||
B2*B0/8, B2*B1/8, B2*B2/8, B2*B3/8, B2*B4/8, B2*B5/8, B2*B6/8, B2*B7/8,
|
||||
B3*B0/8, B3*B1/8, B3*B2/8, B3*B3/8, B3*B4/8, B3*B5/8, B3*B6/8, B3*B7/8,
|
||||
B4*B0/8, B4*B1/8, B4*B2/8, B4*B3/8, B4*B4/8, B4*B5/8, B4*B6/8, B4*B7/8,
|
||||
B5*B0/8, B5*B1/8, B5*B2/8, B5*B3/8, B5*B4/8, B5*B5/8, B5*B6/8, B5*B7/8,
|
||||
B6*B0/8, B6*B1/8, B6*B2/8, B6*B3/8, B6*B4/8, B6*B5/8, B6*B6/8, B6*B7/8,
|
||||
B7*B0/8, B7*B1/8, B7*B2/8, B7*B3/8, B7*B4/8, B7*B5/8, B7*B6/8, B7*B7/8,
|
||||
};
|
||||
|
||||
static inline void p8idct(int16_t data[64], FLOAT temp[64], uint8_t *dest,
|
||||
ptrdiff_t stride, int x, int y, int type)
|
||||
{
|
||||
int i;
|
||||
FLOAT s04, d04, s17, d17, s26, d26, s53, d53;
|
||||
FLOAT os07, os16, os25, os34;
|
||||
FLOAT od07, od16, od25, od34;
|
||||
|
||||
for(i=0; i<y*8; i+=y){
|
||||
s17= temp[1*x + i] + temp[7*x + i];
|
||||
d17= temp[1*x + i] - temp[7*x + i];
|
||||
s53= temp[5*x + i] + temp[3*x + i];
|
||||
d53= temp[5*x + i] - temp[3*x + i];
|
||||
|
||||
od07= s17 + s53;
|
||||
od25= (s17 - s53)*(2*A4);
|
||||
|
||||
od34= d17*(2*(B6-A2)) - d53*(2*A2);
|
||||
od16= d53*(2*(A2-B2)) + d17*(2*A2);
|
||||
|
||||
od16 -= od07;
|
||||
od25 -= od16;
|
||||
od34 += od25;
|
||||
|
||||
s26 = temp[2*x + i] + temp[6*x + i];
|
||||
d26 = temp[2*x + i] - temp[6*x + i];
|
||||
d26*= 2*A4;
|
||||
d26-= s26;
|
||||
|
||||
s04= temp[0*x + i] + temp[4*x + i];
|
||||
d04= temp[0*x + i] - temp[4*x + i];
|
||||
|
||||
os07= s04 + s26;
|
||||
os34= s04 - s26;
|
||||
os16= d04 + d26;
|
||||
os25= d04 - d26;
|
||||
|
||||
if(type==0){
|
||||
temp[0*x + i]= os07 + od07;
|
||||
temp[7*x + i]= os07 - od07;
|
||||
temp[1*x + i]= os16 + od16;
|
||||
temp[6*x + i]= os16 - od16;
|
||||
temp[2*x + i]= os25 + od25;
|
||||
temp[5*x + i]= os25 - od25;
|
||||
temp[3*x + i]= os34 - od34;
|
||||
temp[4*x + i]= os34 + od34;
|
||||
}else if(type==1){
|
||||
data[0*x + i]= lrintf(os07 + od07);
|
||||
data[7*x + i]= lrintf(os07 - od07);
|
||||
data[1*x + i]= lrintf(os16 + od16);
|
||||
data[6*x + i]= lrintf(os16 - od16);
|
||||
data[2*x + i]= lrintf(os25 + od25);
|
||||
data[5*x + i]= lrintf(os25 - od25);
|
||||
data[3*x + i]= lrintf(os34 - od34);
|
||||
data[4*x + i]= lrintf(os34 + od34);
|
||||
}else if(type==2){
|
||||
dest[0*stride + i]= av_clip_uint8(((int)dest[0*stride + i]) + lrintf(os07 + od07));
|
||||
dest[7*stride + i]= av_clip_uint8(((int)dest[7*stride + i]) + lrintf(os07 - od07));
|
||||
dest[1*stride + i]= av_clip_uint8(((int)dest[1*stride + i]) + lrintf(os16 + od16));
|
||||
dest[6*stride + i]= av_clip_uint8(((int)dest[6*stride + i]) + lrintf(os16 - od16));
|
||||
dest[2*stride + i]= av_clip_uint8(((int)dest[2*stride + i]) + lrintf(os25 + od25));
|
||||
dest[5*stride + i]= av_clip_uint8(((int)dest[5*stride + i]) + lrintf(os25 - od25));
|
||||
dest[3*stride + i]= av_clip_uint8(((int)dest[3*stride + i]) + lrintf(os34 - od34));
|
||||
dest[4*stride + i]= av_clip_uint8(((int)dest[4*stride + i]) + lrintf(os34 + od34));
|
||||
}else{
|
||||
dest[0*stride + i]= av_clip_uint8(lrintf(os07 + od07));
|
||||
dest[7*stride + i]= av_clip_uint8(lrintf(os07 - od07));
|
||||
dest[1*stride + i]= av_clip_uint8(lrintf(os16 + od16));
|
||||
dest[6*stride + i]= av_clip_uint8(lrintf(os16 - od16));
|
||||
dest[2*stride + i]= av_clip_uint8(lrintf(os25 + od25));
|
||||
dest[5*stride + i]= av_clip_uint8(lrintf(os25 - od25));
|
||||
dest[3*stride + i]= av_clip_uint8(lrintf(os34 - od34));
|
||||
dest[4*stride + i]= av_clip_uint8(lrintf(os34 + od34));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ff_faanidct(int16_t block[64]){
|
||||
FLOAT temp[64];
|
||||
int i;
|
||||
|
||||
emms_c();
|
||||
|
||||
for(i=0; i<64; i++)
|
||||
temp[i] = block[i] * prescale[i];
|
||||
|
||||
p8idct(block, temp, NULL, 0, 1, 8, 0);
|
||||
p8idct(block, temp, NULL, 0, 8, 1, 1);
|
||||
}
|
||||
|
||||
void ff_faanidct_add(uint8_t *dest, ptrdiff_t line_size, int16_t block[64])
|
||||
{
|
||||
FLOAT temp[64];
|
||||
int i;
|
||||
|
||||
emms_c();
|
||||
|
||||
for(i=0; i<64; i++)
|
||||
temp[i] = block[i] * prescale[i];
|
||||
|
||||
p8idct(block, temp, NULL, 0, 1, 8, 0);
|
||||
p8idct(NULL , temp, dest, line_size, 8, 1, 2);
|
||||
}
|
||||
|
||||
void ff_faanidct_put(uint8_t *dest, ptrdiff_t line_size, int16_t block[64])
|
||||
{
|
||||
FLOAT temp[64];
|
||||
int i;
|
||||
|
||||
emms_c();
|
||||
|
||||
for(i=0; i<64; i++)
|
||||
temp[i] = block[i] * prescale[i];
|
||||
|
||||
p8idct(block, temp, NULL, 0, 1, 8, 0);
|
||||
p8idct(NULL , temp, dest, line_size, 8, 1, 3);
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Floating point AAN IDCT
|
||||
* Copyright (c) 2008 Michael Niedermayer <michaelni@gmx.at>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_FAANIDCT_H
|
||||
#define AVCODEC_FAANIDCT_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
void ff_faanidct(int16_t block[64]);
|
||||
void ff_faanidct_add(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]);
|
||||
void ff_faanidct_put(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]);
|
||||
|
||||
#endif /* AVCODEC_FAANIDCT_H */
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "avcodec.h"
|
||||
#include "dct.h"
|
||||
#include "faandct.h"
|
||||
#include "fdctdsp.h"
|
||||
#include "config.h"
|
||||
|
||||
av_cold void ff_fdctdsp_init(FDCTDSPContext *c, AVCodecContext *avctx)
|
||||
{
|
||||
const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8;
|
||||
|
||||
if (avctx->bits_per_raw_sample == 10 || avctx->bits_per_raw_sample == 9) {
|
||||
c->fdct = ff_jpeg_fdct_islow_10;
|
||||
c->fdct248 = ff_fdct248_islow_10;
|
||||
} else if (avctx->dct_algo == FF_DCT_FASTINT) {
|
||||
c->fdct = ff_fdct_ifast;
|
||||
c->fdct248 = ff_fdct_ifast248;
|
||||
#if CONFIG_FAANDCT
|
||||
} else if (avctx->dct_algo == FF_DCT_FAAN) {
|
||||
c->fdct = ff_faandct;
|
||||
c->fdct248 = ff_faandct248;
|
||||
#endif /* CONFIG_FAANDCT */
|
||||
} else {
|
||||
c->fdct = ff_jpeg_fdct_islow_8; // slow/accurate/default
|
||||
c->fdct248 = ff_fdct248_islow_8;
|
||||
}
|
||||
|
||||
if (ARCH_PPC)
|
||||
ff_fdctdsp_init_ppc(c, avctx, high_bit_depth);
|
||||
if (ARCH_X86)
|
||||
ff_fdctdsp_init_x86(c, avctx, high_bit_depth);
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/cpu.h"
|
||||
#include "libavutil/x86/cpu.h"
|
||||
#include "libavcodec/avcodec.h"
|
||||
#include "libavcodec/fdctdsp.h"
|
||||
#include "fdct.h"
|
||||
|
||||
av_cold void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx,
|
||||
unsigned high_bit_depth)
|
||||
{
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
const int dct_algo = avctx->dct_algo;
|
||||
|
||||
if (!high_bit_depth) {
|
||||
if ((dct_algo == FF_DCT_AUTO || dct_algo == FF_DCT_MMX)) {
|
||||
if (INLINE_MMX(cpu_flags))
|
||||
c->fdct = ff_fdct_mmx;
|
||||
|
||||
if (INLINE_MMXEXT(cpu_flags))
|
||||
c->fdct = ff_fdct_mmxext;
|
||||
|
||||
if (INLINE_SSE2(cpu_flags))
|
||||
c->fdct = ff_fdct_sse2;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#define FFT_FLOAT 0
|
||||
#define FFT_FIXED_32 0
|
||||
#include "fft_template.c"
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) 2012
|
||||
* MIPS Technologies, Inc., California.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the MIPS Technologies, Inc., nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Stanislav Ocovaj (socovaj@mips.com)
|
||||
* Goran Cordasic (goran@mips.com)
|
||||
* Djordje Pesut (djordje@mips.com)
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#define FFT_FLOAT 0
|
||||
#define FFT_FIXED_32 1
|
||||
#include "fft_template.c"
|
|
@ -0,0 +1,328 @@
|
|||
/*
|
||||
* Copyright (c) 2012
|
||||
* MIPS Technologies, Inc., California.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the MIPS Technologies, Inc., nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Stanislav Ocovaj (socovaj@mips.com)
|
||||
* Goran Cordasic (goran@mips.com)
|
||||
* Djordje Pesut (djordje@mips.com)
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* definitions and initialization of LUT table for FFT
|
||||
*/
|
||||
#include "libavcodec/fft_table.h"
|
||||
|
||||
const int32_t ff_w_tab_sr[MAX_FFT_SIZE/(4*16)] = {
|
||||
2147483647, 2147483016, 2147481121, 2147477963, 2147473542, 2147467857, 2147460908, 2147452697,
|
||||
2147443222, 2147432484, 2147420483, 2147407218, 2147392690, 2147376899, 2147359845, 2147341527,
|
||||
2147321946, 2147301102, 2147278995, 2147255625, 2147230991, 2147205094, 2147177934, 2147149511,
|
||||
2147119825, 2147088876, 2147056664, 2147023188, 2146988450, 2146952448, 2146915184, 2146876656,
|
||||
2146836866, 2146795813, 2146753497, 2146709917, 2146665076, 2146618971, 2146571603, 2146522973,
|
||||
2146473080, 2146421924, 2146369505, 2146315824, 2146260881, 2146204674, 2146147205, 2146088474,
|
||||
2146028480, 2145967224, 2145904705, 2145840924, 2145775880, 2145709574, 2145642006, 2145573176,
|
||||
2145503083, 2145431729, 2145359112, 2145285233, 2145210092, 2145133690, 2145056025, 2144977098,
|
||||
2144896910, 2144815460, 2144732748, 2144648774, 2144563539, 2144477042, 2144389283, 2144300264,
|
||||
2144209982, 2144118439, 2144025635, 2143931570, 2143836244, 2143739656, 2143641807, 2143542697,
|
||||
2143442326, 2143340694, 2143237802, 2143133648, 2143028234, 2142921559, 2142813624, 2142704427,
|
||||
2142593971, 2142482254, 2142369276, 2142255039, 2142139541, 2142022783, 2141904764, 2141785486,
|
||||
2141664948, 2141543150, 2141420092, 2141295774, 2141170197, 2141043360, 2140915264, 2140785908,
|
||||
2140655293, 2140523418, 2140390284, 2140255892, 2140120240, 2139983329, 2139845159, 2139705730,
|
||||
2139565043, 2139423097, 2139279892, 2139135429, 2138989708, 2138842728, 2138694490, 2138544994,
|
||||
2138394240, 2138242228, 2138088958, 2137934430, 2137778644, 2137621601, 2137463301, 2137303743,
|
||||
2137142927, 2136980855, 2136817525, 2136652938, 2136487095, 2136319994, 2136151637, 2135982023,
|
||||
2135811153, 2135639026, 2135465642, 2135291003, 2135115107, 2134937956, 2134759548, 2134579885,
|
||||
2134398966, 2134216791, 2134033361, 2133848675, 2133662734, 2133475538, 2133287087, 2133097381,
|
||||
2132906420, 2132714204, 2132520734, 2132326009, 2132130030, 2131932796, 2131734309, 2131534567,
|
||||
2131333572, 2131131322, 2130927819, 2130723062, 2130517052, 2130309789, 2130101272, 2129891502,
|
||||
2129680480, 2129468204, 2129254676, 2129039895, 2128823862, 2128606576, 2128388038, 2128168248,
|
||||
2127947206, 2127724913, 2127501367, 2127276570, 2127050522, 2126823222, 2126594672, 2126364870,
|
||||
2126133817, 2125901514, 2125667960, 2125433155, 2125197100, 2124959795, 2124721240, 2124481435,
|
||||
2124240380, 2123998076, 2123754522, 2123509718, 2123263666, 2123016364, 2122767814, 2122518015,
|
||||
2122266967, 2122014670, 2121761126, 2121506333, 2121250292, 2120993003, 2120734467, 2120474683,
|
||||
2120213651, 2119951372, 2119687847, 2119423074, 2119157054, 2118889788, 2118621275, 2118351516,
|
||||
2118080511, 2117808259, 2117534762, 2117260020, 2116984031, 2116706797, 2116428319, 2116148595,
|
||||
2115867626, 2115585412, 2115301954, 2115017252, 2114731305, 2114444114, 2114155680, 2113866001,
|
||||
2113575080, 2113282914, 2112989506, 2112694855, 2112398960, 2112101824, 2111803444, 2111503822,
|
||||
2111202959, 2110900853, 2110597505, 2110292916, 2109987085, 2109680013, 2109371700, 2109062146,
|
||||
2108751352, 2108439317, 2108126041, 2107811526, 2107495770, 2107178775, 2106860540, 2106541065,
|
||||
2106220352, 2105898399, 2105575208, 2105250778, 2104925109, 2104598202, 2104270057, 2103940674,
|
||||
2103610054, 2103278196, 2102945101, 2102610768, 2102275199, 2101938393, 2101600350, 2101261071,
|
||||
2100920556, 2100578805, 2100235819, 2099891596, 2099546139, 2099199446, 2098851519, 2098502357,
|
||||
2098151960, 2097800329, 2097447464, 2097093365, 2096738032, 2096381466, 2096023667, 2095664635,
|
||||
2095304370, 2094942872, 2094580142, 2094216179, 2093850985, 2093484559, 2093116901, 2092748012,
|
||||
2092377892, 2092006541, 2091633960, 2091260147, 2090885105, 2090508833, 2090131331, 2089752599,
|
||||
2089372638, 2088991448, 2088609029, 2088225381, 2087840505, 2087454400, 2087067068, 2086678508,
|
||||
2086288720, 2085897705, 2085505463, 2085111994, 2084717298, 2084321376, 2083924228, 2083525854,
|
||||
2083126254, 2082725429, 2082323379, 2081920103, 2081515603, 2081109879, 2080702930, 2080294757,
|
||||
2079885360, 2079474740, 2079062896, 2078649830, 2078235540, 2077820028, 2077403294, 2076985338,
|
||||
2076566160, 2076145760, 2075724139, 2075301296, 2074877233, 2074451950, 2074025446, 2073597721,
|
||||
2073168777, 2072738614, 2072307231, 2071874629, 2071440808, 2071005769, 2070569511, 2070132035,
|
||||
2069693342, 2069253430, 2068812302, 2068369957, 2067926394, 2067481616, 2067035621, 2066588410,
|
||||
2066139983, 2065690341, 2065239484, 2064787411, 2064334124, 2063879623, 2063423908, 2062966978,
|
||||
2062508835, 2062049479, 2061588910, 2061127128, 2060664133, 2060199927, 2059734508, 2059267877,
|
||||
2058800036, 2058330983, 2057860719, 2057389244, 2056916560, 2056442665, 2055967560, 2055491246,
|
||||
2055013723, 2054534991, 2054055050, 2053573901, 2053091544, 2052607979, 2052123207, 2051637227,
|
||||
2051150040, 2050661647, 2050172048, 2049681242, 2049189231, 2048696014, 2048201592, 2047705965,
|
||||
2047209133, 2046711097, 2046211857, 2045711414, 2045209767, 2044706916, 2044202863, 2043697608,
|
||||
2043191150, 2042683490, 2042174628, 2041664565, 2041153301, 2040640837, 2040127172, 2039612306,
|
||||
2039096241, 2038578976, 2038060512, 2037540850, 2037019988, 2036497928, 2035974670, 2035450215,
|
||||
2034924562, 2034397712, 2033869665, 2033340422, 2032809982, 2032278347, 2031745516, 2031211490,
|
||||
2030676269, 2030139853, 2029602243, 2029063439, 2028523442, 2027982251, 2027439867, 2026896291,
|
||||
2026351522, 2025805561, 2025258408, 2024710064, 2024160529, 2023609803, 2023057887, 2022504780,
|
||||
2021950484, 2021394998, 2020838323, 2020280460, 2019721407, 2019161167, 2018599739, 2018037123,
|
||||
2017473321, 2016908331, 2016342155, 2015774793, 2015206245, 2014636511, 2014065592, 2013493489,
|
||||
2012920201, 2012345729, 2011770073, 2011193233, 2010615210, 2010036005, 2009455617, 2008874047,
|
||||
2008291295, 2007707362, 2007122248, 2006535953, 2005948478, 2005359822, 2004769987, 2004178973,
|
||||
2003586779, 2002993407, 2002398857, 2001803128, 2001206222, 2000608139, 2000008879, 1999408442,
|
||||
1998806829, 1998204040, 1997600076, 1996994937, 1996388622, 1995781134, 1995172471, 1994562635,
|
||||
1993951625, 1993339442, 1992726087, 1992111559, 1991495860, 1990878989, 1990260946, 1989641733,
|
||||
1989021350, 1988399796, 1987777073, 1987153180, 1986528118, 1985901888, 1985274489, 1984645923,
|
||||
1984016189, 1983385288, 1982753220, 1982119985, 1981485585, 1980850019, 1980213288, 1979575392,
|
||||
1978936331, 1978296106, 1977654717, 1977012165, 1976368450, 1975723572, 1975077532, 1974430331,
|
||||
1973781967, 1973132443, 1972481757, 1971829912, 1971176906, 1970522741, 1969867417, 1969210933,
|
||||
1968553292, 1967894492, 1967234535, 1966573420, 1965911148, 1965247720, 1964583136, 1963917396,
|
||||
1963250501, 1962582451, 1961913246, 1961242888, 1960571375, 1959898709, 1959224890, 1958549919,
|
||||
1957873796, 1957196520, 1956518093, 1955838516, 1955157788, 1954475909, 1953792881, 1953108703,
|
||||
1952423377, 1951736902, 1951049279, 1950360508, 1949670589, 1948979524, 1948287312, 1947593954,
|
||||
1946899451, 1946203802, 1945507008, 1944809070, 1944109987, 1943409761, 1942708392, 1942005880,
|
||||
1941302225, 1940597428, 1939891490, 1939184411, 1938476190, 1937766830, 1937056329, 1936344689,
|
||||
1935631910, 1934917992, 1934202936, 1933486742, 1932769411, 1932050943, 1931331338, 1930610597,
|
||||
1929888720, 1929165708, 1928441561, 1927716279, 1926989864, 1926262315, 1925533633, 1924803818,
|
||||
1924072871, 1923340791, 1922607581, 1921873239, 1921137767, 1920401165, 1919663432, 1918924571,
|
||||
1918184581, 1917443462, 1916701216, 1915957841, 1915213340, 1914467712, 1913720958, 1912973078,
|
||||
1912224073, 1911473942, 1910722688, 1909970309, 1909216806, 1908462181, 1907706433, 1906949562,
|
||||
1906191570, 1905432457, 1904672222, 1903910867, 1903148392, 1902384797, 1901620084, 1900854251,
|
||||
1900087301, 1899319232, 1898550047, 1897779744, 1897008325, 1896235790, 1895462140, 1894687374,
|
||||
1893911494, 1893134500, 1892356392, 1891577171, 1890796837, 1890015391, 1889232832, 1888449163,
|
||||
1887664383, 1886878492, 1886091491, 1885303381, 1884514161, 1883723833, 1882932397, 1882139853,
|
||||
1881346202, 1880551444, 1879755580, 1878958610, 1878160535, 1877361354, 1876561070, 1875759681,
|
||||
1874957189, 1874153594, 1873348897, 1872543097, 1871736196, 1870928194, 1870119091, 1869308888,
|
||||
1868497586, 1867685184, 1866871683, 1866057085, 1865241388, 1864424594, 1863606704, 1862787717,
|
||||
1861967634, 1861146456, 1860324183, 1859500816, 1858676355, 1857850800, 1857024153, 1856196413,
|
||||
1855367581, 1854537657, 1853706643, 1852874538, 1852041343, 1851207059, 1850371686, 1849535224,
|
||||
1848697674, 1847859036, 1847019312, 1846178501, 1845336604, 1844493621, 1843649553, 1842804401,
|
||||
1841958164, 1841110844, 1840262441, 1839412956, 1838562388, 1837710739, 1836858008, 1836004197,
|
||||
1835149306, 1834293336, 1833436286, 1832578158, 1831718951, 1830858668, 1829997307, 1829134869,
|
||||
1828271356, 1827406767, 1826541103, 1825674364, 1824806552, 1823937666, 1823067707, 1822196675,
|
||||
1821324572, 1820451397, 1819577151, 1818701835, 1817825449, 1816947994, 1816069469, 1815189877,
|
||||
1814309216, 1813427489, 1812544694, 1811660833, 1810775906, 1809889915, 1809002858, 1808114737,
|
||||
1807225553, 1806335305, 1805443995, 1804551623, 1803658189, 1802763694, 1801868139, 1800971523,
|
||||
1800073849, 1799175115, 1798275323, 1797374472, 1796472565, 1795569601, 1794665580, 1793760504,
|
||||
1792854372, 1791947186, 1791038946, 1790129652, 1789219305, 1788307905, 1787395453, 1786481950,
|
||||
1785567396, 1784651792, 1783735137, 1782817434, 1781898681, 1780978881, 1780058032, 1779136137,
|
||||
1778213194, 1777289206, 1776364172, 1775438094, 1774510970, 1773582803, 1772653593, 1771723340,
|
||||
1770792044, 1769859707, 1768926328, 1767991909, 1767056450, 1766119952, 1765182414, 1764243838,
|
||||
1763304224, 1762363573, 1761421885, 1760479161, 1759535401, 1758590607, 1757644777, 1756697914,
|
||||
1755750017, 1754801087, 1753851126, 1752900132, 1751948107, 1750995052, 1750040966, 1749085851,
|
||||
1748129707, 1747172535, 1746214334, 1745255107, 1744294853, 1743333573, 1742371267, 1741407936,
|
||||
1740443581, 1739478202, 1738511799, 1737544374, 1736575927, 1735606458, 1734635968, 1733664458,
|
||||
1732691928, 1731718378, 1730743810, 1729768224, 1728791620, 1727813999, 1726835361, 1725855708,
|
||||
1724875040, 1723893357, 1722910659, 1721926948, 1720942225, 1719956488, 1718969740, 1717981981,
|
||||
1716993211, 1716003431, 1715012642, 1714020844, 1713028037, 1712034223, 1711039401, 1710043573,
|
||||
1709046739, 1708048900, 1707050055, 1706050207, 1705049355, 1704047500, 1703044642, 1702040783,
|
||||
1701035922, 1700030061, 1699023199, 1698015339, 1697006479, 1695996621, 1694985765, 1693973912,
|
||||
1692961062, 1691947217, 1690932376, 1689916541, 1688899711, 1687881888, 1686863072, 1685843263,
|
||||
1684822463, 1683800672, 1682777890, 1681754118, 1680729357, 1679703608, 1678676870, 1677649144,
|
||||
1676620432, 1675590733, 1674560049, 1673528379, 1672495725, 1671462087, 1670427466, 1669391862,
|
||||
1668355276, 1667317709, 1666279161, 1665239632, 1664199124, 1663157637, 1662115172, 1661071729,
|
||||
1660027308, 1658981911, 1657935539, 1656888190, 1655839867, 1654790570, 1653740300, 1652689057,
|
||||
1651636841, 1650583654, 1649529496, 1648474367, 1647418269, 1646361202, 1645303166, 1644244162,
|
||||
1643184191, 1642123253, 1641061349, 1639998480, 1638934646, 1637869848, 1636804087, 1635737362,
|
||||
1634669676, 1633601027, 1632531418, 1631460848, 1630389319, 1629316830, 1628243383, 1627168978,
|
||||
1626093616, 1625017297, 1623940023, 1622861793, 1621782608, 1620702469, 1619621377, 1618539332,
|
||||
1617456335, 1616372386, 1615287487, 1614201637, 1613114838, 1612027089, 1610938393, 1609848749,
|
||||
1608758157, 1607666620, 1606574136, 1605480708, 1604386335, 1603291018, 1602194758, 1601097555,
|
||||
1599999411, 1598900325, 1597800299, 1596699333, 1595597428, 1594494583, 1593390801, 1592286082,
|
||||
1591180426, 1590073833, 1588966306, 1587857843, 1586748447, 1585638117, 1584526854, 1583414660,
|
||||
1582301533, 1581187476, 1580072489, 1578956572, 1577839726, 1576721952, 1575603251, 1574483623,
|
||||
1573363068, 1572241588, 1571119183, 1569995854, 1568871601, 1567746425, 1566620327, 1565493307,
|
||||
1564365367, 1563236506, 1562106725, 1560976026, 1559844408, 1558711873, 1557578421, 1556444052,
|
||||
1555308768, 1554172569, 1553035455, 1551897428, 1550758488, 1549618636, 1548477872, 1547336197,
|
||||
1546193612, 1545050118, 1543905714, 1542760402, 1541614183, 1540467057, 1539319024, 1538170087,
|
||||
1537020244, 1535869497, 1534717846, 1533565293, 1532411837, 1531257480, 1530102222, 1528946064,
|
||||
1527789007, 1526631051, 1525472197, 1524312445, 1523151797, 1521990252, 1520827813, 1519664478,
|
||||
1518500250, 1517335128, 1516169114, 1515002208, 1513834411, 1512665723, 1511496145, 1510325678,
|
||||
1509154322, 1507982079, 1506808949, 1505634932, 1504460029, 1503284242, 1502107570, 1500930014,
|
||||
1499751576, 1498572255, 1497392053, 1496210969, 1495029006, 1493846163, 1492662441, 1491477842,
|
||||
1490292364, 1489106011, 1487918781, 1486730675, 1485541696, 1484351842, 1483161115, 1481969516,
|
||||
1480777044, 1479583702, 1478389489, 1477194407, 1475998456, 1474801636, 1473603949, 1472405394,
|
||||
1471205974, 1470005688, 1468804538, 1467602523, 1466399645, 1465195904, 1463991302, 1462785838,
|
||||
1461579514, 1460372329, 1459164286, 1457955385, 1456745625, 1455535009, 1454323536, 1453111208,
|
||||
1451898025, 1450683988, 1449469098, 1448253355, 1447036760, 1445819314, 1444601017, 1443381870,
|
||||
1442161874, 1440941030, 1439719338, 1438496799, 1437273414, 1436049184, 1434824109, 1433598189,
|
||||
1432371426, 1431143821, 1429915374, 1428686085, 1427455956, 1426224988, 1424993180, 1423760534,
|
||||
1422527051, 1421292730, 1420057574, 1418821582, 1417584755, 1416347095, 1415108601, 1413869275,
|
||||
1412629117, 1411388129, 1410146309, 1408903661, 1407660183, 1406415878, 1405170745, 1403924785,
|
||||
1402678000, 1401430389, 1400181954, 1398932695, 1397682613, 1396431709, 1395179984, 1393927438,
|
||||
1392674072, 1391419886, 1390164882, 1388909060, 1387652422, 1386394966, 1385136696, 1383877610,
|
||||
1382617710, 1381356997, 1380095472, 1378833134, 1377569986, 1376306026, 1375041258, 1373775680,
|
||||
1372509294, 1371242101, 1369974101, 1368705296, 1367435685, 1366165269, 1364894050, 1363622028,
|
||||
1362349204, 1361075579, 1359801152, 1358525926, 1357249901, 1355973077, 1354695455, 1353417037,
|
||||
1352137822, 1350857812, 1349577007, 1348295409, 1347013017, 1345729833, 1344445857, 1343161090,
|
||||
1341875533, 1340589187, 1339302052, 1338014129, 1336725419, 1335435923, 1334145641, 1332854574,
|
||||
1331562723, 1330270089, 1328976672, 1327682474, 1326387494, 1325091734, 1323795195, 1322497877,
|
||||
1321199781, 1319900907, 1318601257, 1317300832, 1315999631, 1314697657, 1313394909, 1312091388,
|
||||
1310787095, 1309482032, 1308176198, 1306869594, 1305562222, 1304254082, 1302945174, 1301635500,
|
||||
1300325060, 1299013855, 1297701886, 1296389154, 1295075659, 1293761402, 1292446384, 1291130606,
|
||||
1289814068, 1288496772, 1287178717, 1285859905, 1284540337, 1283220013, 1281898935, 1280577102,
|
||||
1279254516, 1277931177, 1276607086, 1275282245, 1273956653, 1272630312, 1271303222, 1269975384,
|
||||
1268646800, 1267317469, 1265987392, 1264656571, 1263325005, 1261992697, 1260659646, 1259325853,
|
||||
1257991320, 1256656047, 1255320034, 1253983283, 1252645794, 1251307568, 1249968606, 1248628909,
|
||||
1247288478, 1245947312, 1244605414, 1243262783, 1241919421, 1240575329, 1239230506, 1237884955,
|
||||
1236538675, 1235191668, 1233843935, 1232495475, 1231146291, 1229796382, 1228445750, 1227094395,
|
||||
1225742318, 1224389521, 1223036002, 1221681765, 1220326809, 1218971135, 1217614743, 1216257636,
|
||||
1214899813, 1213541275, 1212182024, 1210822059, 1209461382, 1208099993, 1206737894, 1205375085,
|
||||
1204011567, 1202647340, 1201282407, 1199916766, 1198550419, 1197183368, 1195815612, 1194447153,
|
||||
1193077991, 1191708127, 1190337562, 1188966297, 1187594332, 1186221669, 1184848308, 1183474250,
|
||||
1182099496, 1180724046, 1179347902, 1177971064, 1176593533, 1175215310, 1173836395, 1172456790,
|
||||
1171076495, 1169695512, 1168313840, 1166931481, 1165548435, 1164164704, 1162780288, 1161395188,
|
||||
1160009405, 1158622939, 1157235792, 1155847964, 1154459456, 1153070269, 1151680403, 1150289860,
|
||||
1148898640, 1147506745, 1146114174, 1144720929, 1143327011, 1141932420, 1140537158, 1139141224,
|
||||
1137744621, 1136347348, 1134949406, 1133550797, 1132151521, 1130751579, 1129350972, 1127949701,
|
||||
1126547765, 1125145168, 1123741908, 1122337987, 1120933406, 1119528166, 1118122267, 1116715710,
|
||||
1115308496, 1113900627, 1112492101, 1111082922, 1109673089, 1108262603, 1106851465, 1105439676,
|
||||
1104027237, 1102614148, 1101200410, 1099786025, 1098370993, 1096955314, 1095538991, 1094122023,
|
||||
1092704411, 1091286156, 1089867259, 1088447722, 1087027544, 1085606726, 1084185270, 1082763176,
|
||||
1081340445, 1079917078, 1078493076, 1077068439, 1075643169, 1074217266, 1072790730, 1071363564,
|
||||
1069935768, 1068507342, 1067078288, 1065648605, 1064218296, 1062787361, 1061355801, 1059923616,
|
||||
1058490808, 1057057377, 1055623324, 1054188651, 1052753357, 1051317443, 1049880912, 1048443763,
|
||||
1047005996, 1045567615, 1044128617, 1042689006, 1041248781, 1039807944, 1038366495, 1036924436,
|
||||
1035481766, 1034038487, 1032594600, 1031150105, 1029705004, 1028259297, 1026812985, 1025366069,
|
||||
1023918550, 1022470428, 1021021705, 1019572382, 1018122458, 1016671936, 1015220816, 1013769098,
|
||||
1012316784, 1010863875, 1009410370, 1007956272, 1006501581, 1005046298, 1003590424, 1002133959,
|
||||
1000676905, 999219262, 997761031, 996302214, 994842810, 993382821, 991922248, 990461091,
|
||||
988999351, 987537030, 986074127, 984610645, 983146583, 981681943, 980216726, 978750932,
|
||||
977284562, 975817617, 974350098, 972882006, 971413342, 969944106, 968474300, 967003923,
|
||||
965532978, 964061465, 962589385, 961116739, 959643527, 958169751, 956695411, 955220508,
|
||||
953745043, 952269017, 950792431, 949315286, 947837582, 946359321, 944880503, 943401129,
|
||||
941921200, 940440717, 938959681, 937478092, 935995952, 934513261, 933030021, 931546231,
|
||||
930061894, 928577010, 927091579, 925605603, 924119082, 922632018, 921144411, 919656262,
|
||||
918167572, 916678342, 915188572, 913698265, 912207419, 910716038, 909224120, 907731667,
|
||||
906238681, 904745161, 903251110, 901756526, 900261413, 898765769, 897269597, 895772898,
|
||||
894275671, 892777918, 891279640, 889780838, 888281512, 886781663, 885281293, 883780402,
|
||||
882278992, 880777062, 879274614, 877771649, 876268167, 874764170, 873259659, 871754633,
|
||||
870249095, 868743045, 867236484, 865729413, 864221832, 862713743, 861205147, 859696043,
|
||||
858186435, 856676321, 855165703, 853654582, 852142959, 850630835, 849118210, 847605086,
|
||||
846091463, 844577343, 843062726, 841547612, 840032004, 838515901, 836999305, 835482217,
|
||||
833964638, 832446567, 830928007, 829408958, 827889422, 826369398, 824848888, 823327893,
|
||||
821806413, 820284450, 818762005, 817239078, 815715670, 814191782, 812667415, 811142571,
|
||||
809617249, 808091450, 806565177, 805038429, 803511207, 801983513, 800455346, 798926709,
|
||||
797397602, 795868026, 794337982, 792807470, 791276492, 789745049, 788213141, 786680769,
|
||||
785147934, 783614638, 782080880, 780546663, 779011986, 777476851, 775941259, 774405210,
|
||||
772868706, 771331747, 769794334, 768256469, 766718151, 765179382, 763640164, 762100496,
|
||||
760560380, 759019816, 757478806, 755937350, 754395449, 752853105, 751310318, 749767089,
|
||||
748223418, 746679308, 745134758, 743589770, 742044345, 740498483, 738952186, 737405453,
|
||||
735858287, 734310688, 732762657, 731214195, 729665303, 728115982, 726566232, 725016055,
|
||||
723465451, 721914422, 720362968, 718811090, 717258790, 715706067, 714152924, 712599360,
|
||||
711045377, 709490976, 707936158, 706380923, 704825272, 703269207, 701712728, 700155836,
|
||||
698598533, 697040818, 695482694, 693924160, 692365218, 690805869, 689246113, 687685952,
|
||||
686125387, 684564417, 683003045, 681441272, 679879097, 678316522, 676753549, 675190177,
|
||||
673626408, 672062243, 670497682, 668932727, 667367379, 665801638, 664235505, 662668981,
|
||||
661102068, 659534766, 657967075, 656398998, 654830535, 653261686, 651692453, 650122837,
|
||||
648552838, 646982457, 645411696, 643840556, 642269036, 640697139, 639124865, 637552215,
|
||||
635979190, 634405791, 632832018, 631257873, 629683357, 628108471, 626533215, 624957590,
|
||||
623381598, 621805239, 620228514, 618651424, 617073971, 615496154, 613917975, 612339436,
|
||||
610760536, 609181276, 607601658, 606021683, 604441352, 602860664, 601279623, 599698227,
|
||||
598116479, 596534378, 594951927, 593369126, 591785976, 590202477, 588618632, 587034440,
|
||||
585449903, 583865021, 582279796, 580694229, 579108320, 577522070, 575935480, 574348552,
|
||||
572761285, 571173682, 569585743, 567997469, 566408860, 564819919, 563230645, 561641039,
|
||||
560051104, 558460839, 556870245, 555279324, 553688076, 552096502, 550504604, 548912382,
|
||||
547319836, 545726969, 544133781, 542540273, 540946445, 539352300, 537757837, 536163058,
|
||||
534567963, 532972554, 531376831, 529780796, 528184449, 526587791, 524990824, 523393547,
|
||||
521795963, 520198072, 518599875, 517001373, 515402566, 513803457, 512204045, 510604332,
|
||||
509004318, 507404005, 505803394, 504202485, 502601279, 500999778, 499397982, 497795892,
|
||||
496193509, 494590835, 492987869, 491384614, 489781069, 488177236, 486573117, 484968710,
|
||||
483364019, 481759043, 480153784, 478548243, 476942419, 475336316, 473729932, 472123270,
|
||||
470516330, 468909114, 467301622, 465693854, 464085813, 462477499, 460868912, 459260055,
|
||||
457650927, 456041530, 454431865, 452821933, 451211734, 449601270, 447990541, 446379549,
|
||||
444768294, 443156777, 441545000, 439932963, 438320667, 436708113, 435095303, 433482236,
|
||||
431868915, 430255339, 428641511, 427027430, 425413098, 423798515, 422183684, 420568604,
|
||||
418953276, 417337703, 415721883, 414105819, 412489512, 410872962, 409256170, 407639137,
|
||||
406021865, 404404353, 402786604, 401168618, 399550396, 397931939, 396313247, 394694323,
|
||||
393075166, 391455778, 389836160, 388216313, 386596237, 384975934, 383355404, 381734649,
|
||||
380113669, 378492466, 376871039, 375249392, 373627523, 372005435, 370383128, 368760603,
|
||||
367137861, 365514903, 363891730, 362268343, 360644742, 359020930, 357396906, 355772673,
|
||||
354148230, 352523578, 350898719, 349273654, 347648383, 346022908, 344397230, 342771348,
|
||||
341145265, 339518981, 337892498, 336265816, 334638936, 333011859, 331384586, 329757119,
|
||||
328129457, 326501602, 324873555, 323245317, 321616889, 319988272, 318359466, 316730474,
|
||||
315101295, 313471930, 311842381, 310212649, 308582734, 306952638, 305322361, 303691904,
|
||||
302061269, 300430456, 298799466, 297168301, 295536961, 293905447, 292273760, 290641901,
|
||||
289009871, 287377671, 285745302, 284112765, 282480061, 280847190, 279214155, 277580955,
|
||||
275947592, 274314066, 272680379, 271046532, 269412525, 267778360, 266144038, 264509558,
|
||||
262874923, 261240134, 259605191, 257970095, 256334847, 254699448, 253063900, 251428203,
|
||||
249792358, 248156366, 246520228, 244883945, 243247518, 241610947, 239974235, 238337382,
|
||||
236700388, 235063255, 233425984, 231788575, 230151030, 228513350, 226875535, 225237587,
|
||||
223599506, 221961294, 220322951, 218684479, 217045878, 215407149, 213768293, 212129312,
|
||||
210490206, 208850976, 207211624, 205572149, 203932553, 202292838, 200653003, 199013051,
|
||||
197372981, 195732795, 194092495, 192452080, 190811551, 189170911, 187530159, 185889297,
|
||||
184248325, 182607245, 180966058, 179324764, 177683365, 176041861, 174400254, 172758544,
|
||||
171116733, 169474820, 167832808, 166190698, 164548489, 162906184, 161263783, 159621287,
|
||||
157978697, 156336015, 154693240, 153050374, 151407418, 149764374, 148121241, 146478021,
|
||||
144834714, 143191323, 141547847, 139904288, 138260647, 136616925, 134973122, 133329239,
|
||||
131685278, 130041240, 128397125, 126752935, 125108670, 123464332, 121819921, 120175438,
|
||||
118530885, 116886262, 115241570, 113596810, 111951983, 110307091, 108662134, 107017112,
|
||||
105372028, 103726882, 102081675, 100436408, 98791081, 97145697, 95500255, 93854758,
|
||||
92209205, 90563597, 88917937, 87272224, 85626460, 83980645, 82334782, 80688869,
|
||||
79042909, 77396903, 75750851, 74104755, 72458615, 70812432, 69166208, 67519943,
|
||||
65873638, 64227295, 62580914, 60934496, 59288042, 57641553, 55995030, 54348475,
|
||||
52701887, 51055268, 49408620, 47761942, 46115236, 44468503, 42821744, 41174960,
|
||||
39528151, 37881320, 36234466, 34587590, 32940695, 31293780, 29646846, 27999895,
|
||||
26352928, 24705945, 23058947, 21411936, 19764913, 18117878, 16470832, 14823776,
|
||||
13176712, 11529640, 9882561, 8235476, 6588387, 4941294, 3294197, 1647099
|
||||
};
|
||||
|
||||
uint16_t ff_fft_offsets_lut[21845];
|
||||
|
||||
void ff_fft_lut_init(uint16_t *table, int off, int size, int *index)
|
||||
{
|
||||
if (size < 16) {
|
||||
table[*index] = off >> 2;
|
||||
(*index)++;
|
||||
}
|
||||
else {
|
||||
ff_fft_lut_init(table, off, size>>1, index);
|
||||
ff_fft_lut_init(table, off+(size>>1), size>>2, index);
|
||||
ff_fft_lut_init(table, off+3*(size>>2), size>>2, index);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright (c) 2012
|
||||
* MIPS Technologies, Inc., California.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the MIPS Technologies, Inc., nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* Authors: Stanislav Ocovaj (socovaj@mips.com)
|
||||
* Goran Cordasic (goran@mips.com)
|
||||
* Djordje Pesut (djordje@mips.com)
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* definitions and tables for FFT
|
||||
*/
|
||||
#ifndef AVCODEC_FFT_TABLE_H
|
||||
#define AVCODEC_FFT_TABLE_H
|
||||
|
||||
#include "libavcodec/fft.h"
|
||||
|
||||
#define MAX_LOG2_NFFT 17 //!< Specifies maximum allowed fft size
|
||||
#define MAX_FFT_SIZE (1 << MAX_LOG2_NFFT)
|
||||
|
||||
extern const int32_t ff_w_tab_sr[];
|
||||
extern uint16_t ff_fft_offsets_lut[];
|
||||
void ff_fft_lut_init(uint16_t *table, int off, int size, int *index);
|
||||
|
||||
#endif /* AVCODEC_FFT_TABLE_H */
|
|
@ -0,0 +1,321 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/common.h"
|
||||
#include "avcodec.h"
|
||||
#include "dct.h"
|
||||
#include "faanidct.h"
|
||||
#include "idctdsp.h"
|
||||
#include "simple_idct.h"
|
||||
#include "xvididct.h"
|
||||
|
||||
av_cold void ff_init_scantable(uint8_t *permutation, ScanTable *st,
|
||||
const uint8_t *src_scantable)
|
||||
{
|
||||
int i, end;
|
||||
|
||||
st->scantable = src_scantable;
|
||||
|
||||
for (i = 0; i < 64; i++) {
|
||||
int j = src_scantable[i];
|
||||
st->permutated[i] = permutation[j];
|
||||
}
|
||||
|
||||
end = -1;
|
||||
for (i = 0; i < 64; i++) {
|
||||
int j = st->permutated[i];
|
||||
if (j > end)
|
||||
end = j;
|
||||
st->raster_end[i] = end;
|
||||
}
|
||||
}
|
||||
|
||||
av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation,
|
||||
enum idct_permutation_type perm_type)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (ARCH_X86)
|
||||
if (ff_init_scantable_permutation_x86(idct_permutation,
|
||||
perm_type))
|
||||
return;
|
||||
|
||||
switch (perm_type) {
|
||||
case FF_IDCT_PERM_NONE:
|
||||
for (i = 0; i < 64; i++)
|
||||
idct_permutation[i] = i;
|
||||
break;
|
||||
case FF_IDCT_PERM_LIBMPEG2:
|
||||
for (i = 0; i < 64; i++)
|
||||
idct_permutation[i] = (i & 0x38) | ((i & 6) >> 1) | ((i & 1) << 2);
|
||||
break;
|
||||
case FF_IDCT_PERM_TRANSPOSE:
|
||||
for (i = 0; i < 64; i++)
|
||||
idct_permutation[i] = ((i & 7) << 3) | (i >> 3);
|
||||
break;
|
||||
case FF_IDCT_PERM_PARTTRANS:
|
||||
for (i = 0; i < 64; i++)
|
||||
idct_permutation[i] = (i & 0x24) | ((i & 3) << 3) | ((i >> 3) & 3);
|
||||
break;
|
||||
default:
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
"Internal error, IDCT permutation not set\n");
|
||||
}
|
||||
}
|
||||
|
||||
void ff_put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,
|
||||
ptrdiff_t line_size)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* read the pixels */
|
||||
for (i = 0; i < 8; i++) {
|
||||
pixels[0] = av_clip_uint8(block[0]);
|
||||
pixels[1] = av_clip_uint8(block[1]);
|
||||
pixels[2] = av_clip_uint8(block[2]);
|
||||
pixels[3] = av_clip_uint8(block[3]);
|
||||
pixels[4] = av_clip_uint8(block[4]);
|
||||
pixels[5] = av_clip_uint8(block[5]);
|
||||
pixels[6] = av_clip_uint8(block[6]);
|
||||
pixels[7] = av_clip_uint8(block[7]);
|
||||
|
||||
pixels += line_size;
|
||||
block += 8;
|
||||
}
|
||||
}
|
||||
|
||||
static void put_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pixels,
|
||||
int line_size)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* read the pixels */
|
||||
for(i=0;i<4;i++) {
|
||||
pixels[0] = av_clip_uint8(block[0]);
|
||||
pixels[1] = av_clip_uint8(block[1]);
|
||||
pixels[2] = av_clip_uint8(block[2]);
|
||||
pixels[3] = av_clip_uint8(block[3]);
|
||||
|
||||
pixels += line_size;
|
||||
block += 8;
|
||||
}
|
||||
}
|
||||
|
||||
static void put_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pixels,
|
||||
int line_size)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* read the pixels */
|
||||
for(i=0;i<2;i++) {
|
||||
pixels[0] = av_clip_uint8(block[0]);
|
||||
pixels[1] = av_clip_uint8(block[1]);
|
||||
|
||||
pixels += line_size;
|
||||
block += 8;
|
||||
}
|
||||
}
|
||||
|
||||
static void put_signed_pixels_clamped_c(const int16_t *block,
|
||||
uint8_t *av_restrict pixels,
|
||||
ptrdiff_t line_size)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
for (j = 0; j < 8; j++) {
|
||||
if (*block < -128)
|
||||
*pixels = 0;
|
||||
else if (*block > 127)
|
||||
*pixels = 255;
|
||||
else
|
||||
*pixels = (uint8_t) (*block + 128);
|
||||
block++;
|
||||
pixels++;
|
||||
}
|
||||
pixels += (line_size - 8);
|
||||
}
|
||||
}
|
||||
|
||||
void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,
|
||||
ptrdiff_t line_size)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* read the pixels */
|
||||
for (i = 0; i < 8; i++) {
|
||||
pixels[0] = av_clip_uint8(pixels[0] + block[0]);
|
||||
pixels[1] = av_clip_uint8(pixels[1] + block[1]);
|
||||
pixels[2] = av_clip_uint8(pixels[2] + block[2]);
|
||||
pixels[3] = av_clip_uint8(pixels[3] + block[3]);
|
||||
pixels[4] = av_clip_uint8(pixels[4] + block[4]);
|
||||
pixels[5] = av_clip_uint8(pixels[5] + block[5]);
|
||||
pixels[6] = av_clip_uint8(pixels[6] + block[6]);
|
||||
pixels[7] = av_clip_uint8(pixels[7] + block[7]);
|
||||
pixels += line_size;
|
||||
block += 8;
|
||||
}
|
||||
}
|
||||
|
||||
static void add_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pixels,
|
||||
int line_size)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* read the pixels */
|
||||
for(i=0;i<4;i++) {
|
||||
pixels[0] = av_clip_uint8(pixels[0] + block[0]);
|
||||
pixels[1] = av_clip_uint8(pixels[1] + block[1]);
|
||||
pixels[2] = av_clip_uint8(pixels[2] + block[2]);
|
||||
pixels[3] = av_clip_uint8(pixels[3] + block[3]);
|
||||
pixels += line_size;
|
||||
block += 8;
|
||||
}
|
||||
}
|
||||
|
||||
static void add_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pixels,
|
||||
int line_size)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* read the pixels */
|
||||
for(i=0;i<2;i++) {
|
||||
pixels[0] = av_clip_uint8(pixels[0] + block[0]);
|
||||
pixels[1] = av_clip_uint8(pixels[1] + block[1]);
|
||||
pixels += line_size;
|
||||
block += 8;
|
||||
}
|
||||
}
|
||||
|
||||
static void ff_jref_idct4_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
|
||||
{
|
||||
ff_j_rev_dct4 (block);
|
||||
put_pixels_clamped4_c(block, dest, line_size);
|
||||
}
|
||||
static void ff_jref_idct4_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
|
||||
{
|
||||
ff_j_rev_dct4 (block);
|
||||
add_pixels_clamped4_c(block, dest, line_size);
|
||||
}
|
||||
|
||||
static void ff_jref_idct2_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
|
||||
{
|
||||
ff_j_rev_dct2 (block);
|
||||
put_pixels_clamped2_c(block, dest, line_size);
|
||||
}
|
||||
static void ff_jref_idct2_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
|
||||
{
|
||||
ff_j_rev_dct2 (block);
|
||||
add_pixels_clamped2_c(block, dest, line_size);
|
||||
}
|
||||
|
||||
static void ff_jref_idct1_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
|
||||
{
|
||||
dest[0] = av_clip_uint8((block[0] + 4)>>3);
|
||||
}
|
||||
static void ff_jref_idct1_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
|
||||
{
|
||||
dest[0] = av_clip_uint8(dest[0] + ((block[0] + 4)>>3));
|
||||
}
|
||||
|
||||
av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
|
||||
{
|
||||
const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8;
|
||||
|
||||
if (avctx->lowres==1) {
|
||||
c->idct_put = ff_jref_idct4_put;
|
||||
c->idct_add = ff_jref_idct4_add;
|
||||
c->idct = ff_j_rev_dct4;
|
||||
c->perm_type = FF_IDCT_PERM_NONE;
|
||||
} else if (avctx->lowres==2) {
|
||||
c->idct_put = ff_jref_idct2_put;
|
||||
c->idct_add = ff_jref_idct2_add;
|
||||
c->idct = ff_j_rev_dct2;
|
||||
c->perm_type = FF_IDCT_PERM_NONE;
|
||||
} else if (avctx->lowres==3) {
|
||||
c->idct_put = ff_jref_idct1_put;
|
||||
c->idct_add = ff_jref_idct1_add;
|
||||
c->idct = ff_j_rev_dct1;
|
||||
c->perm_type = FF_IDCT_PERM_NONE;
|
||||
} else {
|
||||
if (avctx->bits_per_raw_sample == 10 || avctx->bits_per_raw_sample == 9) {
|
||||
/* 10-bit MPEG-4 Simple Studio Profile requires a higher precision IDCT
|
||||
However, it only uses idct_put */
|
||||
if (c->mpeg4_studio_profile) {
|
||||
c->idct_put = ff_simple_idct_put_int32_10bit;
|
||||
c->idct_add = NULL;
|
||||
c->idct = NULL;
|
||||
} else {
|
||||
c->idct_put = ff_simple_idct_put_int16_10bit;
|
||||
c->idct_add = ff_simple_idct_add_int16_10bit;
|
||||
c->idct = ff_simple_idct_int16_10bit;
|
||||
}
|
||||
c->perm_type = FF_IDCT_PERM_NONE;
|
||||
} else if (avctx->bits_per_raw_sample == 12) {
|
||||
c->idct_put = ff_simple_idct_put_int16_12bit;
|
||||
c->idct_add = ff_simple_idct_add_int16_12bit;
|
||||
c->idct = ff_simple_idct_int16_12bit;
|
||||
c->perm_type = FF_IDCT_PERM_NONE;
|
||||
} else {
|
||||
if (avctx->idct_algo == FF_IDCT_INT) {
|
||||
c->idct_put = ff_jref_idct_put;
|
||||
c->idct_add = ff_jref_idct_add;
|
||||
c->idct = ff_j_rev_dct;
|
||||
c->perm_type = FF_IDCT_PERM_LIBMPEG2;
|
||||
#if CONFIG_FAANIDCT
|
||||
} else if (avctx->idct_algo == FF_IDCT_FAAN) {
|
||||
c->idct_put = ff_faanidct_put;
|
||||
c->idct_add = ff_faanidct_add;
|
||||
c->idct = ff_faanidct;
|
||||
c->perm_type = FF_IDCT_PERM_NONE;
|
||||
#endif /* CONFIG_FAANIDCT */
|
||||
} else { // accurate/default
|
||||
/* Be sure FF_IDCT_NONE will select this one, since it uses FF_IDCT_PERM_NONE */
|
||||
c->idct_put = ff_simple_idct_put_int16_8bit;
|
||||
c->idct_add = ff_simple_idct_add_int16_8bit;
|
||||
c->idct = ff_simple_idct_int16_8bit;
|
||||
c->perm_type = FF_IDCT_PERM_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
c->put_pixels_clamped = ff_put_pixels_clamped_c;
|
||||
c->put_signed_pixels_clamped = put_signed_pixels_clamped_c;
|
||||
c->add_pixels_clamped = ff_add_pixels_clamped_c;
|
||||
|
||||
if (CONFIG_MPEG4_DECODER && avctx->idct_algo == FF_IDCT_XVID)
|
||||
ff_xvid_idct_init(c, avctx);
|
||||
|
||||
if (ARCH_AARCH64)
|
||||
ff_idctdsp_init_aarch64(c, avctx, high_bit_depth);
|
||||
if (ARCH_ALPHA)
|
||||
ff_idctdsp_init_alpha(c, avctx, high_bit_depth);
|
||||
if (ARCH_ARM)
|
||||
ff_idctdsp_init_arm(c, avctx, high_bit_depth);
|
||||
if (ARCH_PPC)
|
||||
ff_idctdsp_init_ppc(c, avctx, high_bit_depth);
|
||||
if (ARCH_X86)
|
||||
ff_idctdsp_init_x86(c, avctx, high_bit_depth);
|
||||
if (ARCH_MIPS)
|
||||
ff_idctdsp_init_mips(c, avctx, high_bit_depth);
|
||||
|
||||
ff_init_scantable_permutation(c->idct_permutation,
|
||||
c->perm_type);
|
||||
}
|
|
@ -0,0 +1,332 @@
|
|||
/*
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
*
|
||||
* The authors make NO WARRANTY or representation, either express or implied,
|
||||
* with respect to this software, its quality, accuracy, merchantability, or
|
||||
* fitness for a particular purpose. This software is provided "AS IS", and
|
||||
* you, its user, assume the entire risk as to its quality and accuracy.
|
||||
*
|
||||
* This software is copyright (C) 1994-1996, Thomas G. Lane.
|
||||
* All Rights Reserved except as specified below.
|
||||
*
|
||||
* Permission is hereby granted to use, copy, modify, and distribute this
|
||||
* software (or portions thereof) for any purpose, without fee, subject to
|
||||
* these conditions:
|
||||
* (1) If any part of the source code for this software is distributed, then
|
||||
* this README file must be included, with this copyright and no-warranty
|
||||
* notice unaltered; and any additions, deletions, or changes to the original
|
||||
* files must be clearly indicated in accompanying documentation.
|
||||
* (2) If only executable code is distributed, then the accompanying
|
||||
* documentation must state that "this software is based in part on the work
|
||||
* of the Independent JPEG Group".
|
||||
* (3) Permission for use of this software is granted only if the user accepts
|
||||
* full responsibility for any undesirable consequences; the authors accept
|
||||
* NO LIABILITY for damages of any kind.
|
||||
*
|
||||
* These conditions apply to any software derived from or based on the IJG
|
||||
* code, not just to the unmodified library. If you use our work, you ought
|
||||
* to acknowledge us.
|
||||
*
|
||||
* Permission is NOT granted for the use of any IJG author's name or company
|
||||
* name in advertising or publicity relating to this software or products
|
||||
* derived from it. This software may be referred to only as "the Independent
|
||||
* JPEG Group's software".
|
||||
*
|
||||
* We specifically permit and encourage the use of this software as the basis
|
||||
* of commercial products, provided that all warranty or liability claims are
|
||||
* assumed by the product vendor.
|
||||
*
|
||||
* This file contains a fast, not so accurate integer implementation of the
|
||||
* forward DCT (Discrete Cosine Transform).
|
||||
*
|
||||
* A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT
|
||||
* on each column. Direct algorithms are also available, but they are
|
||||
* much more complex and seem not to be any faster when reduced to code.
|
||||
*
|
||||
* This implementation is based on Arai, Agui, and Nakajima's algorithm for
|
||||
* scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in
|
||||
* Japanese, but the algorithm is described in the Pennebaker & Mitchell
|
||||
* JPEG textbook (see REFERENCES section in file README). The following code
|
||||
* is based directly on figure 4-8 in P&M.
|
||||
* While an 8-point DCT cannot be done in less than 11 multiplies, it is
|
||||
* possible to arrange the computation so that many of the multiplies are
|
||||
* simple scalings of the final outputs. These multiplies can then be
|
||||
* folded into the multiplications or divisions by the JPEG quantization
|
||||
* table entries. The AA&N method leaves only 5 multiplies and 29 adds
|
||||
* to be done in the DCT itself.
|
||||
* The primary disadvantage of this method is that with fixed-point math,
|
||||
* accuracy is lost due to imprecise representation of the scaled
|
||||
* quantization values. The smaller the quantization table entry, the less
|
||||
* precise the scaled value, so this implementation does worse with high-
|
||||
* quality-setting files than with low-quality ones.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Independent JPEG Group's fast AAN dct.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "libavutil/common.h"
|
||||
#include "dct.h"
|
||||
|
||||
#define DCTSIZE 8
|
||||
#define GLOBAL(x) x
|
||||
#define RIGHT_SHIFT(x, n) ((x) >> (n))
|
||||
|
||||
/*
|
||||
* This module is specialized to the case DCTSIZE = 8.
|
||||
*/
|
||||
|
||||
#if DCTSIZE != 8
|
||||
Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */
|
||||
#endif
|
||||
|
||||
|
||||
/* Scaling decisions are generally the same as in the LL&M algorithm;
|
||||
* see jfdctint.c for more details. However, we choose to descale
|
||||
* (right shift) multiplication products as soon as they are formed,
|
||||
* rather than carrying additional fractional bits into subsequent additions.
|
||||
* This compromises accuracy slightly, but it lets us save a few shifts.
|
||||
* More importantly, 16-bit arithmetic is then adequate (for 8-bit samples)
|
||||
* everywhere except in the multiplications proper; this saves a good deal
|
||||
* of work on 16-bit-int machines.
|
||||
*
|
||||
* Again to save a few shifts, the intermediate results between pass 1 and
|
||||
* pass 2 are not upscaled, but are represented only to integral precision.
|
||||
*
|
||||
* A final compromise is to represent the multiplicative constants to only
|
||||
* 8 fractional bits, rather than 13. This saves some shifting work on some
|
||||
* machines, and may also reduce the cost of multiplication (since there
|
||||
* are fewer one-bits in the constants).
|
||||
*/
|
||||
|
||||
#define CONST_BITS 8
|
||||
|
||||
|
||||
/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
|
||||
* causing a lot of useless floating-point operations at run time.
|
||||
* To get around this we use the following pre-calculated constants.
|
||||
* If you change CONST_BITS you may want to add appropriate values.
|
||||
* (With a reasonable C compiler, you can just rely on the FIX() macro...)
|
||||
*/
|
||||
|
||||
#if CONST_BITS == 8
|
||||
#define FIX_0_382683433 ((int32_t) 98) /* FIX(0.382683433) */
|
||||
#define FIX_0_541196100 ((int32_t) 139) /* FIX(0.541196100) */
|
||||
#define FIX_0_707106781 ((int32_t) 181) /* FIX(0.707106781) */
|
||||
#define FIX_1_306562965 ((int32_t) 334) /* FIX(1.306562965) */
|
||||
#else
|
||||
#define FIX_0_382683433 FIX(0.382683433)
|
||||
#define FIX_0_541196100 FIX(0.541196100)
|
||||
#define FIX_0_707106781 FIX(0.707106781)
|
||||
#define FIX_1_306562965 FIX(1.306562965)
|
||||
#endif
|
||||
|
||||
|
||||
/* We can gain a little more speed, with a further compromise in accuracy,
|
||||
* by omitting the addition in a descaling shift. This yields an incorrectly
|
||||
* rounded result half the time...
|
||||
*/
|
||||
|
||||
#ifndef USE_ACCURATE_ROUNDING
|
||||
#undef DESCALE
|
||||
#define DESCALE(x,n) RIGHT_SHIFT(x, n)
|
||||
#endif
|
||||
|
||||
|
||||
/* Multiply a int16_t variable by an int32_t constant, and immediately
|
||||
* descale to yield a int16_t result.
|
||||
*/
|
||||
|
||||
#define MULTIPLY(var,const) ((int16_t) DESCALE((var) * (const), CONST_BITS))
|
||||
|
||||
static av_always_inline void row_fdct(int16_t * data){
|
||||
int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||
int tmp10, tmp11, tmp12, tmp13;
|
||||
int z1, z2, z3, z4, z5, z11, z13;
|
||||
int16_t *dataptr;
|
||||
int ctr;
|
||||
|
||||
/* Pass 1: process rows. */
|
||||
|
||||
dataptr = data;
|
||||
for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
|
||||
tmp0 = dataptr[0] + dataptr[7];
|
||||
tmp7 = dataptr[0] - dataptr[7];
|
||||
tmp1 = dataptr[1] + dataptr[6];
|
||||
tmp6 = dataptr[1] - dataptr[6];
|
||||
tmp2 = dataptr[2] + dataptr[5];
|
||||
tmp5 = dataptr[2] - dataptr[5];
|
||||
tmp3 = dataptr[3] + dataptr[4];
|
||||
tmp4 = dataptr[3] - dataptr[4];
|
||||
|
||||
/* Even part */
|
||||
|
||||
tmp10 = tmp0 + tmp3; /* phase 2 */
|
||||
tmp13 = tmp0 - tmp3;
|
||||
tmp11 = tmp1 + tmp2;
|
||||
tmp12 = tmp1 - tmp2;
|
||||
|
||||
dataptr[0] = tmp10 + tmp11; /* phase 3 */
|
||||
dataptr[4] = tmp10 - tmp11;
|
||||
|
||||
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */
|
||||
dataptr[2] = tmp13 + z1; /* phase 5 */
|
||||
dataptr[6] = tmp13 - z1;
|
||||
|
||||
/* Odd part */
|
||||
|
||||
tmp10 = tmp4 + tmp5; /* phase 2 */
|
||||
tmp11 = tmp5 + tmp6;
|
||||
tmp12 = tmp6 + tmp7;
|
||||
|
||||
/* The rotator is modified from fig 4-8 to avoid extra negations. */
|
||||
z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */
|
||||
z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */
|
||||
z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */
|
||||
z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */
|
||||
|
||||
z11 = tmp7 + z3; /* phase 5 */
|
||||
z13 = tmp7 - z3;
|
||||
|
||||
dataptr[5] = z13 + z2; /* phase 6 */
|
||||
dataptr[3] = z13 - z2;
|
||||
dataptr[1] = z11 + z4;
|
||||
dataptr[7] = z11 - z4;
|
||||
|
||||
dataptr += DCTSIZE; /* advance pointer to next row */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform the forward DCT on one block of samples.
|
||||
*/
|
||||
|
||||
GLOBAL(void)
|
||||
ff_fdct_ifast (int16_t * data)
|
||||
{
|
||||
int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||
int tmp10, tmp11, tmp12, tmp13;
|
||||
int z1, z2, z3, z4, z5, z11, z13;
|
||||
int16_t *dataptr;
|
||||
int ctr;
|
||||
|
||||
row_fdct(data);
|
||||
|
||||
/* Pass 2: process columns. */
|
||||
|
||||
dataptr = data;
|
||||
for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
|
||||
tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
|
||||
tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
|
||||
tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
|
||||
tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
|
||||
tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
|
||||
tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
|
||||
tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
|
||||
tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
|
||||
|
||||
/* Even part */
|
||||
|
||||
tmp10 = tmp0 + tmp3; /* phase 2 */
|
||||
tmp13 = tmp0 - tmp3;
|
||||
tmp11 = tmp1 + tmp2;
|
||||
tmp12 = tmp1 - tmp2;
|
||||
|
||||
dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */
|
||||
dataptr[DCTSIZE*4] = tmp10 - tmp11;
|
||||
|
||||
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */
|
||||
dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */
|
||||
dataptr[DCTSIZE*6] = tmp13 - z1;
|
||||
|
||||
/* Odd part */
|
||||
|
||||
tmp10 = tmp4 + tmp5; /* phase 2 */
|
||||
tmp11 = tmp5 + tmp6;
|
||||
tmp12 = tmp6 + tmp7;
|
||||
|
||||
/* The rotator is modified from fig 4-8 to avoid extra negations. */
|
||||
z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */
|
||||
z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */
|
||||
z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */
|
||||
z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */
|
||||
|
||||
z11 = tmp7 + z3; /* phase 5 */
|
||||
z13 = tmp7 - z3;
|
||||
|
||||
dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */
|
||||
dataptr[DCTSIZE*3] = z13 - z2;
|
||||
dataptr[DCTSIZE*1] = z11 + z4;
|
||||
dataptr[DCTSIZE*7] = z11 - z4;
|
||||
|
||||
dataptr++; /* advance pointer to next column */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform the forward 2-4-8 DCT on one block of samples.
|
||||
*/
|
||||
|
||||
GLOBAL(void)
|
||||
ff_fdct_ifast248 (int16_t * data)
|
||||
{
|
||||
int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||
int tmp10, tmp11, tmp12, tmp13;
|
||||
int z1;
|
||||
int16_t *dataptr;
|
||||
int ctr;
|
||||
|
||||
row_fdct(data);
|
||||
|
||||
/* Pass 2: process columns. */
|
||||
|
||||
dataptr = data;
|
||||
for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
|
||||
tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*1];
|
||||
tmp1 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3];
|
||||
tmp2 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*5];
|
||||
tmp3 = dataptr[DCTSIZE*6] + dataptr[DCTSIZE*7];
|
||||
tmp4 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*1];
|
||||
tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3];
|
||||
tmp6 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5];
|
||||
tmp7 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7];
|
||||
|
||||
/* Even part */
|
||||
|
||||
tmp10 = tmp0 + tmp3;
|
||||
tmp11 = tmp1 + tmp2;
|
||||
tmp12 = tmp1 - tmp2;
|
||||
tmp13 = tmp0 - tmp3;
|
||||
|
||||
dataptr[DCTSIZE*0] = tmp10 + tmp11;
|
||||
dataptr[DCTSIZE*4] = tmp10 - tmp11;
|
||||
|
||||
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781);
|
||||
dataptr[DCTSIZE*2] = tmp13 + z1;
|
||||
dataptr[DCTSIZE*6] = tmp13 - z1;
|
||||
|
||||
tmp10 = tmp4 + tmp7;
|
||||
tmp11 = tmp5 + tmp6;
|
||||
tmp12 = tmp5 - tmp6;
|
||||
tmp13 = tmp4 - tmp7;
|
||||
|
||||
dataptr[DCTSIZE*1] = tmp10 + tmp11;
|
||||
dataptr[DCTSIZE*5] = tmp10 - tmp11;
|
||||
|
||||
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781);
|
||||
dataptr[DCTSIZE*3] = tmp13 + z1;
|
||||
dataptr[DCTSIZE*7] = tmp13 - z1;
|
||||
|
||||
dataptr++; /* advance pointer to next column */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#undef GLOBAL
|
||||
#undef CONST_BITS
|
||||
#undef DESCALE
|
||||
#undef FIX_0_541196100
|
||||
#undef FIX_1_306562965
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#define BIT_DEPTH 8
|
||||
#include "jfdctint_template.c"
|
||||
#undef BIT_DEPTH
|
||||
|
||||
#define BIT_DEPTH 10
|
||||
#include "jfdctint_template.c"
|
||||
#undef BIT_DEPTH
|
|
@ -0,0 +1,398 @@
|
|||
/*
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
*
|
||||
* The authors make NO WARRANTY or representation, either express or implied,
|
||||
* with respect to this software, its quality, accuracy, merchantability, or
|
||||
* fitness for a particular purpose. This software is provided "AS IS", and
|
||||
* you, its user, assume the entire risk as to its quality and accuracy.
|
||||
*
|
||||
* This software is copyright (C) 1991-1996, Thomas G. Lane.
|
||||
* All Rights Reserved except as specified below.
|
||||
*
|
||||
* Permission is hereby granted to use, copy, modify, and distribute this
|
||||
* software (or portions thereof) for any purpose, without fee, subject to
|
||||
* these conditions:
|
||||
* (1) If any part of the source code for this software is distributed, then
|
||||
* this README file must be included, with this copyright and no-warranty
|
||||
* notice unaltered; and any additions, deletions, or changes to the original
|
||||
* files must be clearly indicated in accompanying documentation.
|
||||
* (2) If only executable code is distributed, then the accompanying
|
||||
* documentation must state that "this software is based in part on the work
|
||||
* of the Independent JPEG Group".
|
||||
* (3) Permission for use of this software is granted only if the user accepts
|
||||
* full responsibility for any undesirable consequences; the authors accept
|
||||
* NO LIABILITY for damages of any kind.
|
||||
*
|
||||
* These conditions apply to any software derived from or based on the IJG
|
||||
* code, not just to the unmodified library. If you use our work, you ought
|
||||
* to acknowledge us.
|
||||
*
|
||||
* Permission is NOT granted for the use of any IJG author's name or company
|
||||
* name in advertising or publicity relating to this software or products
|
||||
* derived from it. This software may be referred to only as "the Independent
|
||||
* JPEG Group's software".
|
||||
*
|
||||
* We specifically permit and encourage the use of this software as the basis
|
||||
* of commercial products, provided that all warranty or liability claims are
|
||||
* assumed by the product vendor.
|
||||
*
|
||||
* This file contains a slow-but-accurate integer implementation of the
|
||||
* forward DCT (Discrete Cosine Transform).
|
||||
*
|
||||
* A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT
|
||||
* on each column. Direct algorithms are also available, but they are
|
||||
* much more complex and seem not to be any faster when reduced to code.
|
||||
*
|
||||
* This implementation is based on an algorithm described in
|
||||
* C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT
|
||||
* Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics,
|
||||
* Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991.
|
||||
* The primary algorithm described there uses 11 multiplies and 29 adds.
|
||||
* We use their alternate method with 12 multiplies and 32 adds.
|
||||
* The advantage of this method is that no data path contains more than one
|
||||
* multiplication; this allows a very simple and accurate implementation in
|
||||
* scaled fixed-point arithmetic, with a minimal number of shifts.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Independent JPEG Group's slow & accurate dct.
|
||||
*/
|
||||
|
||||
#include "libavutil/common.h"
|
||||
#include "dct.h"
|
||||
|
||||
#include "bit_depth_template.c"
|
||||
|
||||
#define DCTSIZE 8
|
||||
#define BITS_IN_JSAMPLE BIT_DEPTH
|
||||
#define GLOBAL(x) x
|
||||
#define RIGHT_SHIFT(x, n) ((x) >> (n))
|
||||
#define MULTIPLY16C16(var,const) ((var)*(const))
|
||||
#define DESCALE(x,n) RIGHT_SHIFT((x) + (1 << ((n) - 1)), n)
|
||||
|
||||
|
||||
/*
|
||||
* This module is specialized to the case DCTSIZE = 8.
|
||||
*/
|
||||
|
||||
#if DCTSIZE != 8
|
||||
#error "Sorry, this code only copes with 8x8 DCTs."
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* The poop on this scaling stuff is as follows:
|
||||
*
|
||||
* Each 1-D DCT step produces outputs which are a factor of sqrt(N)
|
||||
* larger than the true DCT outputs. The final outputs are therefore
|
||||
* a factor of N larger than desired; since N=8 this can be cured by
|
||||
* a simple right shift at the end of the algorithm. The advantage of
|
||||
* this arrangement is that we save two multiplications per 1-D DCT,
|
||||
* because the y0 and y4 outputs need not be divided by sqrt(N).
|
||||
* In the IJG code, this factor of 8 is removed by the quantization step
|
||||
* (in jcdctmgr.c), NOT in this module.
|
||||
*
|
||||
* We have to do addition and subtraction of the integer inputs, which
|
||||
* is no problem, and multiplication by fractional constants, which is
|
||||
* a problem to do in integer arithmetic. We multiply all the constants
|
||||
* by CONST_SCALE and convert them to integer constants (thus retaining
|
||||
* CONST_BITS bits of precision in the constants). After doing a
|
||||
* multiplication we have to divide the product by CONST_SCALE, with proper
|
||||
* rounding, to produce the correct output. This division can be done
|
||||
* cheaply as a right shift of CONST_BITS bits. We postpone shifting
|
||||
* as long as possible so that partial sums can be added together with
|
||||
* full fractional precision.
|
||||
*
|
||||
* The outputs of the first pass are scaled up by PASS1_BITS bits so that
|
||||
* they are represented to better-than-integral precision. These outputs
|
||||
* require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word
|
||||
* with the recommended scaling. (For 12-bit sample data, the intermediate
|
||||
* array is int32_t anyway.)
|
||||
*
|
||||
* To avoid overflow of the 32-bit intermediate results in pass 2, we must
|
||||
* have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis
|
||||
* shows that the values given below are the most effective.
|
||||
*/
|
||||
|
||||
#undef CONST_BITS
|
||||
#undef PASS1_BITS
|
||||
#undef OUT_SHIFT
|
||||
|
||||
#if BITS_IN_JSAMPLE == 8
|
||||
#define CONST_BITS 13
|
||||
#define PASS1_BITS 4 /* set this to 2 if 16x16 multiplies are faster */
|
||||
#define OUT_SHIFT PASS1_BITS
|
||||
#else
|
||||
#define CONST_BITS 13
|
||||
#define PASS1_BITS 1 /* lose a little precision to avoid overflow */
|
||||
#define OUT_SHIFT (PASS1_BITS + 1)
|
||||
#endif
|
||||
|
||||
/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus
|
||||
* causing a lot of useless floating-point operations at run time.
|
||||
* To get around this we use the following pre-calculated constants.
|
||||
* If you change CONST_BITS you may want to add appropriate values.
|
||||
* (With a reasonable C compiler, you can just rely on the FIX() macro...)
|
||||
*/
|
||||
|
||||
#if CONST_BITS == 13
|
||||
#define FIX_0_298631336 ((int32_t) 2446) /* FIX(0.298631336) */
|
||||
#define FIX_0_390180644 ((int32_t) 3196) /* FIX(0.390180644) */
|
||||
#define FIX_0_541196100 ((int32_t) 4433) /* FIX(0.541196100) */
|
||||
#define FIX_0_765366865 ((int32_t) 6270) /* FIX(0.765366865) */
|
||||
#define FIX_0_899976223 ((int32_t) 7373) /* FIX(0.899976223) */
|
||||
#define FIX_1_175875602 ((int32_t) 9633) /* FIX(1.175875602) */
|
||||
#define FIX_1_501321110 ((int32_t) 12299) /* FIX(1.501321110) */
|
||||
#define FIX_1_847759065 ((int32_t) 15137) /* FIX(1.847759065) */
|
||||
#define FIX_1_961570560 ((int32_t) 16069) /* FIX(1.961570560) */
|
||||
#define FIX_2_053119869 ((int32_t) 16819) /* FIX(2.053119869) */
|
||||
#define FIX_2_562915447 ((int32_t) 20995) /* FIX(2.562915447) */
|
||||
#define FIX_3_072711026 ((int32_t) 25172) /* FIX(3.072711026) */
|
||||
#else
|
||||
#define FIX_0_298631336 FIX(0.298631336)
|
||||
#define FIX_0_390180644 FIX(0.390180644)
|
||||
#define FIX_0_541196100 FIX(0.541196100)
|
||||
#define FIX_0_765366865 FIX(0.765366865)
|
||||
#define FIX_0_899976223 FIX(0.899976223)
|
||||
#define FIX_1_175875602 FIX(1.175875602)
|
||||
#define FIX_1_501321110 FIX(1.501321110)
|
||||
#define FIX_1_847759065 FIX(1.847759065)
|
||||
#define FIX_1_961570560 FIX(1.961570560)
|
||||
#define FIX_2_053119869 FIX(2.053119869)
|
||||
#define FIX_2_562915447 FIX(2.562915447)
|
||||
#define FIX_3_072711026 FIX(3.072711026)
|
||||
#endif
|
||||
|
||||
|
||||
/* Multiply an int32_t variable by an int32_t constant to yield an int32_t result.
|
||||
* For 8-bit samples with the recommended scaling, all the variable
|
||||
* and constant values involved are no more than 16 bits wide, so a
|
||||
* 16x16->32 bit multiply can be used instead of a full 32x32 multiply.
|
||||
* For 12-bit samples, a full 32-bit multiplication will be needed.
|
||||
*/
|
||||
|
||||
#if BITS_IN_JSAMPLE == 8 && CONST_BITS<=13 && PASS1_BITS<=2
|
||||
#define MULTIPLY(var,const) MULTIPLY16C16(var,const)
|
||||
#else
|
||||
#define MULTIPLY(var,const) ((var) * (const))
|
||||
#endif
|
||||
|
||||
|
||||
static av_always_inline void FUNC(row_fdct)(int16_t *data)
|
||||
{
|
||||
int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||
int tmp10, tmp11, tmp12, tmp13;
|
||||
int z1, z2, z3, z4, z5;
|
||||
int16_t *dataptr;
|
||||
int ctr;
|
||||
|
||||
/* Pass 1: process rows. */
|
||||
/* Note results are scaled up by sqrt(8) compared to a true DCT; */
|
||||
/* furthermore, we scale the results by 2**PASS1_BITS. */
|
||||
|
||||
dataptr = data;
|
||||
for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
|
||||
tmp0 = dataptr[0] + dataptr[7];
|
||||
tmp7 = dataptr[0] - dataptr[7];
|
||||
tmp1 = dataptr[1] + dataptr[6];
|
||||
tmp6 = dataptr[1] - dataptr[6];
|
||||
tmp2 = dataptr[2] + dataptr[5];
|
||||
tmp5 = dataptr[2] - dataptr[5];
|
||||
tmp3 = dataptr[3] + dataptr[4];
|
||||
tmp4 = dataptr[3] - dataptr[4];
|
||||
|
||||
/* Even part per LL&M figure 1 --- note that published figure is faulty;
|
||||
* rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
|
||||
*/
|
||||
|
||||
tmp10 = tmp0 + tmp3;
|
||||
tmp13 = tmp0 - tmp3;
|
||||
tmp11 = tmp1 + tmp2;
|
||||
tmp12 = tmp1 - tmp2;
|
||||
|
||||
dataptr[0] = (int16_t) ((tmp10 + tmp11) * (1 << PASS1_BITS));
|
||||
dataptr[4] = (int16_t) ((tmp10 - tmp11) * (1 << PASS1_BITS));
|
||||
|
||||
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
|
||||
dataptr[2] = (int16_t) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),
|
||||
CONST_BITS-PASS1_BITS);
|
||||
dataptr[6] = (int16_t) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),
|
||||
CONST_BITS-PASS1_BITS);
|
||||
|
||||
/* Odd part per figure 8 --- note paper omits factor of sqrt(2).
|
||||
* cK represents cos(K*pi/16).
|
||||
* i0..i3 in the paper are tmp4..tmp7 here.
|
||||
*/
|
||||
|
||||
z1 = tmp4 + tmp7;
|
||||
z2 = tmp5 + tmp6;
|
||||
z3 = tmp4 + tmp6;
|
||||
z4 = tmp5 + tmp7;
|
||||
z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
|
||||
|
||||
tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
|
||||
tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
|
||||
tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
|
||||
tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
|
||||
z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
|
||||
z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
|
||||
z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
|
||||
z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
|
||||
|
||||
z3 += z5;
|
||||
z4 += z5;
|
||||
|
||||
dataptr[7] = (int16_t) DESCALE(tmp4 + z1 + z3, CONST_BITS-PASS1_BITS);
|
||||
dataptr[5] = (int16_t) DESCALE(tmp5 + z2 + z4, CONST_BITS-PASS1_BITS);
|
||||
dataptr[3] = (int16_t) DESCALE(tmp6 + z2 + z3, CONST_BITS-PASS1_BITS);
|
||||
dataptr[1] = (int16_t) DESCALE(tmp7 + z1 + z4, CONST_BITS-PASS1_BITS);
|
||||
|
||||
dataptr += DCTSIZE; /* advance pointer to next row */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform the forward DCT on one block of samples.
|
||||
*/
|
||||
|
||||
GLOBAL(void)
|
||||
FUNC(ff_jpeg_fdct_islow)(int16_t *data)
|
||||
{
|
||||
int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||
int tmp10, tmp11, tmp12, tmp13;
|
||||
int z1, z2, z3, z4, z5;
|
||||
int16_t *dataptr;
|
||||
int ctr;
|
||||
|
||||
FUNC(row_fdct)(data);
|
||||
|
||||
/* Pass 2: process columns.
|
||||
* We remove the PASS1_BITS scaling, but leave the results scaled up
|
||||
* by an overall factor of 8.
|
||||
*/
|
||||
|
||||
dataptr = data;
|
||||
for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
|
||||
tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7];
|
||||
tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7];
|
||||
tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6];
|
||||
tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6];
|
||||
tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5];
|
||||
tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
|
||||
tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
|
||||
tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
|
||||
|
||||
/* Even part per LL&M figure 1 --- note that published figure is faulty;
|
||||
* rotator "sqrt(2)*c1" should be "sqrt(2)*c6".
|
||||
*/
|
||||
|
||||
tmp10 = tmp0 + tmp3;
|
||||
tmp13 = tmp0 - tmp3;
|
||||
tmp11 = tmp1 + tmp2;
|
||||
tmp12 = tmp1 - tmp2;
|
||||
|
||||
dataptr[DCTSIZE*0] = DESCALE(tmp10 + tmp11, OUT_SHIFT);
|
||||
dataptr[DCTSIZE*4] = DESCALE(tmp10 - tmp11, OUT_SHIFT);
|
||||
|
||||
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
|
||||
dataptr[DCTSIZE*2] = DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),
|
||||
CONST_BITS + OUT_SHIFT);
|
||||
dataptr[DCTSIZE*6] = DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),
|
||||
CONST_BITS + OUT_SHIFT);
|
||||
|
||||
/* Odd part per figure 8 --- note paper omits factor of sqrt(2).
|
||||
* cK represents cos(K*pi/16).
|
||||
* i0..i3 in the paper are tmp4..tmp7 here.
|
||||
*/
|
||||
|
||||
z1 = tmp4 + tmp7;
|
||||
z2 = tmp5 + tmp6;
|
||||
z3 = tmp4 + tmp6;
|
||||
z4 = tmp5 + tmp7;
|
||||
z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
|
||||
|
||||
tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
|
||||
tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
|
||||
tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
|
||||
tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
|
||||
z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */
|
||||
z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
|
||||
z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
|
||||
z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */
|
||||
|
||||
z3 += z5;
|
||||
z4 += z5;
|
||||
|
||||
dataptr[DCTSIZE*7] = DESCALE(tmp4 + z1 + z3, CONST_BITS + OUT_SHIFT);
|
||||
dataptr[DCTSIZE*5] = DESCALE(tmp5 + z2 + z4, CONST_BITS + OUT_SHIFT);
|
||||
dataptr[DCTSIZE*3] = DESCALE(tmp6 + z2 + z3, CONST_BITS + OUT_SHIFT);
|
||||
dataptr[DCTSIZE*1] = DESCALE(tmp7 + z1 + z4, CONST_BITS + OUT_SHIFT);
|
||||
|
||||
dataptr++; /* advance pointer to next column */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* The secret of DCT2-4-8 is really simple -- you do the usual 1-DCT
|
||||
* on the rows and then, instead of doing even and odd, part on the columns
|
||||
* you do even part two times.
|
||||
*/
|
||||
GLOBAL(void)
|
||||
FUNC(ff_fdct248_islow)(int16_t *data)
|
||||
{
|
||||
int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||
int tmp10, tmp11, tmp12, tmp13;
|
||||
int z1;
|
||||
int16_t *dataptr;
|
||||
int ctr;
|
||||
|
||||
FUNC(row_fdct)(data);
|
||||
|
||||
/* Pass 2: process columns.
|
||||
* We remove the PASS1_BITS scaling, but leave the results scaled up
|
||||
* by an overall factor of 8.
|
||||
*/
|
||||
|
||||
dataptr = data;
|
||||
for (ctr = DCTSIZE-1; ctr >= 0; ctr--) {
|
||||
tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*1];
|
||||
tmp1 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3];
|
||||
tmp2 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*5];
|
||||
tmp3 = dataptr[DCTSIZE*6] + dataptr[DCTSIZE*7];
|
||||
tmp4 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*1];
|
||||
tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3];
|
||||
tmp6 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5];
|
||||
tmp7 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7];
|
||||
|
||||
tmp10 = tmp0 + tmp3;
|
||||
tmp11 = tmp1 + tmp2;
|
||||
tmp12 = tmp1 - tmp2;
|
||||
tmp13 = tmp0 - tmp3;
|
||||
|
||||
dataptr[DCTSIZE*0] = DESCALE(tmp10 + tmp11, OUT_SHIFT);
|
||||
dataptr[DCTSIZE*4] = DESCALE(tmp10 - tmp11, OUT_SHIFT);
|
||||
|
||||
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
|
||||
dataptr[DCTSIZE*2] = DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),
|
||||
CONST_BITS+OUT_SHIFT);
|
||||
dataptr[DCTSIZE*6] = DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),
|
||||
CONST_BITS+OUT_SHIFT);
|
||||
|
||||
tmp10 = tmp4 + tmp7;
|
||||
tmp11 = tmp5 + tmp6;
|
||||
tmp12 = tmp5 - tmp6;
|
||||
tmp13 = tmp4 - tmp7;
|
||||
|
||||
dataptr[DCTSIZE*1] = DESCALE(tmp10 + tmp11, OUT_SHIFT);
|
||||
dataptr[DCTSIZE*5] = DESCALE(tmp10 - tmp11, OUT_SHIFT);
|
||||
|
||||
z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100);
|
||||
dataptr[DCTSIZE*3] = DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865),
|
||||
CONST_BITS + OUT_SHIFT);
|
||||
dataptr[DCTSIZE*7] = DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065),
|
||||
CONST_BITS + OUT_SHIFT);
|
||||
|
||||
dataptr++; /* advance pointer to next column */
|
||||
}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -17,31 +17,57 @@ if CONFIG['FFVPX_ASFLAGS']:
|
|||
SharedLibrary('mozavcodec')
|
||||
SOURCES += [
|
||||
'allcodecs.c',
|
||||
'avdct.c',
|
||||
'avpacket.c',
|
||||
'bitstream.c',
|
||||
'bitstream_filters.c',
|
||||
'bsf.c',
|
||||
'codec_desc.c',
|
||||
'dct.c',
|
||||
'dct32_fixed.c',
|
||||
'dct32_float.c',
|
||||
'decode.c',
|
||||
'faandct.c',
|
||||
'faanidct.c',
|
||||
'fdctdsp.c',
|
||||
'fft_fixed.c',
|
||||
'fft_fixed_32.c',
|
||||
'fft_float.c',
|
||||
'fft_init_table.c',
|
||||
'flac.c',
|
||||
'flacdata.c',
|
||||
'flacdec.c',
|
||||
'flacdsp.c',
|
||||
'idctdsp.c',
|
||||
'jfdctfst.c',
|
||||
'jfdctint.c',
|
||||
'jrevdct.c',
|
||||
'log2_tab.c',
|
||||
'mpegaudio.c',
|
||||
'mpegaudiodata.c',
|
||||
'mpegaudiodec_fixed.c',
|
||||
'mpegaudiodecheader.c',
|
||||
'mpegaudiodsp.c',
|
||||
'mpegaudiodsp_data.c',
|
||||
'mpegaudiodsp_fixed.c',
|
||||
'mpegaudiodsp_float.c',
|
||||
'null_bsf.c',
|
||||
'options.c',
|
||||
'parser.c',
|
||||
'pthread.c',
|
||||
'pthread_frame.c',
|
||||
'pthread_slice.c',
|
||||
'rdft.c',
|
||||
'reverse.c',
|
||||
'simple_idct.c',
|
||||
'utils.c',
|
||||
'vorbis_parser.c',
|
||||
'xiph.c'
|
||||
]
|
||||
|
||||
if not CONFIG['MOZ_FFVPX_FLACONLY']:
|
||||
if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
|
||||
SOURCES += [
|
||||
'avpicture.c',
|
||||
'bitstream.c',
|
||||
'bitstream_filter.c',
|
||||
'golomb.c',
|
||||
'h264pred.c',
|
||||
|
@ -50,7 +76,6 @@ if not CONFIG['MOZ_FFVPX_FLACONLY']:
|
|||
'profiles.c',
|
||||
'qsv_api.c',
|
||||
'raw.c',
|
||||
'reverse.c',
|
||||
'videodsp.c',
|
||||
'vp56rac.c',
|
||||
'vp8.c',
|
||||
|
@ -74,8 +99,6 @@ if not CONFIG['MOZ_FFVPX_FLACONLY']:
|
|||
if CONFIG['MOZ_LIBAV_FFT']:
|
||||
SOURCES += [
|
||||
'avfft.c',
|
||||
'fft_float.c',
|
||||
'rdft.c',
|
||||
]
|
||||
|
||||
SYMBOLS_FILE = 'avcodec.symbols'
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* MPEG Audio common code
|
||||
* Copyright (c) 2001, 2002 Fabrice Bellard
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* MPEG Audio common code.
|
||||
*/
|
||||
|
||||
#include "mpegaudio.h"
|
||||
|
||||
|
||||
/* bitrate is in kb/s */
|
||||
int ff_mpa_l2_select_table(int bitrate, int nb_channels, int freq, int lsf)
|
||||
{
|
||||
int ch_bitrate, table;
|
||||
|
||||
ch_bitrate = bitrate / nb_channels;
|
||||
if (!lsf) {
|
||||
if ((freq == 48000 && ch_bitrate >= 56) ||
|
||||
(ch_bitrate >= 56 && ch_bitrate <= 80))
|
||||
table = 0;
|
||||
else if (freq != 48000 && ch_bitrate >= 96)
|
||||
table = 1;
|
||||
else if (freq != 32000 && ch_bitrate <= 48)
|
||||
table = 2;
|
||||
else
|
||||
table = 3;
|
||||
} else {
|
||||
table = 4;
|
||||
}
|
||||
return table;
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* copyright (c) 2001 Fabrice Bellard
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* mpeg audio declarations for both encoder and decoder.
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_MPEGAUDIO_H
|
||||
#define AVCODEC_MPEGAUDIO_H
|
||||
|
||||
#ifndef USE_FLOATS
|
||||
# define USE_FLOATS 0
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "libavutil/internal.h"
|
||||
|
||||
/* max frame size, in samples */
|
||||
#define MPA_FRAME_SIZE 1152
|
||||
|
||||
/* max compressed frame size */
|
||||
#define MPA_MAX_CODED_FRAME_SIZE 1792
|
||||
|
||||
#define MPA_MAX_CHANNELS 2
|
||||
|
||||
#define SBLIMIT 32 /* number of subbands */
|
||||
|
||||
#define MPA_STEREO 0
|
||||
#define MPA_JSTEREO 1
|
||||
#define MPA_DUAL 2
|
||||
#define MPA_MONO 3
|
||||
|
||||
#ifndef FRAC_BITS
|
||||
#define FRAC_BITS 23 /* fractional bits for sb_samples and dct */
|
||||
#define WFRAC_BITS 16 /* fractional bits for window */
|
||||
#endif
|
||||
|
||||
#define IMDCT_SCALAR 1.759
|
||||
|
||||
#define FRAC_ONE (1 << FRAC_BITS)
|
||||
|
||||
#define FIX(a) ((int)((a) * FRAC_ONE))
|
||||
|
||||
#if USE_FLOATS
|
||||
# define INTFLOAT float
|
||||
# define SUINTFLOAT float
|
||||
typedef float MPA_INT;
|
||||
typedef float OUT_INT;
|
||||
#elif FRAC_BITS <= 15
|
||||
# define INTFLOAT int
|
||||
# define SUINTFLOAT SUINT
|
||||
typedef int16_t MPA_INT;
|
||||
typedef int16_t OUT_INT;
|
||||
#else
|
||||
# define INTFLOAT int
|
||||
# define SUINTFLOAT SUINT
|
||||
typedef int32_t MPA_INT;
|
||||
typedef int16_t OUT_INT;
|
||||
#endif
|
||||
|
||||
int ff_mpa_l2_select_table(int bitrate, int nb_channels, int freq, int lsf);
|
||||
|
||||
#endif /* AVCODEC_MPEGAUDIO_H */
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* Header file for hardcoded mpegaudiodec tables
|
||||
*
|
||||
* Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVCODEC_MPEGAUDIO_TABLEGEN_H
|
||||
#define AVCODEC_MPEGAUDIO_TABLEGEN_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
#include "libavutil/attributes.h"
|
||||
|
||||
#define TABLE_4_3_SIZE (8191 + 16)*4
|
||||
#if CONFIG_HARDCODED_TABLES
|
||||
#define mpegaudio_tableinit()
|
||||
#include "libavcodec/mpegaudio_tables.h"
|
||||
#else
|
||||
static int8_t table_4_3_exp[TABLE_4_3_SIZE];
|
||||
static uint32_t table_4_3_value[TABLE_4_3_SIZE];
|
||||
static uint32_t exp_table_fixed[512];
|
||||
static uint32_t expval_table_fixed[512][16];
|
||||
static float exp_table_float[512];
|
||||
static float expval_table_float[512][16];
|
||||
|
||||
#define FRAC_BITS 23
|
||||
#define IMDCT_SCALAR 1.759
|
||||
|
||||
static av_cold void mpegaudio_tableinit(void)
|
||||
{
|
||||
int i, value, exponent;
|
||||
static const double exp2_lut[4] = {
|
||||
1.00000000000000000000, /* 2 ^ (0 * 0.25) */
|
||||
1.18920711500272106672, /* 2 ^ (1 * 0.25) */
|
||||
M_SQRT2 , /* 2 ^ (2 * 0.25) */
|
||||
1.68179283050742908606, /* 2 ^ (3 * 0.25) */
|
||||
};
|
||||
static double pow43_lut[16];
|
||||
double exp2_base = 2.11758236813575084767080625169910490512847900390625e-22; // 2^(-72)
|
||||
double exp2_val;
|
||||
double pow43_val = 0;
|
||||
for (i = 0; i < 16; ++i)
|
||||
pow43_lut[i] = i * cbrt(i);
|
||||
|
||||
for (i = 1; i < TABLE_4_3_SIZE; i++) {
|
||||
double f, fm;
|
||||
int e, m;
|
||||
double value = i / 4;
|
||||
if ((i & 3) == 0)
|
||||
pow43_val = value / IMDCT_SCALAR * cbrt(value);
|
||||
f = pow43_val * exp2_lut[i & 3];
|
||||
fm = frexp(f, &e);
|
||||
m = llrint(fm * (1LL << 31));
|
||||
e += FRAC_BITS - 31 + 5 - 100;
|
||||
|
||||
/* normalized to FRAC_BITS */
|
||||
table_4_3_value[i] = m;
|
||||
table_4_3_exp[i] = -e;
|
||||
}
|
||||
for (exponent = 0; exponent < 512; exponent++) {
|
||||
if (exponent && (exponent & 3) == 0)
|
||||
exp2_base *= 2;
|
||||
exp2_val = exp2_base * exp2_lut[exponent & 3] / IMDCT_SCALAR;
|
||||
for (value = 0; value < 16; value++) {
|
||||
double f = pow43_lut[value] * exp2_val;
|
||||
expval_table_fixed[exponent][value] = (f < 0xFFFFFFFF ? llrint(f) : 0xFFFFFFFF);
|
||||
expval_table_float[exponent][value] = f;
|
||||
}
|
||||
exp_table_fixed[exponent] = expval_table_fixed[exponent][1];
|
||||
exp_table_float[exponent] = expval_table_float[exponent][1];
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_HARDCODED_TABLES */
|
||||
|
||||
#endif /* AVCODEC_MPEGAUDIO_TABLEGEN_H */
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче