Skip to content

Commit 977b660

Browse files
tnarine-amdjstewart-amd
authored andcommitted
Initial commit
1 parent 16d5162 commit 977b660

File tree

1,660 files changed

+354455
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,660 files changed

+354455
-0
lines changed

LICENSE.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Notice Regarding Standards. AMD does not provide a license or sublicense to
2+
any Intellectual Property Rights relating to any standards, including but not
3+
limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4;
4+
AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and MP3
5+
(collectively, the "Media Technologies"). For clarity, you will pay any
6+
royalties due for such third party technologies, which may include the Media
7+
Technologies that are owed as a result of AMD providing the Software to you.
8+
9+
This software uses libraries from the FFmpeg project under the LGPLv2.1.
10+
11+
MIT license
12+
13+
Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
14+
15+
Permission is hereby granted, free of charge, to any person obtaining a copy
16+
of this software and associated documentation files (the "Software"), to deal
17+
in the Software without restriction, including without limitation the rights
18+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19+
copies of the Software, and to permit persons to whom the Software is
20+
furnished to do so, subject to the following conditions:
21+
22+
The above copyright notice and this permission notice shall be included in
23+
all copies or substantial portions of the Software.
24+
25+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31+
THE SOFTWARE.

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Advanced Media Framework (AMF) SDK
2+
3+
AMF is a light-weight, portable multimedia framework that abstracts away most of the platform and API-specific details and allows for easy implementation of multimedia applications using a variety of technologies, such as DirectX 11, OpenGL, and OpenCL and facilitates an efficient interop between them.
4+
5+
### Prerequisites
6+
* Windows® 7 (SP1 with the [Platform Update](https://msdn.microsoft.com/en-us/library/windows/desktop/jj863687.aspx)), Windows® 8.1, or Windows® 10
7+
* Visual Studio® 2013 or Visual Studio® 2015
8+
* Windows 10 SDK (Version 10586)
9+
* AMD Radeon Software Crimson Edition 16.7.3 (16.30.2311) or newer
10+
* Some samples require the AMD APP SDK (Version 3.0 or later)
11+
* Some samples require the Microsoft Foundation Class Library (MFC)
12+
13+
The AMF framework is compatible with most recent Radeon GPUs starting with the Southern Islands family and APUs of the Kabini, Kaveri, Carrizo families and newer.
14+
15+
### Getting Started
16+
* Visual Studio solutions can be found in the `amf\public\samples` directory.
17+
* Additional documentation can be found in the `amf\doc` directory.
18+
19+
### Third-Party Software
20+
* FFmpeg is distributed under the terms of the LGPLv2.1.
21+
22+
### Attribution
23+
* AMD, the AMD Arrow logo, Radeon, and combinations thereof are either registered trademarks or trademarks of Advanced Micro Devices, Inc. in the United States and/or other countries.
24+
* Microsoft, DirectX, Visual Studio, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
25+
* OpenGL and the oval logo are trademarks or registered trademarks of Silicon Graphics, Inc. in the United States and/or other countries worldwide.
26+
* OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.
231 KB
Binary file not shown.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
./get_sourcecode
3+
./scripts/ffmpeg-build-win release 32
4+
./scripts/ffmpeg-build-win debug 32
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
./get_sourcecode
3+
./scripts/ffmpeg-build-win release 64
4+
./scripts/ffmpeg-build-win debug 64
8.47 MB
Binary file not shown.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
download_extract () {
3+
local archive_name="$1"
4+
local download_url="$2"
5+
local archive_type="$3"
6+
shift 3
7+
if [[ ! -e "$archive_name" ]]; then
8+
wget -nc -O "$archive_name" "$download_url" --no-check-certificate
9+
tar -xv"$archive_type"f "$archive_name"
10+
rm "$archive_name"
11+
fi
12+
}
13+
14+
mkdir src
15+
cd src
16+
download_extract "ffmpeg-3.0.2.tar.bz2" "http://ffmpeg.org/releases/ffmpeg-3.0.2.tar.bz2" "j"
17+
cd ..
18+
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+
30+
31+
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
#!/bin/bash
2+
#--------------------------------------------------------
3+
# FOLDERS CONFIG
4+
#--------------------------------------------------------
5+
6+
#flags to comment out parts of the build
7+
8+
build_ffmpeg=true
9+
build_redist=true
10+
11+
# build_type: debug. release
12+
# bitness: 32, 64
13+
14+
build_type=$1
15+
bitness=$2
16+
17+
fldr_mingw32=/mingw32
18+
fldr_mingw64=/mingw64
19+
20+
fldr_build=$PWD/build
21+
fldr_redist=$PWD/redist
22+
23+
fldr_src_ffmpeg=$PWD/src/ffmpeg-3.0.2
24+
25+
26+
#--------------------------------------------------------
27+
# FLAGS CONFIG
28+
#--------------------------------------------------------
29+
30+
if [ "$bitness" = "32" ]
31+
then
32+
fldr_mingw=$fldr_mingw32
33+
bld_arch=x86
34+
lib_arch=X86
35+
flg_output=win32
36+
host_def=i686-w64-mingw32
37+
cross_def=i686-w64-mingw32
38+
target_def=i686-w64-mingw32
39+
else
40+
fldr_mingw=$fldr_mingw64
41+
bld_arch=x86_64
42+
lib_arch=X64
43+
flg_output=x64
44+
host_def=x86_64-w64-mingw32
45+
cross_def=i686-w64-mingw32
46+
target_def=x86_64-w64-mingw32
47+
fi
48+
49+
# switch apth to mingw
50+
export PATH=.:/local/bin:/bin:${fldr_mingw}/bin:$PATH
51+
52+
if test "$build_type" == "release"
53+
then
54+
echo ++release
55+
debug_flags=--disable-debug
56+
57+
else
58+
echo ++debug
59+
#MM --disable-optimizations cause link failures. FFMPEG uses if(0) foo(); construct to exclude foo() function from the build. MSVC doesn't remove call to foo() in debug mode.
60+
# debug_flags="--disable-optimizations --disable-mmx --disable-mmxext --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --enable-debug=3 "
61+
# debug_flags="--disable-optimizations --enable-debug=3 "
62+
# debug_flags+=--extra-cflags="-Od"
63+
debug_flags=--disable-debug
64+
fi
65+
66+
echo fldr_mingw=$fldr_mingw
67+
echo build_type=$build_type
68+
echo bitness=$bitness
69+
echo lib_arch=$lib_arch
70+
echo fldr_build=$fldr_build
71+
echo host_def=$host_def
72+
echo debug_flags=$debug_flags
73+
74+
75+
LDFLAGS="$LDFLAGS -static-libgcc"
76+
77+
78+
#--------------------------------------------------------
79+
#create def and lib file from dll
80+
#--------------------------------------------------------
81+
function make_def_and_lib_from_dll
82+
{
83+
dllname=$1
84+
libname=$2
85+
86+
rm ${libname}.txt
87+
rm ${libname}.def
88+
rm ${libname}
89+
90+
dumpbin -exports ${dllname} > ${libname}.txt
91+
92+
echo EXPORTS >> ${libname}.def
93+
94+
sed -e '1,19d' ${libname}.txt |
95+
while read line; do
96+
eval array=($line)
97+
if [ "${array[3]}" != "" ]
98+
then
99+
echo ${array[3]}>> ${libname}.def
100+
fi
101+
done
102+
103+
lib.exe -MACHINE:${lib_arch} -DEF:"${libname}.def" -OUT:"${libname}" -NAME:"${dllname}"
104+
}
105+
106+
107+
108+
#--------------------------------------------------------
109+
# FFMPEG
110+
#--------------------------------------------------------
111+
112+
if [ "$build_ffmpeg" = "true" ]
113+
then
114+
115+
export PKG_CONFIG_PATH=/local/lib/pkgconfig
116+
117+
fld_build_full_path=$fldr_build/ffmpeg-$flg_output/$build_type
118+
119+
mkdir -p $fld_build_full_path
120+
121+
cd $fld_build_full_path
122+
123+
make clean
124+
125+
#Linux crosscompile
126+
#PATH=$fldr_mingw/bin:$PATH
127+
#$fldr_src_ffmpeg/configure --enable-memalign-hack --arch=$bld_arch --target-os=mingw32 --disable-static --enable-shared --pkg-config=pkg-config --enable-version3 --enable-avresample --enable-runtime-cpudetect --enable-gpl --enable-nonfree --extra-cflags="-I $fldr_mingw/include" --extra-ldflags="-L $fldr_mingw/lib -static-libgcc" --disable-debug --disable-iconv
128+
129+
130+
#MSVC2013 build
131+
132+
$fldr_src_ffmpeg/configure --toolchain=msvc --enable-memalign-hack --arch=$bld_arch --target-os=win32 --disable-static --enable-shared --pkg-config=pkg-config --enable-version3 --enable-avresample --enable-runtime-cpudetect --disable-iconv --extra-cflags="-Z7 -Ic:/msys${fldr_mingw}/include" --extra-ldflags="-DEBUG" $debug_flags
133+
#--extra-ldflags="-DEBUG $debug_flags"
134+
#-LIBPATH:C:\msys\mingw64\lib"
135+
136+
make
137+
138+
fi #build_ffmpeg=true
139+
140+
#--------------------------------------------------------
141+
# MAKE REDIST
142+
#--------------------------------------------------------
143+
144+
if [ "$build_redist" = "true" ]
145+
then
146+
fldr_include=$fldr_redist/$flg_output/$build_type/include
147+
fldr_lib=$fldr_redist/$flg_output/$build_type/lib
148+
fldr_bin=$fldr_redist/$flg_output/$build_type/bin
149+
150+
echo include: $fldr_include
151+
152+
mkdir -p $fldr_include
153+
mkdir -p $fldr_lib
154+
mkdir -p $fldr_bin
155+
156+
cd $fldr_src_ffmpeg
157+
find ./ -type f -name "*.h" -exec cp --parents {} $fldr_include/"$name" \;
158+
cd $fldr_build/ffmpeg-$flg_output/$build_type
159+
find ./ -name "*.dll" -type f -exec cp {} $fldr_bin \;
160+
find ./ -name "*.exe" -type f -exec cp {} $fldr_bin \;
161+
find ./ -name "*.pdb" -type f -exec cp {} $fldr_bin \;
162+
find ./ -name "*.lib" -type f -exec cp {} $fldr_lib \;
163+
cd $fldr_build/ffmpeg-$flg_output/$build_type
164+
find ./ -type f -name "*.h" -exec cp --parents {} $fldr_include/"$name" \;
165+
166+
fi # build_redist=true
167+
11.3 MB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)