# 架构和特点

视频软件栈由一个客户端应用程序组成，该应用程序使用 V4L2 框架与 Adreno VPU 交互。下图显示了解码器和编码器的软件架构：

<!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->

<!-- Generated by Microsoft Visio, SVG Export Video-decoder-encoder-architecture.svg Page-1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="17.8264in" height="8.02257in" viewbox="0 0 1283.5 577.625" xml:space="preserve" color-interpolation-filters="sRGB" class="st27"><v:documentproperties v:langid="1033" v:viewmarkup="false">	<v:userdefs>		<v:ud v:nameu="msvNoAutoConnect" v:val="VT0(0):26"></v:ud>	</v:userdefs></v:documentproperties>
<style>.svg-1 .st1 { fill: #f7f8fa; stroke: #c8c8c8; stroke-width: 0.25 }
.svg-1 .st2 { fill: #acbacf; stroke: #666666; stroke-width: 0.25 }
.svg-1 .st3 { fill: #000000; font-family: Microsoft YaHei; font-size: 1.00001em }
.svg-1 .st4 { font-family: Arial; font-size: 1em }
.svg-1 .st5 { fill: #000000; font-family: Arial; font-size: 1.00001em }
.svg-1 .st6 { font-family: Microsoft YaHei; font-size: 1em }
.svg-1 .st7 { fill: #3253dc; stroke: #3253dc; stroke-width: 0.25 }
.svg-1 .st8 { fill: #ffffff; font-family: Arial; font-size: 1.00001em }
.svg-1 .st9 { stroke: #000000; stroke-dasharray: 7, 5; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st10 { fill: none; stroke: none; stroke-width: 0.25 }
.svg-1 .st11 { fill: #000000; font-family: Microsoft YaHei; font-size: 0.833336em; font-weight: bold }
.svg-1 .st12 { fill: none; stroke: #000000; stroke-width: 0.25 }
.svg-1 .st13 { fill: #ffffff; font-family: Arial; font-size: 0.833336em }
.svg-1 .st14 { marker-end: url("#mrkr4-45"); stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st15 { fill: #000000; fill-opacity: 1; stroke: #000000; stroke-opacity: 1; stroke-width: 0.28409090909091 }
.svg-1 .st16 { fill: #ffffff; stroke: none; stroke-linecap: butt; stroke-width: 7.2 }
.svg-1 .st17 { fill: #000000; font-family: Microsoft YaHei; font-size: 0.75em }
.svg-1 .st18 { font-size: 0.888885em }
.svg-1 .st19 { marker-start: url("#mrkr4-68"); stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st20 { fill: #000000; font-family: Arial; font-size: 0.75em }
.svg-1 .st21 { fill: #acbacf; stroke: #000000; stroke-width: 0.25 }
.svg-1 .st22 { fill: #000000; font-family: Arial; font-size: 0.833336em }
.svg-1 .st23 { fill: #ffffff; stroke: #666666; stroke-width: 0.25 }
.svg-1 .st24 { fill: #f7f8fa; font-family: Arial; font-size: 0.75em }
.svg-1 .st25 { font-family: Microsoft YaHei; font-size: 0.888885em }
.svg-1 .st26 { fill: #000000; font-family: Microsoft YaHei; font-size: 0.833336em }
.svg-1 .st27 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<defs id="Markers">	<g id="lend4">		<path d="M 2 1 L 0 0 L 2 -1 L 2 1 " style="stroke:none"></path>	</g>	<marker id="mrkr4-45" class="st15" v:arrowtype="4" v:arrowsize="2" v:setback="7.04" refx="-7.04" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend4" transform="scale(-3.52,-3.52) "></use>	</marker>	<marker id="mrkr4-68" class="st15" v:arrowtype="4" v:arrowsize="2" v:setback="6.68" refx="6.68" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend4" transform="scale(3.52) "></use>	</marker></defs><g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<v:userdefs>		<v:ud v:nameu="msvThemeOrder" v:val="VT0(0):26"></v:ud>	</v:userdefs>	<title>Page-1</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="0" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<v:layer v:name="Connector" v:index="0"></v:layer>	<v:layer v:name="Flowchart" v:index="1"></v:layer>	<g id="shape73-1" v:mid="73" v:groupcontext="shape" transform="translate(651.688,-9)">		<title>Sheet.73</title>		<rect x="0" y="14" width="626.312" height="563.625" class="st1"></rect>	</g>	<g id="shape72-3" v:mid="72" v:groupcontext="shape" transform="translate(18.5625,-10.1433)">		<title>Sheet.72</title>		<rect x="0" y="16.2865" width="626.312" height="561.338" class="st1"></rect>	</g>	<g id="shape1-5" v:mid="1" v:groupcontext="shape" transform="translate(64,-504.25)">		<title>Sheet.1</title>		<desc>应用程序V4L2、GStreamer</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="180" cy="550.625" width="360.01" height="54"></v:textrect>		<rect x="0" y="523.625" width="360" height="54" rx="9" ry="9" class="st2"></rect>		<text x="94.65" y="554.27" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>应用程序（<tspan class="st4">V4L2</tspan>、<tspan class="st4">GStreamer</tspan>）</text>		</g>	<g id="shape2-10" v:mid="2" v:groupcontext="shape" transform="translate(64,-288.25)">		<title>Sheet.2</title>		<desc>V4L2 框架</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="180" cy="550.625" width="360.01" height="54"></v:textrect>		<rect x="0" y="523.625" width="360" height="54" rx="9" ry="9" class="st2"></rect>		<text x="152.32" y="554.27" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>V4L2 <tspan class="st6">框架</tspan></text>		</g>	<g id="shape3-14" v:mid="3" v:groupcontext="shape" transform="translate(64,-162.25)">		<title>Sheet.3</title>		<desc>Adreno VPU 驱动程序</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="180" cy="550.625" width="360.01" height="54"></v:textrect>		<rect x="0" y="523.625" width="360" height="54" rx="9" ry="9" class="st7"></rect>		<text x="120.98" y="554.27" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Adreno VPU <tspan class="st6">驱动程序</tspan></text>		</g>	<g id="shape4-18" v:mid="4" v:groupcontext="shape" transform="translate(64,-36.25)">		<title>Sheet.4</title>		<desc>Adreno VPU</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="180" cy="550.625" width="360.01" height="54"></v:textrect>		<rect x="0" y="523.625" width="360" height="54" rx="9" ry="9" class="st7"></rect>		<text x="146.65" y="554.23" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Adreno VPU</text>		</g>	<g id="shape6-21" v:mid="6" v:groupcontext="shape" transform="translate(18.5,-371.5)">		<title>Sheet.6</title>		<path d="M0 577.63 L585.5 577.63" class="st9"></path>	</g>	<g id="shape7-24" v:mid="7" v:groupcontext="shape" transform="translate(18.5,-144.25)">		<title>Sheet.7</title>		<path d="M0 577.63 L585.5 577.63" class="st9"></path>	</g>	<g id="shape8-27" v:mid="8" v:groupcontext="shape" transform="translate(523,-371.5)">		<title>Sheet.8</title>		<desc>用户空间</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="40.5" cy="568.625" width="81" height="18"></v:textrect>		<rect x="0" y="559.625" width="81" height="18" class="st10"></rect>		<text x="20.5" y="571.67" class="st11" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>用户空间</text>		</g>	<g id="shape9-30" v:mid="9" v:groupcontext="shape" transform="translate(520.75,-145.5)">		<title>Sheet.9</title>		<desc>内核空间</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="40.5" cy="568.625" width="81" height="18"></v:textrect>		<rect x="0" y="559.625" width="81" height="18" class="st10"></rect>		<text x="20.5" y="571.67" class="st11" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>内核空间</text>		</g>	<g id="shape10-33" v:mid="10" v:groupcontext="shape" transform="translate(520.75,-123)">		<title>Sheet.10</title>		<desc>硬件</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="40.5" cy="568.625" width="81" height="18"></v:textrect>		<rect x="0" y="559.625" width="81" height="18" class="st10"></rect>		<text x="30.5" y="571.67" class="st11" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>硬件</text>		</g>	<g id="shape11-36" v:mid="11" v:groupcontext="shape" transform="translate(338.5,-45.25)">		<title>Sheet.11</title>		<desc>Adreno VPU 固件</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="40.5" cy="559.625" width="81" height="36"></v:textrect>		<rect x="0" y="541.625" width="81" height="36" rx="9" ry="9" class="st12"></rect>		<text x="12.71" y="556.54" class="st13" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Adreno VPU <tspan x="30.5" dy="1.212em" class="st6">固件</tspan></text>		</g>	<g id="shape26-40" v:mid="26" v:groupcontext="shape" transform="translate(785.625,73.375) rotate(90)">		<title>Sheet.26</title>		<desc>码流缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="81" cy="577.625" width="162.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M0 577.63 L154.96 577.63" class="st14"></path>		<rect v:rectcontext="textBkgnd" x="-595.625" y="75.5266" width="36" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-595.63" y="83.74" transform="rotate(-90)" class="st17" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>码流缓存</text>		</g>	<g id="shape27-48" v:mid="27" v:groupcontext="shape" transform="translate(785.625,289.375) rotate(90)">		<title>Sheet.27</title>		<desc>码流缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="36" cy="577.625" width="72.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M0 577.63 L64.96 577.63" class="st14"></path>		<rect v:rectcontext="textBkgnd" x="-595.625" y="30.5266" width="36" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-595.63" y="38.74" transform="rotate(-90)" class="st17" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>码流缓存</text>		</g>	<g id="shape28-55" v:mid="28" v:groupcontext="shape" transform="translate(785.625,415.375) rotate(90)">		<title>Sheet.28</title>		<desc>码流缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="36" cy="577.625" width="72.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M0 577.63 L64.96 577.63" class="st14"></path>		<rect v:rectcontext="textBkgnd" x="-594.625" y="30.5999" width="33.9999" height="10.7998" transform="rotate(-90)" class="st16"></rect>		<text x="-594.62" y="38.7" transform="rotate(-90)" class="st17" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>码流<tspan class="st18">缓存</tspan></text>		</g>	<g id="shape29-63" v:mid="29" v:groupcontext="shape" transform="translate(893.625,73.375) rotate(90)">		<title>Sheet.29</title>		<desc>YUV 缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="81" cy="577.625" width="162.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M6.68 577.63 L7.04 577.63 L162 577.63" class="st19"></path>		<rect v:rectcontext="textBkgnd" x="-597.128" y="75.5266" width="39.0059" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-597.13" y="83.74" transform="rotate(-90)" class="st20" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>YUV <tspan class="st6">缓存</tspan></text>		</g>	<g id="shape30-72" v:mid="30" v:groupcontext="shape" transform="translate(893.625,289.375) rotate(90)">		<title>Sheet.30</title>		<desc>YUV 缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="36" cy="577.625" width="72.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M6.68 577.63 L7.04 577.63 L72 577.63" class="st19"></path>		<rect v:rectcontext="textBkgnd" x="-597.128" y="30.5266" width="39.0059" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-597.13" y="38.74" transform="rotate(-90)" class="st20" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>YUV <tspan class="st6">缓存</tspan></text>		</g>	<g id="shape31-80" v:mid="31" v:groupcontext="shape" transform="translate(893.625,415.375) rotate(90)">		<title>Sheet.31</title>		<desc>YUV 缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="36" cy="577.625" width="72.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M6.68 577.63 L7.04 577.63 L72 577.63" class="st19"></path>		<rect v:rectcontext="textBkgnd" x="-597.128" y="30.5266" width="39.0059" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-597.13" y="38.74" transform="rotate(-90)" class="st20" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>YUV <tspan class="st6">缓存</tspan></text>		</g>	<g id="shape33-88" v:mid="33" v:groupcontext="shape" transform="translate(64,-441.25)">		<title>Sheet.33</title>		<desc>Demuxer</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="40.5" cy="568.625" width="81" height="18"></v:textrect>		<rect x="0" y="559.625" width="81" height="18" rx="9" ry="9" class="st21"></rect>		<text x="20.22" y="571.63" class="st22" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Demuxer</text>		</g>	<g id="shape34-91" v:mid="34" v:groupcontext="shape" transform="translate(64,-378.25)">		<title>Sheet.34</title>		<desc>FileSource</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="40.5" cy="568.625" width="81" height="18"></v:textrect>		<rect x="0" y="559.625" width="81" height="18" rx="9" ry="9" class="st12"></rect>		<text x="16.6" y="571.63" class="st22" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>FileSource</text>		</g>	<g id="shape35-94" v:mid="35" v:groupcontext="shape" transform="translate(496,-504.25)">		<title>Sheet.35</title>		<desc>显示</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="67.5" cy="550.625" width="135.01" height="54"></v:textrect>		<rect x="0" y="523.625" width="135" height="54" rx="9" ry="9" class="st23"></rect>		<text x="55.5" y="554.27" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>显示</text>		</g>	<g id="shape36-97" v:mid="36" v:groupcontext="shape" transform="translate(424,-531.25)">		<title>Sheet.36</title>		<desc>YUV 缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="36" cy="577.625" width="72.01" height="0"></v:textrect>		<path d="M0 577.63 L64.96 577.63" class="st14"></path>		<rect v:rectcontext="textBkgnd" x="16.4971" y="572.152" width="39.0059" height="10.9471" class="st16"></rect>		<text x="16.5" y="580.36" class="st20" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>YUV <tspan class="st6">缓存</tspan></text>		</g>	<g id="shape39-105" v:mid="39" v:groupcontext="shape" transform="translate(677.625,73.375) rotate(90)">		<title>Sheet.39</title>		<desc>码流缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="22.5" cy="577.625" width="45.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M6.68 577.63 L7.04 577.63 L45 577.63" class="st19"></path>		<rect v:rectcontext="textBkgnd" x="-595.625" y="17.0266" width="36" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-595.63" y="25.24" transform="rotate(-90)" class="st17" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>码流缓存</text>		</g>	<g id="shape44-112" v:mid="44" v:groupcontext="shape" transform="translate(677.625,136.375) rotate(90)">		<title>Sheet.44</title>		<desc>容器文件</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="22.5" cy="577.625" width="45.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M6.68 577.63 L7.04 577.63 L45 577.63" class="st19"></path>		<rect v:rectcontext="textBkgnd" x="-595.625" y="17.0266" width="36" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-595.63" y="25.24" transform="rotate(-90)" class="st17" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>容器文件</text>		</g>	<g id="shape48-119" v:mid="48" v:groupcontext="shape" transform="translate(673.5,-505.375)">		<title>Sheet.48</title>		<desc>应用程序V4L2、GStreamer</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="180" cy="550.625" width="360.01" height="54"></v:textrect>		<rect x="0" y="523.625" width="360" height="54" rx="9" ry="9" class="st2"></rect>		<text x="94.65" y="554.27" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>应用程序（<tspan class="st4">V4L2</tspan>、<tspan class="st4">GStreamer</tspan>）</text>		</g>	<g id="shape49-124" v:mid="49" v:groupcontext="shape" transform="translate(673.5,-288.25)">		<title>Sheet.49</title>		<desc>V4L2 框架</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="180" cy="550.625" width="360.01" height="54"></v:textrect>		<rect x="0" y="523.625" width="360" height="54" rx="9" ry="9" class="st2"></rect>		<text x="152.32" y="554.27" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>V4L2 <tspan class="st6">框架</tspan></text>		</g>	<g id="shape50-128" v:mid="50" v:groupcontext="shape" transform="translate(673.5,-162.25)">		<title>Sheet.50</title>		<desc>Adreno VPU 驱动程序</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="180" cy="550.625" width="360.01" height="54"></v:textrect>		<rect x="0" y="523.625" width="360" height="54" rx="9" ry="9" class="st7"></rect>		<text x="120.98" y="554.27" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Adreno VPU <tspan class="st6">驱动程序</tspan></text>		</g>	<g id="shape51-132" v:mid="51" v:groupcontext="shape" transform="translate(673.5,-36.25)">		<title>Sheet.51</title>		<desc>Adreno VPU</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="180" cy="550.625" width="360.01" height="54"></v:textrect>		<rect x="0" y="523.625" width="360" height="54" rx="9" ry="9" class="st7"></rect>		<text x="146.65" y="554.23" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Adreno VPU</text>		</g>	<g id="shape52-135" v:mid="52" v:groupcontext="shape" transform="translate(659.5,-371.5)">		<title>Sheet.52</title>		<path d="M0 577.63 L578.75 577.63" class="st9"></path>	</g>	<g id="shape53-138" v:mid="53" v:groupcontext="shape" transform="translate(659.5,-145.375)">		<title>Sheet.53</title>		<path d="M0 577.63 L578.75 577.63" class="st9"></path>	</g>	<g id="shape54-141" v:mid="54" v:groupcontext="shape" transform="translate(1157.25,-371.5)">		<title>Sheet.54</title>		<desc>用户空间</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="40.5" cy="568.625" width="81" height="18"></v:textrect>		<rect x="0" y="559.625" width="81" height="18" class="st10"></rect>		<text x="20.5" y="571.67" class="st11" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>用户空间</text>		</g>	<g id="shape55-144" v:mid="55" v:groupcontext="shape" transform="translate(1159.5,-146.125)">		<title>Sheet.55</title>		<desc>内核空间</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="40.5" cy="568.625" width="81" height="18"></v:textrect>		<rect x="0" y="559.625" width="81" height="18" class="st10"></rect>		<text x="20.5" y="571.67" class="st11" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>内核空间</text>		</g>	<g id="shape56-147" v:mid="56" v:groupcontext="shape" transform="translate(1159.5,-125.5)">		<title>Sheet.56</title>		<desc>硬件</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="40.5" cy="568.625" width="81" height="18"></v:textrect>		<rect x="0" y="559.625" width="81" height="18" class="st10"></rect>		<text x="30.5" y="571.67" class="st11" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>硬件</text>		</g>	<g id="shape57-150" v:mid="57" v:groupcontext="shape" transform="translate(948,-45.25)">		<title>Sheet.57</title>		<desc>Adreno VPU 固件</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="40.5" cy="559.625" width="81" height="36"></v:textrect>		<rect x="0" y="541.625" width="81" height="36" rx="9" ry="9" class="st12"></rect>		<text x="12.71" y="556.54" class="st13" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Adreno VPU <tspan x="30.5" dy="1.212em" class="st6">固件</tspan></text>		</g>	<g id="shape58-154" v:mid="58" v:groupcontext="shape" transform="translate(1193.25,-18.25)">		<title>Sheet.58</title>		<rect x="0" y="559.625" width="63" height="18" rx="9" ry="9" class="st2"></rect>	</g>	<g id="shape59-156" v:mid="59" v:groupcontext="shape" transform="translate(1116.75,-18.5)">		<title>Sheet.59</title>		<rect x="0" y="559.625" width="63" height="18" rx="9" ry="9" class="st7"></rect>	</g>	<g id="shape60-158" v:mid="60" v:groupcontext="shape" transform="translate(1116.5,-18.25)">		<title>Sheet.60</title>		<desc>Qualcomm</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="31.5" cy="568.625" width="63" height="18"></v:textrect>		<rect x="0" y="559.625" width="63" height="18" class="st10"></rect>		<text x="9.74" y="571.32" class="st24" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Qualcomm</text>		</g>	<g id="shape61-161" v:mid="61" v:groupcontext="shape" transform="translate(1193,-18.25)">		<title>Sheet.61</title>		<desc>开源</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="31.5" cy="568.625" width="63" height="18"></v:textrect>		<rect x="0" y="559.625" width="63" height="18" class="st10"></rect>		<text x="22.5" y="571.36" class="st17" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>开源</text>		</g>	<g id="shape62-164" v:mid="62" v:groupcontext="shape" transform="translate(1395.13,72.25) rotate(90)">		<title>Sheet.62</title>		<desc>YUV 缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="82.3125" cy="577.625" width="164.63" height="0" transform="rotate(-90)"></v:textrect>		<path d="M0 577.63 L157.59 577.63" class="st14"></path>		<rect v:rectcontext="textBkgnd" x="-597.128" y="76.8391" width="39.0059" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-597.13" y="85.05" transform="rotate(-90)" class="st20" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>YUV <tspan class="st6">缓存</tspan></text>		</g>	<g id="shape63-172" v:mid="63" v:groupcontext="shape" transform="translate(1395.13,289.375) rotate(90)">		<title>Sheet.63</title>		<desc>YUV 缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="36" cy="577.625" width="72.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M0 577.63 L64.96 577.63" class="st14"></path>		<rect v:rectcontext="textBkgnd" x="-597.128" y="30.5266" width="39.0059" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-597.13" y="38.74" transform="rotate(-90)" class="st20" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>YUV <tspan class="st6">缓存</tspan></text>		</g>	<g id="shape64-180" v:mid="64" v:groupcontext="shape" transform="translate(1395.13,415.375) rotate(90)">		<title>Sheet.64</title>		<desc>YUV缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="36" cy="577.625" width="72.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M0 577.63 L64.96 577.63" class="st14"></path>		<rect v:rectcontext="textBkgnd" x="-594.878" y="30.5999" width="34.5053" height="10.7998" transform="rotate(-90)" class="st16"></rect>		<text x="-594.88" y="38.7" transform="rotate(-90)" class="st20" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>YUV<tspan class="st25">缓存</tspan></text>		</g>	<g id="shape65-188" v:mid="65" v:groupcontext="shape" transform="translate(1503.13,72.25) rotate(90)">		<title>Sheet.65</title>		<desc>码流缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="81.5625" cy="577.625" width="163.13" height="0" transform="rotate(-90)"></v:textrect>		<path d="M6.68 577.63 L7.04 577.63 L163.13 577.63" class="st19"></path>		<rect v:rectcontext="textBkgnd" x="-595.625" y="76.0891" width="36" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-595.63" y="84.3" transform="rotate(-90)" class="st17" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>码流缓存</text>		</g>	<g id="shape66-195" v:mid="66" v:groupcontext="shape" transform="translate(1503.13,289.375) rotate(90)">		<title>Sheet.66</title>		<desc>码流缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="36" cy="577.625" width="72.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M6.68 577.63 L7.04 577.63 L72 577.63" class="st19"></path>		<rect v:rectcontext="textBkgnd" x="-595.625" y="30.5266" width="36" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-595.63" y="38.74" transform="rotate(-90)" class="st17" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>码流缓存</text>		</g>	<g id="shape67-202" v:mid="67" v:groupcontext="shape" transform="translate(1503.13,415.375) rotate(90)">		<title>Sheet.67</title>		<desc>码流缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="36" cy="577.625" width="72.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M6.68 577.63 L7.04 577.63 L72 577.63" class="st19"></path>		<rect v:rectcontext="textBkgnd" x="-595.625" y="30.5266" width="36" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-595.63" y="38.74" transform="rotate(-90)" class="st17" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>码流缓存</text>		</g>	<g id="shape68-209" v:mid="68" v:groupcontext="shape" transform="translate(673.5,-442.375)">		<title>Sheet.68</title>		<desc>摄像头源</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="40.5" cy="568.625" width="81" height="18"></v:textrect>		<rect x="0" y="559.625" width="81" height="18" rx="9" ry="9" class="st12"></rect>		<text x="20.5" y="571.67" class="st26" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>摄像头源</text>		</g>	<g id="shape69-212" v:mid="69" v:groupcontext="shape" transform="translate(1130.25,-505.375)">		<title>Sheet.69</title>		<desc>FileMuxer</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="67.5" cy="550.625" width="135.01" height="54"></v:textrect>		<rect x="0" y="523.625" width="135" height="54" rx="9" ry="9" class="st2"></rect>		<text x="41.16" y="554.23" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>FileMuxer</text>		</g>	<g id="shape70-215" v:mid="70" v:groupcontext="shape" transform="translate(1033.5,-532.375)">		<title>Sheet.70</title>		<desc>码流缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="48.375" cy="577.625" width="96.76" height="0"></v:textrect>		<path d="M0 577.63 L89.71 577.63" class="st14"></path>		<rect v:rectcontext="textBkgnd" x="30.375" y="572.152" width="36" height="10.9471" class="st16"></rect>		<text x="30.37" y="580.36" class="st17" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>码流缓存</text>		</g>	<g id="shape71-222" v:mid="71" v:groupcontext="shape" transform="translate(1287.12,72.25) rotate(90)">		<title>Sheet.71</title>		<desc>YUV 缓存</desc>		<v:textblock v:margins="rect(2,2,2,2)"></v:textblock>		<v:textrect cx="22.5" cy="577.625" width="45.01" height="0" transform="rotate(-90)"></v:textrect>		<path d="M6.68 577.63 L7.04 577.63 L45 577.63" class="st19"></path>		<rect v:rectcontext="textBkgnd" x="-597.128" y="17.0266" width="39.0059" height="10.9471" transform="rotate(-90)" class="st16"></rect>		<text x="-597.13" y="25.24" transform="rotate(-90)" class="st20" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>YUV <tspan class="st6">缓存</tspan></text>		</g></g>
</svg>

**图：视频解码器和编码器软件架构**

下表列出了视频软件架构的组件：

| 组件 | 说明 |
| --- | --- |
| 用户应用程序 | 它与基于 GStreamer/V4L2 的解码器的文件源和编码器的摄像头源进行交互 |
| V4L2 框架 | <ul class="simple"><br><li><p>与用户应用程序和 Adreno VPU 驱动程序交互</p></li><br><li><p>负责处理事件、回调和缓存管理</p></li><br></ul> |
| Adreno VPU 驱动程序 | <ul class="simple"><br><li><p>用作视频内核模式驱动程序 (KMD) 的入口点</p></li><br><li><p>控制 Adreno VPU 的编码器和解码器的通用驱动程序</p></li><br><li><p>使用主机固件接口 (HFI) 管理视频驱动程序状态机、缓存分配、时钟/总线管理以及与 Adreno VPU 的通信</p></li><br></ul> |
| Adreno VPU | 用作硬件加速引擎，可以最低的功耗执行视频解码和编码操作 |

## 功能

Adreno VPU 提供以下视频解码和编码功能：

| 用例 | 功能 | QCS6490 | QCS9075/QCS8275 |
| --- | --- | --- | --- |
| **Codec** | H.264（8 位解码器） | ✔ | ✔ |
| **Codec** | HEVC（8 位解码器） | ✔ | ✔ |
| **Codec** | HEVC（10 位解码器） | ✔ | ✔ |
| **Codec** | VP9（8 位解码器） | ✔ | ✔ |
| **Codec** | VP9（10 位解码器） | ✔ | ✔ |
| **Codec** | AV1（8 位解码器） | ✖ | ✔ |
| **Codec** | AV1（10 位解码器） | ✖ | ✔ |
| **Codec** | H.264（8 位编码器） | ✔ | ✔ |
| **Codec** | HEVC（8 位编码器） | ✔ | ✔ |
| **功能** | [B 帧编码](https://docs.qualcomm.com/doc/80-70017-20SC/topic/feature-descriptions.html#beframeencode) | ✔ | ✔ |
| **功能** | [编码器初始 QP 覆盖](https://docs.qualcomm.com/doc/80-70017-20SC/topic/feature-descriptions.html#qpoverride) | ✔ | ✔ |
| **功能** | [分层 P 帧编码](https://docs.qualcomm.com/doc/80-70017-20SC/topic/feature-descriptions.html#hierarchical) | ✔ | ✖ |
| **功能** | [分片编码](https://docs.qualcomm.com/doc/80-70017-20SC/topic/feature-descriptions.html#sliceencode) | ✔ | ✖ |
| **功能** | [内部刷新](https://docs.qualcomm.com/doc/80-70017-20SC/topic/feature-descriptions.html#interarefresh) | ✔ | ✖ |
| **功能** | [预处理](https://docs.qualcomm.com/doc/80-70017-20SC/topic/feature-descriptions.html#videoencoder) | ✔ | ✖ |
| **功能** | [码率控制](https://docs.qualcomm.com/doc/80-70017-20SC/topic/feature-descriptions.html#ratecontrol) | ✔ | ✔ |
| **功能** | [长期参考帧 (LTR)](https://docs.qualcomm.com/doc/80-70017-20SC/topic/feature-descriptions.html#longterm) | ✔ | ✖ |
| **功能** | [动态属性](https://docs.qualcomm.com/doc/80-70017-20SC/topic/feature-descriptions.html#dynamicencoder) | ✔ | ✔ |
| **并发** | 多实例支持 | ✔ | ✔ |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |

## 视频功能和特性

Tab QCS6490
Tab QCS8275
Tab QCS9075

QCS6490 上的 Adreno VPU 是第六代视频处理单元，具有以下功能：

> 
> 
> | 功能 | 能力 |
> | --- | --- |
> | 视频解码 | H.264/HEVC/VP9：最高 4096 × 2160 (60 fps) |
> | 视频编码 | H.264/HEVC：最高 4096 × 2160 (30 fps) |
> | 多通道能力 | <ul class="simple"><br><li><p>8 路 1920 × 1088 (30 fps 解码)</p></li><br><li><p>16 路 1280 × 720 (30 fps 解码)</p></li><br><li><p>4 路 1920 × 1088 (30 fps 编码)</p></li><br><li><p>8 路 1280 × 720 (30 fps 编码)</p></li><br></ul> |
> | 高帧率采集 | 1280 × 720 (480 fps) 或 1920 × 1088 (240 fps) |
> | 每秒最大宏块数 | 2088960<br><br><br>可以使用以下公式计算每秒的最大宏块数：<br><br><br>（对齐宽度 × 对齐高度 × fps）/（宏块大小）<br><br><br>例如，(4096×2176×60)/256=2088960 |

QCS8275 上的 Adreno VPU 是第七代视频处理单元，具有以下功能：

> 
> 
> | **功能** | **能力** |
> | --- | --- |
> | 视频解码 | <ul class="simple"><br><li><p>H.264/HEVC/VP9：最高 3840 × 2160 (120 fps)</p></li><br><li><p>AV1：最高 3840 × 2160 (60 fps)</p></li><br></ul> |
> | 视频编码 | H.264/HEVC：最高 4096 × 2160 (60 fps) |
> | 多通道能力 | <ul class="simple"><br><li><p>16 路 1920 × 1088 (30 fps 解码)</p></li><br><li><p>16 路 1280 × 720 (30 fps 编码)</p></li><br></ul> |
> | 高帧率采集 | 1920 × 1088 (240 fps) 或 3840 × 2160 (60 fps) |
> | 每秒最大宏块数 | 3916800<br><br><br><br>> <br>> <br>> 可以使用以下公式计算每秒的最大宏块数：<br>> <br>> <br>> （对齐宽度 × 对齐高度 × fps）/（宏块大小）<br>> <br>> <br>> 例如，(3840 × 2176 × 120)/256 = 3916800 |

QCS9075 上的 Adreno VPU 是第七代视频处理单元，具有以下功能：

| 功能 | 能力 |
| --- | --- |
| 视频解码 | <ul class="simple"><br><li><p>H.264/HEVC/AV1：最高 7680 × 4320 (60 fps)；或者 3840 × 2160 (240 fps)。</p></li><br><li><p>VP9：最高 3840 × 2160 (240 fps)</p></li><br></ul> |
| 视频编码 | H.264/HEVC：最高 7680 × 4320 (30 fps) |
| 多通道能力 | <ul class="simple"><br><li><p>24 路 1920 × 1088 (30 fps 解码/编码)</p></li><br><li><p>8 路 3840 × 2160 (30 fps 解码)</p></li><br></ul> |
| 高帧率录制 | 1920 x 1088 (480 fps) 或 3840 × 2160 (120 fps) |
| 每秒最大宏块数 | 7833600<br><br><br><br>> <br>> <br>> 可以使用以下公式计算每秒的最大宏块数：<br>> <br>> <br>> （对齐宽度 × 对齐高度 × fps）/（宏块大小）<br>> <br>> <br>> 例如，(3840 × 2176 × 240)/256 = 7833600 |

Last Published: Jan 24, 2025

[Previous Topic
入门指南](https://docs.qualcomm.com/bundle/publicresource/80-70017-20SC/topics/getting-started.md) [Next Topic
API 和示例应用程序](https://docs.qualcomm.com/bundle/publicresource/80-70017-20SC/topics/interfaces.md)

Source: [https://docs.qualcomm.com/doc/80-70017-20SC/topic/architecture.html](https://docs.qualcomm.com/doc/80-70017-20SC/topic/architecture.html)