ext-ctrls-codec-stateless.rst 135 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: V4L
  3. .. _codec-stateless-controls:
  4. *********************************
  5. Stateless Codec Control Reference
  6. *********************************
  7. The Stateless Codec control class is intended to support
  8. stateless decoder and encoders (i.e. hardware accelerators).
  9. These drivers are typically supported by the :ref:`stateless_decoder`,
  10. and deal with parsed pixel formats such as V4L2_PIX_FMT_H264_SLICE.
  11. Stateless Codec Control ID
  12. ==========================
  13. .. _codec-stateless-control-id:
  14. ``V4L2_CID_CODEC_STATELESS_CLASS (class)``
  15. The Stateless Codec class descriptor.
  16. .. _v4l2-codec-stateless-h264:
  17. ``V4L2_CID_STATELESS_H264_SPS (struct)``
  18. Specifies the sequence parameter set (as extracted from the
  19. bitstream) for the associated H264 slice data. This includes the
  20. necessary parameters for configuring a stateless hardware decoding
  21. pipeline for H264. The bitstream parameters are defined according
  22. to :ref:`h264`, section 7.4.2.1.1 "Sequence Parameter Set Data
  23. Semantics". For further documentation, refer to the above
  24. specification, unless there is an explicit comment stating
  25. otherwise.
  26. .. c:type:: v4l2_ctrl_h264_sps
  27. .. raw:: latex
  28. \small
  29. .. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}|
  30. .. flat-table:: struct v4l2_ctrl_h264_sps
  31. :header-rows: 0
  32. :stub-columns: 0
  33. :widths: 1 1 2
  34. * - __u8
  35. - ``profile_idc``
  36. -
  37. * - __u8
  38. - ``constraint_set_flags``
  39. - See :ref:`Sequence Parameter Set Constraints Set Flags <h264_sps_constraints_set_flags>`
  40. * - __u8
  41. - ``level_idc``
  42. -
  43. * - __u8
  44. - ``seq_parameter_set_id``
  45. -
  46. * - __u8
  47. - ``chroma_format_idc``
  48. -
  49. * - __u8
  50. - ``bit_depth_luma_minus8``
  51. -
  52. * - __u8
  53. - ``bit_depth_chroma_minus8``
  54. -
  55. * - __u8
  56. - ``log2_max_frame_num_minus4``
  57. -
  58. * - __u8
  59. - ``pic_order_cnt_type``
  60. -
  61. * - __u8
  62. - ``log2_max_pic_order_cnt_lsb_minus4``
  63. -
  64. * - __u8
  65. - ``max_num_ref_frames``
  66. -
  67. * - __u8
  68. - ``num_ref_frames_in_pic_order_cnt_cycle``
  69. -
  70. * - __s32
  71. - ``offset_for_ref_frame[255]``
  72. -
  73. * - __s32
  74. - ``offset_for_non_ref_pic``
  75. -
  76. * - __s32
  77. - ``offset_for_top_to_bottom_field``
  78. -
  79. * - __u16
  80. - ``pic_width_in_mbs_minus1``
  81. -
  82. * - __u16
  83. - ``pic_height_in_map_units_minus1``
  84. -
  85. * - __u32
  86. - ``flags``
  87. - See :ref:`Sequence Parameter Set Flags <h264_sps_flags>`
  88. .. raw:: latex
  89. \normalsize
  90. .. _h264_sps_constraints_set_flags:
  91. ``Sequence Parameter Set Constraints Set Flags``
  92. .. cssclass:: longtable
  93. .. flat-table::
  94. :header-rows: 0
  95. :stub-columns: 0
  96. :widths: 1 1 2
  97. * - ``V4L2_H264_SPS_CONSTRAINT_SET0_FLAG``
  98. - 0x00000001
  99. -
  100. * - ``V4L2_H264_SPS_CONSTRAINT_SET1_FLAG``
  101. - 0x00000002
  102. -
  103. * - ``V4L2_H264_SPS_CONSTRAINT_SET2_FLAG``
  104. - 0x00000004
  105. -
  106. * - ``V4L2_H264_SPS_CONSTRAINT_SET3_FLAG``
  107. - 0x00000008
  108. -
  109. * - ``V4L2_H264_SPS_CONSTRAINT_SET4_FLAG``
  110. - 0x00000010
  111. -
  112. * - ``V4L2_H264_SPS_CONSTRAINT_SET5_FLAG``
  113. - 0x00000020
  114. -
  115. .. _h264_sps_flags:
  116. ``Sequence Parameter Set Flags``
  117. .. cssclass:: longtable
  118. .. flat-table::
  119. :header-rows: 0
  120. :stub-columns: 0
  121. :widths: 1 1 2
  122. * - ``V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE``
  123. - 0x00000001
  124. -
  125. * - ``V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS``
  126. - 0x00000002
  127. -
  128. * - ``V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO``
  129. - 0x00000004
  130. -
  131. * - ``V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED``
  132. - 0x00000008
  133. -
  134. * - ``V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY``
  135. - 0x00000010
  136. -
  137. * - ``V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD``
  138. - 0x00000020
  139. -
  140. * - ``V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE``
  141. - 0x00000040
  142. -
  143. ``V4L2_CID_STATELESS_H264_PPS (struct)``
  144. Specifies the picture parameter set (as extracted from the
  145. bitstream) for the associated H264 slice data. This includes the
  146. necessary parameters for configuring a stateless hardware decoding
  147. pipeline for H264. The bitstream parameters are defined according
  148. to :ref:`h264`, section 7.4.2.2 "Picture Parameter Set RBSP
  149. Semantics". For further documentation, refer to the above
  150. specification, unless there is an explicit comment stating
  151. otherwise.
  152. .. c:type:: v4l2_ctrl_h264_pps
  153. .. raw:: latex
  154. \small
  155. .. flat-table:: struct v4l2_ctrl_h264_pps
  156. :header-rows: 0
  157. :stub-columns: 0
  158. :widths: 1 1 2
  159. * - __u8
  160. - ``pic_parameter_set_id``
  161. -
  162. * - __u8
  163. - ``seq_parameter_set_id``
  164. -
  165. * - __u8
  166. - ``num_slice_groups_minus1``
  167. -
  168. * - __u8
  169. - ``num_ref_idx_l0_default_active_minus1``
  170. -
  171. * - __u8
  172. - ``num_ref_idx_l1_default_active_minus1``
  173. -
  174. * - __u8
  175. - ``weighted_bipred_idc``
  176. -
  177. * - __s8
  178. - ``pic_init_qp_minus26``
  179. -
  180. * - __s8
  181. - ``pic_init_qs_minus26``
  182. -
  183. * - __s8
  184. - ``chroma_qp_index_offset``
  185. -
  186. * - __s8
  187. - ``second_chroma_qp_index_offset``
  188. -
  189. * - __u16
  190. - ``flags``
  191. - See :ref:`Picture Parameter Set Flags <h264_pps_flags>`
  192. .. raw:: latex
  193. \normalsize
  194. .. _h264_pps_flags:
  195. ``Picture Parameter Set Flags``
  196. .. raw:: latex
  197. \begingroup
  198. \scriptsize
  199. \setlength{\tabcolsep}{2pt}
  200. .. tabularcolumns:: |p{9.8cm}|p{1.0cm}|p{6.5cm}|
  201. .. flat-table::
  202. :header-rows: 0
  203. :stub-columns: 0
  204. :widths: 10 1 4
  205. * - ``V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE``
  206. - 0x0001
  207. -
  208. * - ``V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT``
  209. - 0x0002
  210. -
  211. * - ``V4L2_H264_PPS_FLAG_WEIGHTED_PRED``
  212. - 0x0004
  213. -
  214. * - ``V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
  215. - 0x0008
  216. -
  217. * - ``V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED``
  218. - 0x0010
  219. -
  220. * - ``V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT``
  221. - 0x0020
  222. -
  223. * - ``V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE``
  224. - 0x0040
  225. -
  226. * - ``V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT``
  227. - 0x0080
  228. - ``V4L2_CID_STATELESS_H264_SCALING_MATRIX``
  229. must be used for this picture.
  230. .. raw:: latex
  231. \endgroup
  232. ``V4L2_CID_STATELESS_H264_SCALING_MATRIX (struct)``
  233. Specifies the scaling matrix (as extracted from the bitstream) for
  234. the associated H264 slice data. The bitstream parameters are
  235. defined according to :ref:`h264`, section 7.4.2.1.1.1 "Scaling
  236. List Semantics". For further documentation, refer to the above
  237. specification, unless there is an explicit comment stating
  238. otherwise.
  239. .. c:type:: v4l2_ctrl_h264_scaling_matrix
  240. .. raw:: latex
  241. \small
  242. .. tabularcolumns:: |p{0.6cm}|p{4.8cm}|p{11.9cm}|
  243. .. flat-table:: struct v4l2_ctrl_h264_scaling_matrix
  244. :header-rows: 0
  245. :stub-columns: 0
  246. :widths: 1 1 2
  247. * - __u8
  248. - ``scaling_list_4x4[6][16]``
  249. - Scaling matrix after applying the inverse scanning process.
  250. Expected list order is Intra Y, Intra Cb, Intra Cr, Inter Y,
  251. Inter Cb, Inter Cr. The values on each scaling list are
  252. expected in raster scan order.
  253. * - __u8
  254. - ``scaling_list_8x8[6][64]``
  255. - Scaling matrix after applying the inverse scanning process.
  256. Expected list order is Intra Y, Inter Y, Intra Cb, Inter Cb,
  257. Intra Cr, Inter Cr. The values on each scaling list are
  258. expected in raster scan order.
  259. ``V4L2_CID_STATELESS_H264_SLICE_PARAMS (struct)``
  260. Specifies the slice parameters (as extracted from the bitstream)
  261. for the associated H264 slice data. This includes the necessary
  262. parameters for configuring a stateless hardware decoding pipeline
  263. for H264. The bitstream parameters are defined according to
  264. :ref:`h264`, section 7.4.3 "Slice Header Semantics". For further
  265. documentation, refer to the above specification, unless there is
  266. an explicit comment stating otherwise.
  267. .. c:type:: v4l2_ctrl_h264_slice_params
  268. .. raw:: latex
  269. \small
  270. .. tabularcolumns:: |p{4.0cm}|p{5.9cm}|p{7.4cm}|
  271. .. flat-table:: struct v4l2_ctrl_h264_slice_params
  272. :header-rows: 0
  273. :stub-columns: 0
  274. :widths: 1 1 2
  275. * - __u32
  276. - ``header_bit_size``
  277. - Offset in bits to slice_data() from the beginning of this slice.
  278. * - __u32
  279. - ``first_mb_in_slice``
  280. -
  281. * - __u8
  282. - ``slice_type``
  283. -
  284. * - __u8
  285. - ``colour_plane_id``
  286. -
  287. * - __u8
  288. - ``redundant_pic_cnt``
  289. -
  290. * - __u8
  291. - ``cabac_init_idc``
  292. -
  293. * - __s8
  294. - ``slice_qp_delta``
  295. -
  296. * - __s8
  297. - ``slice_qs_delta``
  298. -
  299. * - __u8
  300. - ``disable_deblocking_filter_idc``
  301. -
  302. * - __s8
  303. - ``slice_alpha_c0_offset_div2``
  304. -
  305. * - __s8
  306. - ``slice_beta_offset_div2``
  307. -
  308. * - __u8
  309. - ``num_ref_idx_l0_active_minus1``
  310. - If num_ref_idx_active_override_flag is not set, this field must be
  311. set to the value of num_ref_idx_l0_default_active_minus1
  312. * - __u8
  313. - ``num_ref_idx_l1_active_minus1``
  314. - If num_ref_idx_active_override_flag is not set, this field must be
  315. set to the value of num_ref_idx_l1_default_active_minus1
  316. * - __u8
  317. - ``reserved``
  318. - Applications and drivers must set this to zero.
  319. * - struct :c:type:`v4l2_h264_reference`
  320. - ``ref_pic_list0[32]``
  321. - Reference picture list after applying the per-slice modifications
  322. * - struct :c:type:`v4l2_h264_reference`
  323. - ``ref_pic_list1[32]``
  324. - Reference picture list after applying the per-slice modifications
  325. * - __u32
  326. - ``flags``
  327. - See :ref:`Slice Parameter Flags <h264_slice_flags>`
  328. .. raw:: latex
  329. \normalsize
  330. .. _h264_slice_flags:
  331. ``Slice Parameter Set Flags``
  332. .. cssclass:: longtable
  333. .. flat-table::
  334. :header-rows: 0
  335. :stub-columns: 0
  336. :widths: 1 1 2
  337. * - ``V4L2_H264_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED``
  338. - 0x00000001
  339. -
  340. * - ``V4L2_H264_SLICE_FLAG_SP_FOR_SWITCH``
  341. - 0x00000002
  342. -
  343. ``V4L2_CID_STATELESS_H264_PRED_WEIGHTS (struct)``
  344. Prediction weight table defined according to :ref:`h264`,
  345. section 7.4.3.2 "Prediction Weight Table Semantics".
  346. The prediction weight table must be passed by applications
  347. under the conditions explained in section 7.3.3 "Slice header
  348. syntax".
  349. .. c:type:: v4l2_ctrl_h264_pred_weights
  350. .. raw:: latex
  351. \small
  352. .. tabularcolumns:: |p{4.9cm}|p{4.9cm}|p{7.5cm}|
  353. .. flat-table:: struct v4l2_ctrl_h264_pred_weights
  354. :header-rows: 0
  355. :stub-columns: 0
  356. :widths: 1 1 2
  357. * - __u16
  358. - ``luma_log2_weight_denom``
  359. -
  360. * - __u16
  361. - ``chroma_log2_weight_denom``
  362. -
  363. * - struct :c:type:`v4l2_h264_weight_factors`
  364. - ``weight_factors[2]``
  365. - The weight factors at index 0 are the weight factors for the reference
  366. list 0, the one at index 1 for the reference list 1.
  367. .. raw:: latex
  368. \normalsize
  369. .. c:type:: v4l2_h264_weight_factors
  370. .. raw:: latex
  371. \small
  372. .. tabularcolumns:: |p{1.0cm}|p{4.5cm}|p{11.8cm}|
  373. .. flat-table:: struct v4l2_h264_weight_factors
  374. :header-rows: 0
  375. :stub-columns: 0
  376. :widths: 1 1 2
  377. * - __s16
  378. - ``luma_weight[32]``
  379. -
  380. * - __s16
  381. - ``luma_offset[32]``
  382. -
  383. * - __s16
  384. - ``chroma_weight[32][2]``
  385. -
  386. * - __s16
  387. - ``chroma_offset[32][2]``
  388. -
  389. .. raw:: latex
  390. \normalsize
  391. ``Picture Reference``
  392. .. c:type:: v4l2_h264_reference
  393. .. cssclass:: longtable
  394. .. flat-table:: struct v4l2_h264_reference
  395. :header-rows: 0
  396. :stub-columns: 0
  397. :widths: 1 1 2
  398. * - __u8
  399. - ``fields``
  400. - Specifies how the picture is referenced. See :ref:`Reference Fields <h264_ref_fields>`
  401. * - __u8
  402. - ``index``
  403. - Index into the :c:type:`v4l2_ctrl_h264_decode_params`.dpb array.
  404. .. _h264_ref_fields:
  405. ``Reference Fields``
  406. .. raw:: latex
  407. \small
  408. .. tabularcolumns:: |p{5.4cm}|p{0.8cm}|p{11.1cm}|
  409. .. flat-table::
  410. :header-rows: 0
  411. :stub-columns: 0
  412. :widths: 1 1 2
  413. * - ``V4L2_H264_TOP_FIELD_REF``
  414. - 0x1
  415. - The top field in field pair is used for short-term reference.
  416. * - ``V4L2_H264_BOTTOM_FIELD_REF``
  417. - 0x2
  418. - The bottom field in field pair is used for short-term reference.
  419. * - ``V4L2_H264_FRAME_REF``
  420. - 0x3
  421. - The frame (or the top/bottom fields, if it's a field pair)
  422. is used for short-term reference.
  423. .. raw:: latex
  424. \normalsize
  425. ``V4L2_CID_STATELESS_H264_DECODE_PARAMS (struct)``
  426. Specifies the decode parameters (as extracted from the bitstream)
  427. for the associated H264 slice data. This includes the necessary
  428. parameters for configuring a stateless hardware decoding pipeline
  429. for H264. The bitstream parameters are defined according to
  430. :ref:`h264`. For further documentation, refer to the above
  431. specification, unless there is an explicit comment stating
  432. otherwise.
  433. .. c:type:: v4l2_ctrl_h264_decode_params
  434. .. raw:: latex
  435. \small
  436. .. tabularcolumns:: |p{4.0cm}|p{5.9cm}|p{7.4cm}|
  437. .. flat-table:: struct v4l2_ctrl_h264_decode_params
  438. :header-rows: 0
  439. :stub-columns: 0
  440. :widths: 1 1 2
  441. * - struct :c:type:`v4l2_h264_dpb_entry`
  442. - ``dpb[16]``
  443. -
  444. * - __u16
  445. - ``nal_ref_idc``
  446. - NAL reference ID value coming from the NAL Unit header
  447. * - __u16
  448. - ``frame_num``
  449. -
  450. * - __s32
  451. - ``top_field_order_cnt``
  452. - Picture Order Count for the coded top field
  453. * - __s32
  454. - ``bottom_field_order_cnt``
  455. - Picture Order Count for the coded bottom field
  456. * - __u16
  457. - ``idr_pic_id``
  458. -
  459. * - __u16
  460. - ``pic_order_cnt_lsb``
  461. -
  462. * - __s32
  463. - ``delta_pic_order_cnt_bottom``
  464. -
  465. * - __s32
  466. - ``delta_pic_order_cnt0``
  467. -
  468. * - __s32
  469. - ``delta_pic_order_cnt1``
  470. -
  471. * - __u32
  472. - ``dec_ref_pic_marking_bit_size``
  473. - Size in bits of the dec_ref_pic_marking() syntax element.
  474. * - __u32
  475. - ``pic_order_cnt_bit_size``
  476. - Combined size in bits of the picture order count related syntax
  477. elements: pic_order_cnt_lsb, delta_pic_order_cnt_bottom,
  478. delta_pic_order_cnt0, and delta_pic_order_cnt1.
  479. * - __u32
  480. - ``slice_group_change_cycle``
  481. -
  482. * - __u32
  483. - ``reserved``
  484. - Applications and drivers must set this to zero.
  485. * - __u32
  486. - ``flags``
  487. - See :ref:`Decode Parameters Flags <h264_decode_params_flags>`
  488. .. raw:: latex
  489. \normalsize
  490. .. _h264_decode_params_flags:
  491. ``Decode Parameters Flags``
  492. .. raw:: latex
  493. \small
  494. .. tabularcolumns:: |p{8.3cm}|p{2.1cm}|p{6.9cm}|
  495. .. flat-table::
  496. :header-rows: 0
  497. :stub-columns: 0
  498. :widths: 1 1 2
  499. * - ``V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC``
  500. - 0x00000001
  501. - That picture is an IDR picture
  502. * - ``V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC``
  503. - 0x00000002
  504. -
  505. * - ``V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD``
  506. - 0x00000004
  507. -
  508. * - ``V4L2_H264_DECODE_PARAM_FLAG_PFRAME``
  509. - 0x00000008
  510. -
  511. * - ``V4L2_H264_DECODE_PARAM_FLAG_BFRAME``
  512. - 0x00000010
  513. -
  514. .. raw:: latex
  515. \normalsize
  516. .. c:type:: v4l2_h264_dpb_entry
  517. .. raw:: latex
  518. \small
  519. .. tabularcolumns:: |p{1.0cm}|p{4.9cm}|p{11.4cm}|
  520. .. flat-table:: struct v4l2_h264_dpb_entry
  521. :header-rows: 0
  522. :stub-columns: 0
  523. :widths: 1 1 2
  524. * - __u64
  525. - ``reference_ts``
  526. - Timestamp of the V4L2 capture buffer to use as reference, used
  527. with B-coded and P-coded frames. The timestamp refers to the
  528. ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
  529. :c:func:`v4l2_timeval_to_ns()` function to convert the struct
  530. :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
  531. * - __u32
  532. - ``pic_num``
  533. - For short term references, this must match the derived value PicNum
  534. (8-28) and for long term references it must match the derived value
  535. LongTermPicNum (8-29). When decoding frames (as opposed to fields)
  536. pic_num is the same as FrameNumWrap.
  537. * - __u16
  538. - ``frame_num``
  539. - For short term references, this must match the frame_num value from
  540. the slice header syntax (the driver will wrap the value if needed). For
  541. long term references, this must be set to the value of
  542. long_term_frame_idx described in the dec_ref_pic_marking() syntax.
  543. * - __u8
  544. - ``fields``
  545. - Specifies how the DPB entry is referenced. See :ref:`Reference Fields <h264_ref_fields>`
  546. * - __u8
  547. - ``reserved[5]``
  548. - Applications and drivers must set this to zero.
  549. * - __s32
  550. - ``top_field_order_cnt``
  551. -
  552. * - __s32
  553. - ``bottom_field_order_cnt``
  554. -
  555. * - __u32
  556. - ``flags``
  557. - See :ref:`DPB Entry Flags <h264_dpb_flags>`
  558. .. raw:: latex
  559. \normalsize
  560. .. _h264_dpb_flags:
  561. ``DPB Entries Flags``
  562. .. raw:: latex
  563. \small
  564. .. tabularcolumns:: |p{7.7cm}|p{2.1cm}|p{7.5cm}|
  565. .. flat-table::
  566. :header-rows: 0
  567. :stub-columns: 0
  568. :widths: 1 1 2
  569. * - ``V4L2_H264_DPB_ENTRY_FLAG_VALID``
  570. - 0x00000001
  571. - The DPB entry is valid (non-empty) and should be considered.
  572. * - ``V4L2_H264_DPB_ENTRY_FLAG_ACTIVE``
  573. - 0x00000002
  574. - The DPB entry is used for reference.
  575. * - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``
  576. - 0x00000004
  577. - The DPB entry is used for long-term reference.
  578. * - ``V4L2_H264_DPB_ENTRY_FLAG_FIELD``
  579. - 0x00000008
  580. - The DPB entry is a single field or a complementary field pair.
  581. .. raw:: latex
  582. \normalsize
  583. ``V4L2_CID_STATELESS_H264_DECODE_MODE (enum)``
  584. Specifies the decoding mode to use. Currently exposes slice-based and
  585. frame-based decoding but new modes might be added later on.
  586. This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
  587. pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
  588. are required to set this control in order to specify the decoding mode
  589. that is expected for the buffer.
  590. Drivers may expose a single or multiple decoding modes, depending
  591. on what they can support.
  592. .. c:type:: v4l2_stateless_h264_decode_mode
  593. .. raw:: latex
  594. \scriptsize
  595. .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
  596. .. flat-table::
  597. :header-rows: 0
  598. :stub-columns: 0
  599. :widths: 1 1 2
  600. * - ``V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED``
  601. - 0
  602. - Decoding is done at the slice granularity.
  603. The OUTPUT buffer must contain a single slice.
  604. When this mode is selected, the ``V4L2_CID_STATELESS_H264_SLICE_PARAMS``
  605. control shall be set. When multiple slices compose a frame,
  606. use of ``V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF`` flag
  607. is required.
  608. * - ``V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED``
  609. - 1
  610. - Decoding is done at the frame granularity,
  611. The OUTPUT buffer must contain all slices needed to decode the
  612. frame. The OUTPUT buffer must also contain both fields.
  613. This mode will be supported by devices that
  614. parse the slice(s) header(s) in hardware. When this mode is
  615. selected, the ``V4L2_CID_STATELESS_H264_SLICE_PARAMS``
  616. control shall not be set.
  617. .. raw:: latex
  618. \normalsize
  619. ``V4L2_CID_STATELESS_H264_START_CODE (enum)``
  620. Specifies the H264 slice start code expected for each slice.
  621. This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
  622. pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
  623. are required to set this control in order to specify the start code
  624. that is expected for the buffer.
  625. Drivers may expose a single or multiple start codes, depending
  626. on what they can support.
  627. .. c:type:: v4l2_stateless_h264_start_code
  628. .. raw:: latex
  629. \small
  630. .. tabularcolumns:: |p{7.9cm}|p{0.4cm}|p{9.0cm}|
  631. .. flat-table::
  632. :header-rows: 0
  633. :stub-columns: 0
  634. :widths: 4 1 4
  635. * - ``V4L2_STATELESS_H264_START_CODE_NONE``
  636. - 0
  637. - Selecting this value specifies that H264 slices are passed
  638. to the driver without any start code. The bitstream data should be
  639. according to :ref:`h264` 7.3.1 NAL unit syntax, hence contains
  640. emulation prevention bytes when required.
  641. * - ``V4L2_STATELESS_H264_START_CODE_ANNEX_B``
  642. - 1
  643. - Selecting this value specifies that H264 slices are expected
  644. to be prefixed by Annex B start codes. According to :ref:`h264`
  645. valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
  646. .. raw:: latex
  647. \normalsize
  648. .. _codec-stateless-fwht:
  649. ``V4L2_CID_STATELESS_FWHT_PARAMS (struct)``
  650. Specifies the FWHT (Fast Walsh Hadamard Transform) parameters (as extracted
  651. from the bitstream) for the associated FWHT data. This includes the necessary
  652. parameters for configuring a stateless hardware decoding pipeline for FWHT.
  653. This codec is specific to the vicodec test driver.
  654. .. c:type:: v4l2_ctrl_fwht_params
  655. .. raw:: latex
  656. \small
  657. .. tabularcolumns:: |p{1.4cm}|p{3.9cm}|p{12.0cm}|
  658. .. flat-table:: struct v4l2_ctrl_fwht_params
  659. :header-rows: 0
  660. :stub-columns: 0
  661. :widths: 1 1 2
  662. * - __u64
  663. - ``backward_ref_ts``
  664. - Timestamp of the V4L2 capture buffer to use as backward reference, used
  665. with P-coded frames. The timestamp refers to the
  666. ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
  667. :c:func:`v4l2_timeval_to_ns()` function to convert the struct
  668. :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
  669. * - __u32
  670. - ``version``
  671. - The version of the codec. Set to ``V4L2_FWHT_VERSION``.
  672. * - __u32
  673. - ``width``
  674. - The width of the frame.
  675. * - __u32
  676. - ``height``
  677. - The height of the frame.
  678. * - __u32
  679. - ``flags``
  680. - The flags of the frame, see :ref:`fwht-flags`.
  681. * - __u32
  682. - ``colorspace``
  683. - The colorspace of the frame, from enum :c:type:`v4l2_colorspace`.
  684. * - __u32
  685. - ``xfer_func``
  686. - The transfer function, from enum :c:type:`v4l2_xfer_func`.
  687. * - __u32
  688. - ``ycbcr_enc``
  689. - The Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
  690. * - __u32
  691. - ``quantization``
  692. - The quantization range, from enum :c:type:`v4l2_quantization`.
  693. .. raw:: latex
  694. \normalsize
  695. .. _fwht-flags:
  696. FWHT Flags
  697. ==========
  698. .. raw:: latex
  699. \small
  700. .. tabularcolumns:: |p{7.0cm}|p{2.3cm}|p{8.0cm}|
  701. .. flat-table::
  702. :header-rows: 0
  703. :stub-columns: 0
  704. :widths: 3 1 4
  705. * - ``V4L2_FWHT_FL_IS_INTERLACED``
  706. - 0x00000001
  707. - Set if this is an interlaced format.
  708. * - ``V4L2_FWHT_FL_IS_BOTTOM_FIRST``
  709. - 0x00000002
  710. - Set if this is a bottom-first (NTSC) interlaced format.
  711. * - ``V4L2_FWHT_FL_IS_ALTERNATE``
  712. - 0x00000004
  713. - Set if each 'frame' contains just one field.
  714. * - ``V4L2_FWHT_FL_IS_BOTTOM_FIELD``
  715. - 0x00000008
  716. - If V4L2_FWHT_FL_IS_ALTERNATE was set, then this is set if this 'frame' is the
  717. bottom field, else it is the top field.
  718. * - ``V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED``
  719. - 0x00000010
  720. - Set if the Y' (luma) plane is uncompressed.
  721. * - ``V4L2_FWHT_FL_CB_IS_UNCOMPRESSED``
  722. - 0x00000020
  723. - Set if the Cb plane is uncompressed.
  724. * - ``V4L2_FWHT_FL_CR_IS_UNCOMPRESSED``
  725. - 0x00000040
  726. - Set if the Cr plane is uncompressed.
  727. * - ``V4L2_FWHT_FL_CHROMA_FULL_HEIGHT``
  728. - 0x00000080
  729. - Set if the chroma plane has the same height as the luma plane,
  730. else the chroma plane is half the height of the luma plane.
  731. * - ``V4L2_FWHT_FL_CHROMA_FULL_WIDTH``
  732. - 0x00000100
  733. - Set if the chroma plane has the same width as the luma plane,
  734. else the chroma plane is half the width of the luma plane.
  735. * - ``V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED``
  736. - 0x00000200
  737. - Set if the alpha plane is uncompressed.
  738. * - ``V4L2_FWHT_FL_I_FRAME``
  739. - 0x00000400
  740. - Set if this is an I-frame.
  741. * - ``V4L2_FWHT_FL_COMPONENTS_NUM_MSK``
  742. - 0x00070000
  743. - The number of color components minus one.
  744. * - ``V4L2_FWHT_FL_PIXENC_MSK``
  745. - 0x00180000
  746. - The mask for the pixel encoding.
  747. * - ``V4L2_FWHT_FL_PIXENC_YUV``
  748. - 0x00080000
  749. - Set if the pixel encoding is YUV.
  750. * - ``V4L2_FWHT_FL_PIXENC_RGB``
  751. - 0x00100000
  752. - Set if the pixel encoding is RGB.
  753. * - ``V4L2_FWHT_FL_PIXENC_HSV``
  754. - 0x00180000
  755. - Set if the pixel encoding is HSV.
  756. .. raw:: latex
  757. \normalsize
  758. .. _v4l2-codec-stateless-vp8:
  759. ``V4L2_CID_STATELESS_VP8_FRAME (struct)``
  760. Specifies the frame parameters for the associated VP8 parsed frame data.
  761. This includes the necessary parameters for
  762. configuring a stateless hardware decoding pipeline for VP8.
  763. The bitstream parameters are defined according to :ref:`vp8`.
  764. .. c:type:: v4l2_ctrl_vp8_frame
  765. .. raw:: latex
  766. \small
  767. .. tabularcolumns:: |p{7.0cm}|p{4.6cm}|p{5.7cm}|
  768. .. cssclass:: longtable
  769. .. flat-table:: struct v4l2_ctrl_vp8_frame
  770. :header-rows: 0
  771. :stub-columns: 0
  772. :widths: 1 1 2
  773. * - struct :c:type:`v4l2_vp8_segment`
  774. - ``segment``
  775. - Structure with segment-based adjustments metadata.
  776. * - struct :c:type:`v4l2_vp8_loop_filter`
  777. - ``lf``
  778. - Structure with loop filter level adjustments metadata.
  779. * - struct :c:type:`v4l2_vp8_quantization`
  780. - ``quant``
  781. - Structure with VP8 dequantization indices metadata.
  782. * - struct :c:type:`v4l2_vp8_entropy`
  783. - ``entropy``
  784. - Structure with VP8 entropy coder probabilities metadata.
  785. * - struct :c:type:`v4l2_vp8_entropy_coder_state`
  786. - ``coder_state``
  787. - Structure with VP8 entropy coder state.
  788. * - __u16
  789. - ``width``
  790. - The width of the frame. Must be set for all frames.
  791. * - __u16
  792. - ``height``
  793. - The height of the frame. Must be set for all frames.
  794. * - __u8
  795. - ``horizontal_scale``
  796. - Horizontal scaling factor.
  797. * - __u8
  798. - ``vertical_scale``
  799. - Vertical scaling factor.
  800. * - __u8
  801. - ``version``
  802. - Bitstream version.
  803. * - __u8
  804. - ``prob_skip_false``
  805. - Indicates the probability that the macroblock is not skipped.
  806. * - __u8
  807. - ``prob_intra``
  808. - Indicates the probability that a macroblock is intra-predicted.
  809. * - __u8
  810. - ``prob_last``
  811. - Indicates the probability that the last reference frame is used
  812. for inter-prediction
  813. * - __u8
  814. - ``prob_gf``
  815. - Indicates the probability that the golden reference frame is used
  816. for inter-prediction
  817. * - __u8
  818. - ``num_dct_parts``
  819. - Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8.
  820. * - __u32
  821. - ``first_part_size``
  822. - Size of the first partition, i.e. the control partition.
  823. * - __u32
  824. - ``first_part_header_bits``
  825. - Size in bits of the first partition header portion.
  826. * - __u32
  827. - ``dct_part_sizes[8]``
  828. - DCT coefficients sizes.
  829. * - __u64
  830. - ``last_frame_ts``
  831. - Timestamp for the V4L2 capture buffer to use as last reference frame, used
  832. with inter-coded frames. The timestamp refers to the ``timestamp`` field in
  833. struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
  834. function to convert the struct :c:type:`timeval` in struct
  835. :c:type:`v4l2_buffer` to a __u64.
  836. * - __u64
  837. - ``golden_frame_ts``
  838. - Timestamp for the V4L2 capture buffer to use as last reference frame, used
  839. with inter-coded frames. The timestamp refers to the ``timestamp`` field in
  840. struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
  841. function to convert the struct :c:type:`timeval` in struct
  842. :c:type:`v4l2_buffer` to a __u64.
  843. * - __u64
  844. - ``alt_frame_ts``
  845. - Timestamp for the V4L2 capture buffer to use as alternate reference frame, used
  846. with inter-coded frames. The timestamp refers to the ``timestamp`` field in
  847. struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
  848. function to convert the struct :c:type:`timeval` in struct
  849. :c:type:`v4l2_buffer` to a __u64.
  850. * - __u64
  851. - ``flags``
  852. - See :ref:`Frame Flags <vp8_frame_flags>`
  853. .. raw:: latex
  854. \normalsize
  855. .. _vp8_frame_flags:
  856. ``Frame Flags``
  857. .. tabularcolumns:: |p{9.8cm}|p{0.8cm}|p{6.7cm}|
  858. .. cssclass:: longtable
  859. .. flat-table::
  860. :header-rows: 0
  861. :stub-columns: 0
  862. :widths: 1 1 2
  863. * - ``V4L2_VP8_FRAME_FLAG_KEY_FRAME``
  864. - 0x01
  865. - Indicates if the frame is a key frame.
  866. * - ``V4L2_VP8_FRAME_FLAG_EXPERIMENTAL``
  867. - 0x02
  868. - Experimental bitstream.
  869. * - ``V4L2_VP8_FRAME_FLAG_SHOW_FRAME``
  870. - 0x04
  871. - Show frame flag, indicates if the frame is for display.
  872. * - ``V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF``
  873. - 0x08
  874. - Enable/disable skipping of macroblocks with no non-zero coefficients.
  875. * - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN``
  876. - 0x10
  877. - Sign of motion vectors when the golden frame is referenced.
  878. * - ``V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT``
  879. - 0x20
  880. - Sign of motion vectors when the alt frame is referenced.
  881. .. c:type:: v4l2_vp8_entropy_coder_state
  882. .. cssclass:: longtable
  883. .. tabularcolumns:: |p{1.0cm}|p{2.0cm}|p{14.3cm}|
  884. .. flat-table:: struct v4l2_vp8_entropy_coder_state
  885. :header-rows: 0
  886. :stub-columns: 0
  887. :widths: 1 1 2
  888. * - __u8
  889. - ``range``
  890. - coder state value for "Range"
  891. * - __u8
  892. - ``value``
  893. - coder state value for "Value"-
  894. * - __u8
  895. - ``bit_count``
  896. - number of bits left.
  897. * - __u8
  898. - ``padding``
  899. - Applications and drivers must set this to zero.
  900. .. c:type:: v4l2_vp8_segment
  901. .. cssclass:: longtable
  902. .. tabularcolumns:: |p{1.2cm}|p{4.0cm}|p{12.1cm}|
  903. .. flat-table:: struct v4l2_vp8_segment
  904. :header-rows: 0
  905. :stub-columns: 0
  906. :widths: 1 1 2
  907. * - __s8
  908. - ``quant_update[4]``
  909. - Signed quantizer value update.
  910. * - __s8
  911. - ``lf_update[4]``
  912. - Signed loop filter level value update.
  913. * - __u8
  914. - ``segment_probs[3]``
  915. - Segment probabilities.
  916. * - __u8
  917. - ``padding``
  918. - Applications and drivers must set this to zero.
  919. * - __u32
  920. - ``flags``
  921. - See :ref:`Segment Flags <vp8_segment_flags>`
  922. .. _vp8_segment_flags:
  923. ``Segment Flags``
  924. .. raw:: latex
  925. \small
  926. .. tabularcolumns:: |p{10cm}|p{1.0cm}|p{6.3cm}|
  927. .. flat-table::
  928. :header-rows: 0
  929. :stub-columns: 0
  930. :widths: 1 1 2
  931. * - ``V4L2_VP8_SEGMENT_FLAG_ENABLED``
  932. - 0x01
  933. - Enable/disable segment-based adjustments.
  934. * - ``V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP``
  935. - 0x02
  936. - Indicates if the macroblock segmentation map is updated in this frame.
  937. * - ``V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA``
  938. - 0x04
  939. - Indicates if the segment feature data is updated in this frame.
  940. * - ``V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE``
  941. - 0x08
  942. - If is set, the segment feature data mode is delta-value.
  943. If cleared, it's absolute-value.
  944. .. raw:: latex
  945. \normalsize
  946. .. c:type:: v4l2_vp8_loop_filter
  947. .. cssclass:: longtable
  948. .. tabularcolumns:: |p{1.5cm}|p{3.9cm}|p{11.9cm}|
  949. .. flat-table:: struct v4l2_vp8_loop_filter
  950. :header-rows: 0
  951. :stub-columns: 0
  952. :widths: 1 1 2
  953. * - __s8
  954. - ``ref_frm_delta[4]``
  955. - Reference adjustment (signed) delta value.
  956. * - __s8
  957. - ``mb_mode_delta[4]``
  958. - Macroblock prediction mode adjustment (signed) delta value.
  959. * - __u8
  960. - ``sharpness_level``
  961. - Sharpness level
  962. * - __u8
  963. - ``level``
  964. - Filter level
  965. * - __u16
  966. - ``padding``
  967. - Applications and drivers must set this to zero.
  968. * - __u32
  969. - ``flags``
  970. - See :ref:`Loop Filter Flags <vp8_loop_filter_flags>`
  971. .. _vp8_loop_filter_flags:
  972. ``Loop Filter Flags``
  973. .. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|
  974. .. flat-table::
  975. :header-rows: 0
  976. :stub-columns: 0
  977. :widths: 1 1 2
  978. * - ``V4L2_VP8_LF_ADJ_ENABLE``
  979. - 0x01
  980. - Enable/disable macroblock-level loop filter adjustment.
  981. * - ``V4L2_VP8_LF_DELTA_UPDATE``
  982. - 0x02
  983. - Indicates if the delta values used in an adjustment are updated.
  984. * - ``V4L2_VP8_LF_FILTER_TYPE_SIMPLE``
  985. - 0x04
  986. - If set, indicates the filter type is simple.
  987. If cleared, the filter type is normal.
  988. .. c:type:: v4l2_vp8_quantization
  989. .. tabularcolumns:: |p{1.5cm}|p{3.5cm}|p{12.3cm}|
  990. .. flat-table:: struct v4l2_vp8_quantization
  991. :header-rows: 0
  992. :stub-columns: 0
  993. :widths: 1 1 2
  994. * - __u8
  995. - ``y_ac_qi``
  996. - Luma AC coefficient table index.
  997. * - __s8
  998. - ``y_dc_delta``
  999. - Luma DC delta value.
  1000. * - __s8
  1001. - ``y2_dc_delta``
  1002. - Y2 block DC delta value.
  1003. * - __s8
  1004. - ``y2_ac_delta``
  1005. - Y2 block AC delta value.
  1006. * - __s8
  1007. - ``uv_dc_delta``
  1008. - Chroma DC delta value.
  1009. * - __s8
  1010. - ``uv_ac_delta``
  1011. - Chroma AC delta value.
  1012. * - __u16
  1013. - ``padding``
  1014. - Applications and drivers must set this to zero.
  1015. .. c:type:: v4l2_vp8_entropy
  1016. .. cssclass:: longtable
  1017. .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
  1018. .. flat-table:: struct v4l2_vp8_entropy
  1019. :header-rows: 0
  1020. :stub-columns: 0
  1021. :widths: 1 1 2
  1022. * - __u8
  1023. - ``coeff_probs[4][8][3][11]``
  1024. - Coefficient update probabilities.
  1025. * - __u8
  1026. - ``y_mode_probs[4]``
  1027. - Luma mode update probabilities.
  1028. * - __u8
  1029. - ``uv_mode_probs[3]``
  1030. - Chroma mode update probabilities.
  1031. * - __u8
  1032. - ``mv_probs[2][19]``
  1033. - MV decoding update probabilities.
  1034. * - __u8
  1035. - ``padding[3]``
  1036. - Applications and drivers must set this to zero.
  1037. .. _v4l2-codec-stateless-mpeg2:
  1038. ``V4L2_CID_STATELESS_MPEG2_SEQUENCE (struct)``
  1039. Specifies the sequence parameters (as extracted from the bitstream) for the
  1040. associated MPEG-2 slice data. This includes fields matching the syntax
  1041. elements from the sequence header and sequence extension parts of the
  1042. bitstream as specified by :ref:`mpeg2part2`.
  1043. .. c:type:: v4l2_ctrl_mpeg2_sequence
  1044. .. raw:: latex
  1045. \small
  1046. .. cssclass:: longtable
  1047. .. tabularcolumns:: |p{1.4cm}|p{6.5cm}|p{9.4cm}|
  1048. .. flat-table:: struct v4l2_ctrl_mpeg2_sequence
  1049. :header-rows: 0
  1050. :stub-columns: 0
  1051. :widths: 1 1 2
  1052. * - __u16
  1053. - ``horizontal_size``
  1054. - The width of the displayable part of the frame's luminance component.
  1055. * - __u16
  1056. - ``vertical_size``
  1057. - The height of the displayable part of the frame's luminance component.
  1058. * - __u32
  1059. - ``vbv_buffer_size``
  1060. - Used to calculate the required size of the video buffering verifier,
  1061. defined (in bits) as: 16 * 1024 * vbv_buffer_size.
  1062. * - __u16
  1063. - ``profile_and_level_indication``
  1064. - The current profile and level indication as extracted from the
  1065. bitstream.
  1066. * - __u8
  1067. - ``chroma_format``
  1068. - The chrominance sub-sampling format (1: 4:2:0, 2: 4:2:2, 3: 4:4:4).
  1069. * - __u8
  1070. - ``flags``
  1071. - See :ref:`MPEG-2 Sequence Flags <mpeg2_sequence_flags>`.
  1072. .. _mpeg2_sequence_flags:
  1073. ``MPEG-2 Sequence Flags``
  1074. .. cssclass:: longtable
  1075. .. flat-table::
  1076. :header-rows: 0
  1077. :stub-columns: 0
  1078. :widths: 1 1 2
  1079. * - ``V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE``
  1080. - 0x01
  1081. - Indication that all the frames for the sequence are progressive instead
  1082. of interlaced.
  1083. .. raw:: latex
  1084. \normalsize
  1085. ``V4L2_CID_STATELESS_MPEG2_PICTURE (struct)``
  1086. Specifies the picture parameters (as extracted from the bitstream) for the
  1087. associated MPEG-2 slice data. This includes fields matching the syntax
  1088. elements from the picture header and picture coding extension parts of the
  1089. bitstream as specified by :ref:`mpeg2part2`.
  1090. .. c:type:: v4l2_ctrl_mpeg2_picture
  1091. .. raw:: latex
  1092. \small
  1093. .. cssclass:: longtable
  1094. .. tabularcolumns:: |p{1.0cm}|p{5.6cm}|p{10.7cm}|
  1095. .. flat-table:: struct v4l2_ctrl_mpeg2_picture
  1096. :header-rows: 0
  1097. :stub-columns: 0
  1098. :widths: 1 1 2
  1099. * - __u64
  1100. - ``backward_ref_ts``
  1101. - Timestamp of the V4L2 capture buffer to use as backward reference, used
  1102. with B-coded and P-coded frames. The timestamp refers to the
  1103. ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
  1104. :c:func:`v4l2_timeval_to_ns()` function to convert the struct
  1105. :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
  1106. * - __u64
  1107. - ``forward_ref_ts``
  1108. - Timestamp for the V4L2 capture buffer to use as forward reference, used
  1109. with B-coded frames. The timestamp refers to the ``timestamp`` field in
  1110. struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
  1111. function to convert the struct :c:type:`timeval` in struct
  1112. :c:type:`v4l2_buffer` to a __u64.
  1113. * - __u32
  1114. - ``flags``
  1115. - See :ref:`MPEG-2 Picture Flags <mpeg2_picture_flags>`.
  1116. * - __u8
  1117. - ``f_code[2][2]``
  1118. - Motion vector codes.
  1119. * - __u8
  1120. - ``picture_coding_type``
  1121. - Picture coding type for the frame covered by the current slice
  1122. (V4L2_MPEG2_PIC_CODING_TYPE_I, V4L2_MPEG2_PIC_CODING_TYPE_P or
  1123. V4L2_MPEG2_PIC_CODING_TYPE_B).
  1124. * - __u8
  1125. - ``picture_structure``
  1126. - Picture structure (1: interlaced top field, 2: interlaced bottom field,
  1127. 3: progressive frame).
  1128. * - __u8
  1129. - ``intra_dc_precision``
  1130. - Precision of Discrete Cosine transform (0: 8 bits precision,
  1131. 1: 9 bits precision, 2: 10 bits precision, 3: 11 bits precision).
  1132. * - __u8
  1133. - ``reserved[5]``
  1134. - Applications and drivers must set this to zero.
  1135. .. _mpeg2_picture_flags:
  1136. ``MPEG-2 Picture Flags``
  1137. .. cssclass:: longtable
  1138. .. flat-table::
  1139. :header-rows: 0
  1140. :stub-columns: 0
  1141. :widths: 1 1 2
  1142. * - ``V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST``
  1143. - 0x00000001
  1144. - If set and it's an interlaced stream, top field is output first.
  1145. * - ``V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT``
  1146. - 0x00000002
  1147. - If set only frame-DCT and frame prediction are used.
  1148. * - ``V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV``
  1149. - 0x00000004
  1150. - If set motion vectors are coded for intra macroblocks.
  1151. * - ``V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE``
  1152. - 0x00000008
  1153. - This flag affects the inverse quantization process.
  1154. * - ``V4L2_MPEG2_PIC_FLAG_INTRA_VLC``
  1155. - 0x00000010
  1156. - This flag affects the decoding of transform coefficient data.
  1157. * - ``V4L2_MPEG2_PIC_FLAG_ALT_SCAN``
  1158. - 0x00000020
  1159. - This flag affects the decoding of transform coefficient data.
  1160. * - ``V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST``
  1161. - 0x00000040
  1162. - This flag affects the decoding process of progressive frames.
  1163. * - ``V4L2_MPEG2_PIC_FLAG_PROGRESSIVE``
  1164. - 0x00000080
  1165. - Indicates whether the current frame is progressive.
  1166. .. raw:: latex
  1167. \normalsize
  1168. ``V4L2_CID_STATELESS_MPEG2_QUANTISATION (struct)``
  1169. Specifies quantisation matrices, in zigzag scanning order, for the
  1170. associated MPEG-2 slice data. This control is initialized by the kernel
  1171. to the matrices default values. If a bitstream transmits a user-defined
  1172. quantisation matrices load, applications are expected to use this control.
  1173. Applications are also expected to set the control loading the default
  1174. values, if the quantisation matrices need to be reset, for instance on a
  1175. sequence header. This process is specified by section 6.3.7.
  1176. "Quant matrix extension" of the specification.
  1177. .. c:type:: v4l2_ctrl_mpeg2_quantisation
  1178. .. tabularcolumns:: |p{0.8cm}|p{8.0cm}|p{8.5cm}|
  1179. .. cssclass:: longtable
  1180. .. raw:: latex
  1181. \small
  1182. .. flat-table:: struct v4l2_ctrl_mpeg2_quantisation
  1183. :header-rows: 0
  1184. :stub-columns: 0
  1185. :widths: 1 1 2
  1186. * - __u8
  1187. - ``intra_quantiser_matrix[64]``
  1188. - The quantisation matrix coefficients for intra-coded frames, in zigzag
  1189. scanning order. It is relevant for both luma and chroma components,
  1190. although it can be superseded by the chroma-specific matrix for
  1191. non-4:2:0 YUV formats.
  1192. * - __u8
  1193. - ``non_intra_quantiser_matrix[64]``
  1194. - The quantisation matrix coefficients for non-intra-coded frames, in
  1195. zigzag scanning order. It is relevant for both luma and chroma
  1196. components, although it can be superseded by the chroma-specific matrix
  1197. for non-4:2:0 YUV formats.
  1198. * - __u8
  1199. - ``chroma_intra_quantiser_matrix[64]``
  1200. - The quantisation matrix coefficients for the chominance component of
  1201. intra-coded frames, in zigzag scanning order. Only relevant for
  1202. non-4:2:0 YUV formats.
  1203. * - __u8
  1204. - ``chroma_non_intra_quantiser_matrix[64]``
  1205. - The quantisation matrix coefficients for the chrominance component of
  1206. non-intra-coded frames, in zigzag scanning order. Only relevant for
  1207. non-4:2:0 YUV formats.
  1208. .. raw:: latex
  1209. \normalsize
  1210. .. _v4l2-codec-stateless-vp9:
  1211. ``V4L2_CID_STATELESS_VP9_COMPRESSED_HDR (struct)``
  1212. Stores VP9 probabilities updates as parsed from the current compressed frame
  1213. header. A value of zero in an array element means no update of the relevant
  1214. probability. Motion vector-related updates contain a new value or zero. All
  1215. other updates contain values translated with inv_map_table[] (see 6.3.5 in
  1216. :ref:`vp9`).
  1217. .. c:type:: v4l2_ctrl_vp9_compressed_hdr
  1218. .. tabularcolumns:: |p{1cm}|p{4.8cm}|p{11.4cm}|
  1219. .. cssclass:: longtable
  1220. .. flat-table:: struct v4l2_ctrl_vp9_compressed_hdr
  1221. :header-rows: 0
  1222. :stub-columns: 0
  1223. :widths: 1 1 2
  1224. * - __u8
  1225. - ``tx_mode``
  1226. - Specifies the TX mode. See :ref:`TX Mode <vp9_tx_mode>` for more details.
  1227. * - __u8
  1228. - ``tx8[2][1]``
  1229. - TX 8x8 probabilities delta.
  1230. * - __u8
  1231. - ``tx16[2][2]``
  1232. - TX 16x16 probabilities delta.
  1233. * - __u8
  1234. - ``tx32[2][3]``
  1235. - TX 32x32 probabilities delta.
  1236. * - __u8
  1237. - ``coef[4][2][2][6][6][3]``
  1238. - Coefficient probabilities delta.
  1239. * - __u8
  1240. - ``skip[3]``
  1241. - Skip probabilities delta.
  1242. * - __u8
  1243. - ``inter_mode[7][3]``
  1244. - Inter prediction mode probabilities delta.
  1245. * - __u8
  1246. - ``interp_filter[4][2]``
  1247. - Interpolation filter probabilities delta.
  1248. * - __u8
  1249. - ``is_inter[4]``
  1250. - Is inter-block probabilities delta.
  1251. * - __u8
  1252. - ``comp_mode[5]``
  1253. - Compound prediction mode probabilities delta.
  1254. * - __u8
  1255. - ``single_ref[5][2]``
  1256. - Single reference probabilities delta.
  1257. * - __u8
  1258. - ``comp_ref[5]``
  1259. - Compound reference probabilities delta.
  1260. * - __u8
  1261. - ``y_mode[4][9]``
  1262. - Y prediction mode probabilities delta.
  1263. * - __u8
  1264. - ``uv_mode[10][9]``
  1265. - UV prediction mode probabilities delta.
  1266. * - __u8
  1267. - ``partition[16][3]``
  1268. - Partition probabilities delta.
  1269. * - __u8
  1270. - ``mv.joint[3]``
  1271. - Motion vector joint probabilities delta.
  1272. * - __u8
  1273. - ``mv.sign[2]``
  1274. - Motion vector sign probabilities delta.
  1275. * - __u8
  1276. - ``mv.classes[2][10]``
  1277. - Motion vector class probabilities delta.
  1278. * - __u8
  1279. - ``mv.class0_bit[2]``
  1280. - Motion vector class0 bit probabilities delta.
  1281. * - __u8
  1282. - ``mv.bits[2][10]``
  1283. - Motion vector bits probabilities delta.
  1284. * - __u8
  1285. - ``mv.class0_fr[2][2][3]``
  1286. - Motion vector class0 fractional bit probabilities delta.
  1287. * - __u8
  1288. - ``mv.fr[2][3]``
  1289. - Motion vector fractional bit probabilities delta.
  1290. * - __u8
  1291. - ``mv.class0_hp[2]``
  1292. - Motion vector class0 high precision fractional bit probabilities delta.
  1293. * - __u8
  1294. - ``mv.hp[2]``
  1295. - Motion vector high precision fractional bit probabilities delta.
  1296. .. _vp9_tx_mode:
  1297. ``TX Mode``
  1298. .. tabularcolumns:: |p{6.5cm}|p{0.5cm}|p{10.3cm}|
  1299. .. flat-table::
  1300. :header-rows: 0
  1301. :stub-columns: 0
  1302. :widths: 1 1 2
  1303. * - ``V4L2_VP9_TX_MODE_ONLY_4X4``
  1304. - 0
  1305. - Transform size is 4x4.
  1306. * - ``V4L2_VP9_TX_MODE_ALLOW_8X8``
  1307. - 1
  1308. - Transform size can be up to 8x8.
  1309. * - ``V4L2_VP9_TX_MODE_ALLOW_16X16``
  1310. - 2
  1311. - Transform size can be up to 16x16.
  1312. * - ``V4L2_VP9_TX_MODE_ALLOW_32X32``
  1313. - 3
  1314. - transform size can be up to 32x32.
  1315. * - ``V4L2_VP9_TX_MODE_SELECT``
  1316. - 4
  1317. - Bitstream contains the transform size for each block.
  1318. See section '7.3.1 Tx mode semantics' of the :ref:`vp9` specification for more details.
  1319. ``V4L2_CID_STATELESS_VP9_FRAME (struct)``
  1320. Specifies the frame parameters for the associated VP9 frame decode request.
  1321. This includes the necessary parameters for configuring a stateless hardware
  1322. decoding pipeline for VP9. The bitstream parameters are defined according
  1323. to :ref:`vp9`.
  1324. .. c:type:: v4l2_ctrl_vp9_frame
  1325. .. raw:: latex
  1326. \small
  1327. .. tabularcolumns:: |p{4.7cm}|p{5.5cm}|p{7.1cm}|
  1328. .. cssclass:: longtable
  1329. .. flat-table:: struct v4l2_ctrl_vp9_frame
  1330. :header-rows: 0
  1331. :stub-columns: 0
  1332. :widths: 1 1 2
  1333. * - struct :c:type:`v4l2_vp9_loop_filter`
  1334. - ``lf``
  1335. - Loop filter parameters. See struct :c:type:`v4l2_vp9_loop_filter` for more details.
  1336. * - struct :c:type:`v4l2_vp9_quantization`
  1337. - ``quant``
  1338. - Quantization parameters. See :c:type:`v4l2_vp9_quantization` for more details.
  1339. * - struct :c:type:`v4l2_vp9_segmentation`
  1340. - ``seg``
  1341. - Segmentation parameters. See :c:type:`v4l2_vp9_segmentation` for more details.
  1342. * - __u32
  1343. - ``flags``
  1344. - Combination of V4L2_VP9_FRAME_FLAG_* flags. See :ref:`Frame Flags<vp9_frame_flags>`.
  1345. * - __u16
  1346. - ``compressed_header_size``
  1347. - Compressed header size in bytes.
  1348. * - __u16
  1349. - ``uncompressed_header_size``
  1350. - Uncompressed header size in bytes.
  1351. * - __u16
  1352. - ``frame_width_minus_1``
  1353. - Add 1 to get the frame width expressed in pixels. See section 7.2.3 in :ref:`vp9`.
  1354. * - __u16
  1355. - ``frame_height_minus_1``
  1356. - Add 1 to get the frame height expressed in pixels. See section 7.2.3 in :ref:`vp9`.
  1357. * - __u16
  1358. - ``render_width_minus_1``
  1359. - Add 1 to get the expected render width expressed in pixels. This is
  1360. not used during the decoding process but might be used by HW scalers to
  1361. prepare a frame that's ready for scanout. See section 7.2.4 in :ref:`vp9`.
  1362. * - __u16
  1363. - render_height_minus_1
  1364. - Add 1 to get the expected render height expressed in pixels. This is
  1365. not used during the decoding process but might be used by HW scalers to
  1366. prepare a frame that's ready for scanout. See section 7.2.4 in :ref:`vp9`.
  1367. * - __u64
  1368. - ``last_frame_ts``
  1369. - "last" reference buffer timestamp.
  1370. The timestamp refers to the ``timestamp`` field in
  1371. struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
  1372. function to convert the struct :c:type:`timeval` in struct
  1373. :c:type:`v4l2_buffer` to a __u64.
  1374. * - __u64
  1375. - ``golden_frame_ts``
  1376. - "golden" reference buffer timestamp.
  1377. The timestamp refers to the ``timestamp`` field in
  1378. struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
  1379. function to convert the struct :c:type:`timeval` in struct
  1380. :c:type:`v4l2_buffer` to a __u64.
  1381. * - __u64
  1382. - ``alt_frame_ts``
  1383. - "alt" reference buffer timestamp.
  1384. The timestamp refers to the ``timestamp`` field in
  1385. struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
  1386. function to convert the struct :c:type:`timeval` in struct
  1387. :c:type:`v4l2_buffer` to a __u64.
  1388. * - __u8
  1389. - ``ref_frame_sign_bias``
  1390. - a bitfield specifying whether the sign bias is set for a given
  1391. reference frame. See :ref:`Reference Frame Sign Bias<vp9_ref_frame_sign_bias>`
  1392. for more details.
  1393. * - __u8
  1394. - ``reset_frame_context``
  1395. - specifies whether the frame context should be reset to default values. See
  1396. :ref:`Reset Frame Context<vp9_reset_frame_context>` for more details.
  1397. * - __u8
  1398. - ``frame_context_idx``
  1399. - Frame context that should be used/updated.
  1400. * - __u8
  1401. - ``profile``
  1402. - VP9 profile. Can be 0, 1, 2 or 3.
  1403. * - __u8
  1404. - ``bit_depth``
  1405. - Component depth in bits. Can be 8, 10 or 12. Note that not all profiles
  1406. support 10 and/or 12 bits depths.
  1407. * - __u8
  1408. - ``interpolation_filter``
  1409. - Specifies the filter selection used for performing inter prediction. See
  1410. :ref:`Interpolation Filter<vp9_interpolation_filter>` for more details.
  1411. * - __u8
  1412. - ``tile_cols_log2``
  1413. - Specifies the base 2 logarithm of the width of each tile (where the
  1414. width is measured in units of 8x8 blocks). Shall be less than or equal
  1415. to 6.
  1416. * - __u8
  1417. - ``tile_rows_log2``
  1418. - Specifies the base 2 logarithm of the height of each tile (where the
  1419. height is measured in units of 8x8 blocks).
  1420. * - __u8
  1421. - ``reference_mode``
  1422. - Specifies the type of inter prediction to be used. See
  1423. :ref:`Reference Mode<vp9_reference_mode>` for more details. Note that
  1424. this is derived as part of the compressed header parsing process and
  1425. for this reason should have been part of
  1426. :c:type: `v4l2_ctrl_vp9_compressed_hdr` optional control. It is safe to
  1427. set this value to zero if the driver does not require compressed
  1428. headers.
  1429. * - __u8
  1430. - ``reserved[7]``
  1431. - Applications and drivers must set this to zero.
  1432. .. raw:: latex
  1433. \normalsize
  1434. .. _vp9_frame_flags:
  1435. ``Frame Flags``
  1436. .. tabularcolumns:: |p{10.0cm}|p{1.2cm}|p{6.1cm}|
  1437. .. flat-table::
  1438. :header-rows: 0
  1439. :stub-columns: 0
  1440. :widths: 1 1 2
  1441. * - ``V4L2_VP9_FRAME_FLAG_KEY_FRAME``
  1442. - 0x001
  1443. - The frame is a key frame.
  1444. * - ``V4L2_VP9_FRAME_FLAG_SHOW_FRAME``
  1445. - 0x002
  1446. - The frame should be displayed.
  1447. * - ``V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT``
  1448. - 0x004
  1449. - The decoding should be error resilient.
  1450. * - ``V4L2_VP9_FRAME_FLAG_INTRA_ONLY``
  1451. - 0x008
  1452. - The frame does not reference other frames.
  1453. * - ``V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV``
  1454. - 0x010
  1455. - The frame can use high precision motion vectors.
  1456. * - ``V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX``
  1457. - 0x020
  1458. - Frame context should be updated after decoding.
  1459. * - ``V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE``
  1460. - 0x040
  1461. - Parallel decoding is used.
  1462. * - ``V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING``
  1463. - 0x080
  1464. - Vertical subsampling is enabled.
  1465. * - ``V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING``
  1466. - 0x100
  1467. - Horizontal subsampling is enabled.
  1468. * - ``V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING``
  1469. - 0x200
  1470. - The full UV range is used.
  1471. .. _vp9_ref_frame_sign_bias:
  1472. ``Reference Frame Sign Bias``
  1473. .. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|
  1474. .. flat-table::
  1475. :header-rows: 0
  1476. :stub-columns: 0
  1477. :widths: 1 1 2
  1478. * - ``V4L2_VP9_SIGN_BIAS_LAST``
  1479. - 0x1
  1480. - Sign bias is set for the last reference frame.
  1481. * - ``V4L2_VP9_SIGN_BIAS_GOLDEN``
  1482. - 0x2
  1483. - Sign bias is set for the golden reference frame.
  1484. * - ``V4L2_VP9_SIGN_BIAS_ALT``
  1485. - 0x2
  1486. - Sign bias is set for the alt reference frame.
  1487. .. _vp9_reset_frame_context:
  1488. ``Reset Frame Context``
  1489. .. tabularcolumns:: |p{7.0cm}|p{1.2cm}|p{9.1cm}|
  1490. .. flat-table::
  1491. :header-rows: 0
  1492. :stub-columns: 0
  1493. :widths: 1 1 2
  1494. * - ``V4L2_VP9_RESET_FRAME_CTX_NONE``
  1495. - 0
  1496. - Do not reset any frame context.
  1497. * - ``V4L2_VP9_RESET_FRAME_CTX_SPEC``
  1498. - 1
  1499. - Reset the frame context pointed to by
  1500. :c:type:`v4l2_ctrl_vp9_frame`.frame_context_idx.
  1501. * - ``V4L2_VP9_RESET_FRAME_CTX_ALL``
  1502. - 2
  1503. - Reset all frame contexts.
  1504. See section '7.2 Uncompressed header semantics' of the :ref:`vp9` specification
  1505. for more details.
  1506. .. _vp9_interpolation_filter:
  1507. ``Interpolation Filter``
  1508. .. tabularcolumns:: |p{9.0cm}|p{1.2cm}|p{7.1cm}|
  1509. .. flat-table::
  1510. :header-rows: 0
  1511. :stub-columns: 0
  1512. :widths: 1 1 2
  1513. * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP``
  1514. - 0
  1515. - Eight tap filter.
  1516. * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH``
  1517. - 1
  1518. - Eight tap smooth filter.
  1519. * - ``V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP``
  1520. - 2
  1521. - Eeight tap sharp filter.
  1522. * - ``V4L2_VP9_INTERP_FILTER_BILINEAR``
  1523. - 3
  1524. - Bilinear filter.
  1525. * - ``V4L2_VP9_INTERP_FILTER_SWITCHABLE``
  1526. - 4
  1527. - Filter selection is signaled at the block level.
  1528. See section '7.2.7 Interpolation filter semantics' of the :ref:`vp9` specification
  1529. for more details.
  1530. .. _vp9_reference_mode:
  1531. ``Reference Mode``
  1532. .. tabularcolumns:: |p{9.6cm}|p{0.5cm}|p{7.2cm}|
  1533. .. flat-table::
  1534. :header-rows: 0
  1535. :stub-columns: 0
  1536. :widths: 1 1 2
  1537. * - ``V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE``
  1538. - 0
  1539. - Indicates that all the inter blocks use only a single reference frame
  1540. to generate motion compensated prediction.
  1541. * - ``V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE``
  1542. - 1
  1543. - Requires all the inter blocks to use compound mode. Single reference
  1544. frame prediction is not allowed.
  1545. * - ``V4L2_VP9_REFERENCE_MODE_SELECT``
  1546. - 2
  1547. - Allows each individual inter block to select between single and
  1548. compound prediction modes.
  1549. See section '7.3.6 Frame reference mode semantics' of the :ref:`vp9` specification for more details.
  1550. .. c:type:: v4l2_vp9_segmentation
  1551. Encodes the quantization parameters. See section '7.2.10 Segmentation
  1552. params syntax' of the :ref:`vp9` specification for more details.
  1553. .. tabularcolumns:: |p{0.8cm}|p{5cm}|p{11.4cm}|
  1554. .. cssclass:: longtable
  1555. .. flat-table:: struct v4l2_vp9_segmentation
  1556. :header-rows: 0
  1557. :stub-columns: 0
  1558. :widths: 1 1 2
  1559. * - __u8
  1560. - ``feature_data[8][4]``
  1561. - Data attached to each feature. Data entry is only valid if the feature
  1562. is enabled. The array shall be indexed with segment number as the first dimension
  1563. (0..7) and one of V4L2_VP9_SEG_* as the second dimension.
  1564. See :ref:`Segment Feature IDs<vp9_segment_feature>`.
  1565. * - __u8
  1566. - ``feature_enabled[8]``
  1567. - Bitmask defining which features are enabled in each segment. The value for each
  1568. segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id) values where id is
  1569. one of V4L2_VP9_SEG_*. See :ref:`Segment Feature IDs<vp9_segment_feature>`.
  1570. * - __u8
  1571. - ``tree_probs[7]``
  1572. - Specifies the probability values to be used when decoding a Segment-ID.
  1573. See '5.15 Segmentation map' section of :ref:`vp9` for more details.
  1574. * - __u8
  1575. - ``pred_probs[3]``
  1576. - Specifies the probability values to be used when decoding a
  1577. Predicted-Segment-ID. See '6.4.14 Get segment id syntax'
  1578. section of :ref:`vp9` for more details.
  1579. * - __u8
  1580. - ``flags``
  1581. - Combination of V4L2_VP9_SEGMENTATION_FLAG_* flags. See
  1582. :ref:`Segmentation Flags<vp9_segmentation_flags>`.
  1583. * - __u8
  1584. - ``reserved[5]``
  1585. - Applications and drivers must set this to zero.
  1586. .. _vp9_segment_feature:
  1587. ``Segment feature IDs``
  1588. .. tabularcolumns:: |p{6.0cm}|p{1cm}|p{10.3cm}|
  1589. .. flat-table::
  1590. :header-rows: 0
  1591. :stub-columns: 0
  1592. :widths: 1 1 2
  1593. * - ``V4L2_VP9_SEG_LVL_ALT_Q``
  1594. - 0
  1595. - Quantizer segment feature.
  1596. * - ``V4L2_VP9_SEG_LVL_ALT_L``
  1597. - 1
  1598. - Loop filter segment feature.
  1599. * - ``V4L2_VP9_SEG_LVL_REF_FRAME``
  1600. - 2
  1601. - Reference frame segment feature.
  1602. * - ``V4L2_VP9_SEG_LVL_SKIP``
  1603. - 3
  1604. - Skip segment feature.
  1605. * - ``V4L2_VP9_SEG_LVL_MAX``
  1606. - 4
  1607. - Number of segment features.
  1608. .. _vp9_segmentation_flags:
  1609. ``Segmentation Flags``
  1610. .. tabularcolumns:: |p{10.6cm}|p{0.8cm}|p{5.9cm}|
  1611. .. flat-table::
  1612. :header-rows: 0
  1613. :stub-columns: 0
  1614. :widths: 1 1 2
  1615. * - ``V4L2_VP9_SEGMENTATION_FLAG_ENABLED``
  1616. - 0x01
  1617. - Indicates that this frame makes use of the segmentation tool.
  1618. * - ``V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP``
  1619. - 0x02
  1620. - Indicates that the segmentation map should be updated during the
  1621. decoding of this frame.
  1622. * - ``V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE``
  1623. - 0x04
  1624. - Indicates that the updates to the segmentation map are coded
  1625. relative to the existing segmentation map.
  1626. * - ``V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA``
  1627. - 0x08
  1628. - Indicates that new parameters are about to be specified for each
  1629. segment.
  1630. * - ``V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE``
  1631. - 0x10
  1632. - Indicates that the segmentation parameters represent the actual values
  1633. to be used.
  1634. .. c:type:: v4l2_vp9_quantization
  1635. Encodes the quantization parameters. See section '7.2.9 Quantization params
  1636. syntax' of the VP9 specification for more details.
  1637. .. tabularcolumns:: |p{0.8cm}|p{4cm}|p{12.4cm}|
  1638. .. cssclass:: longtable
  1639. .. flat-table:: struct v4l2_vp9_quantization
  1640. :header-rows: 0
  1641. :stub-columns: 0
  1642. :widths: 1 1 2
  1643. * - __u8
  1644. - ``base_q_idx``
  1645. - Indicates the base frame qindex.
  1646. * - __s8
  1647. - ``delta_q_y_dc``
  1648. - Indicates the Y DC quantizer relative to base_q_idx.
  1649. * - __s8
  1650. - ``delta_q_uv_dc``
  1651. - Indicates the UV DC quantizer relative to base_q_idx.
  1652. * - __s8
  1653. - ``delta_q_uv_ac``
  1654. - Indicates the UV AC quantizer relative to base_q_idx.
  1655. * - __u8
  1656. - ``reserved[4]``
  1657. - Applications and drivers must set this to zero.
  1658. .. c:type:: v4l2_vp9_loop_filter
  1659. This structure contains all loop filter related parameters. See sections
  1660. '7.2.8 Loop filter semantics' of the :ref:`vp9` specification for more details.
  1661. .. tabularcolumns:: |p{0.8cm}|p{4cm}|p{12.4cm}|
  1662. .. cssclass:: longtable
  1663. .. flat-table:: struct v4l2_vp9_loop_filter
  1664. :header-rows: 0
  1665. :stub-columns: 0
  1666. :widths: 1 1 2
  1667. * - __s8
  1668. - ``ref_deltas[4]``
  1669. - Contains the adjustment needed for the filter level based on the chosen
  1670. reference frame.
  1671. * - __s8
  1672. - ``mode_deltas[2]``
  1673. - Contains the adjustment needed for the filter level based on the chosen
  1674. mode.
  1675. * - __u8
  1676. - ``level``
  1677. - Indicates the loop filter strength.
  1678. * - __u8
  1679. - ``sharpness``
  1680. - Indicates the sharpness level.
  1681. * - __u8
  1682. - ``flags``
  1683. - Combination of V4L2_VP9_LOOP_FILTER_FLAG_* flags.
  1684. See :ref:`Loop Filter Flags <vp9_loop_filter_flags>`.
  1685. * - __u8
  1686. - ``reserved[7]``
  1687. - Applications and drivers must set this to zero.
  1688. .. _vp9_loop_filter_flags:
  1689. ``Loop Filter Flags``
  1690. .. tabularcolumns:: |p{9.6cm}|p{0.5cm}|p{7.2cm}|
  1691. .. flat-table::
  1692. :header-rows: 0
  1693. :stub-columns: 0
  1694. :widths: 1 1 2
  1695. * - ``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED``
  1696. - 0x1
  1697. - When set, the filter level depends on the mode and reference frame used
  1698. to predict a block.
  1699. * - ``V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE``
  1700. - 0x2
  1701. - When set, the bitstream contains additional syntax elements that
  1702. specify which mode and reference frame deltas are to be updated.
  1703. .. _v4l2-codec-stateless-hevc:
  1704. ``V4L2_CID_STATELESS_HEVC_SPS (struct)``
  1705. Specifies the Sequence Parameter Set fields (as extracted from the
  1706. bitstream) for the associated HEVC slice data.
  1707. These bitstream parameters are defined according to :ref:`hevc`.
  1708. They are described in section 7.4.3.2 "Sequence parameter set RBSP
  1709. semantics" of the specification.
  1710. .. c:type:: v4l2_ctrl_hevc_sps
  1711. .. raw:: latex
  1712. \small
  1713. .. tabularcolumns:: |p{1.2cm}|p{9.2cm}|p{6.9cm}|
  1714. .. cssclass:: longtable
  1715. .. flat-table:: struct v4l2_ctrl_hevc_sps
  1716. :header-rows: 0
  1717. :stub-columns: 0
  1718. :widths: 1 1 2
  1719. * - __u8
  1720. - ``video_parameter_set_id``
  1721. - Specifies the value of the vps_video_parameter_set_id of the active VPS
  1722. as described in section "7.4.3.2.1 General sequence parameter set RBSP semantics"
  1723. of H.265 specifications.
  1724. * - __u8
  1725. - ``seq_parameter_set_id``
  1726. - Provides an identifier for the SPS for reference by other syntax elements
  1727. as described in section "7.4.3.2.1 General sequence parameter set RBSP semantics"
  1728. of H.265 specifications.
  1729. * - __u16
  1730. - ``pic_width_in_luma_samples``
  1731. - Specifies the width of each decoded picture in units of luma samples.
  1732. * - __u16
  1733. - ``pic_height_in_luma_samples``
  1734. - Specifies the height of each decoded picture in units of luma samples.
  1735. * - __u8
  1736. - ``bit_depth_luma_minus8``
  1737. - This value plus 8 specifies the bit depth of the samples of the luma array.
  1738. * - __u8
  1739. - ``bit_depth_chroma_minus8``
  1740. - This value plus 8 specifies the bit depth of the samples of the chroma arrays.
  1741. * - __u8
  1742. - ``log2_max_pic_order_cnt_lsb_minus4``
  1743. - Specifies the value of the variable MaxPicOrderCntLsb.
  1744. * - __u8
  1745. - ``sps_max_dec_pic_buffering_minus1``
  1746. - This value plus 1 specifies the maximum required size of the decoded picture buffer for
  1747. the coded video sequence (CVS).
  1748. * - __u8
  1749. - ``sps_max_num_reorder_pics``
  1750. - Indicates the maximum allowed number of pictures.
  1751. * - __u8
  1752. - ``sps_max_latency_increase_plus1``
  1753. - Used to signal MaxLatencyPictures, which indicates the maximum number of
  1754. pictures that can precede any picture in output order and follow that
  1755. picture in decoding order.
  1756. * - __u8
  1757. - ``log2_min_luma_coding_block_size_minus3``
  1758. - This value plus 3 specifies the minimum luma coding block size.
  1759. * - __u8
  1760. - ``log2_diff_max_min_luma_coding_block_size``
  1761. - Specifies the difference between the maximum and minimum luma coding block size.
  1762. * - __u8
  1763. - ``log2_min_luma_transform_block_size_minus2``
  1764. - This value plus 2 specifies the minimum luma transform block size.
  1765. * - __u8
  1766. - ``log2_diff_max_min_luma_transform_block_size``
  1767. - Specifies the difference between the maximum and minimum luma transform block size.
  1768. * - __u8
  1769. - ``max_transform_hierarchy_depth_inter``
  1770. - Specifies the maximum hierarchy depth for transform units of coding units coded
  1771. in inter prediction mode.
  1772. * - __u8
  1773. - ``max_transform_hierarchy_depth_intra``
  1774. - Specifies the maximum hierarchy depth for transform units of coding units coded in
  1775. intra prediction mode.
  1776. * - __u8
  1777. - ``pcm_sample_bit_depth_luma_minus1``
  1778. - This value plus 1 specifies the number of bits used to represent each of PCM sample values of the
  1779. luma component.
  1780. * - __u8
  1781. - ``pcm_sample_bit_depth_chroma_minus1``
  1782. - Specifies the number of bits used to represent each of PCM sample values of
  1783. the chroma components.
  1784. * - __u8
  1785. - ``log2_min_pcm_luma_coding_block_size_minus3``
  1786. - Plus 3 specifies the minimum size of coding blocks.
  1787. * - __u8
  1788. - ``log2_diff_max_min_pcm_luma_coding_block_size``
  1789. - Specifies the difference between the maximum and minimum size of coding blocks.
  1790. * - __u8
  1791. - ``num_short_term_ref_pic_sets``
  1792. - Specifies the number of st_ref_pic_set() syntax structures included in the SPS.
  1793. * - __u8
  1794. - ``num_long_term_ref_pics_sps``
  1795. - Specifies the number of candidate long-term reference pictures that are
  1796. specified in the SPS.
  1797. * - __u8
  1798. - ``chroma_format_idc``
  1799. - Specifies the chroma sampling.
  1800. * - __u8
  1801. - ``sps_max_sub_layers_minus1``
  1802. - This value plus 1 specifies the maximum number of temporal sub-layers.
  1803. * - __u64
  1804. - ``flags``
  1805. - See :ref:`Sequence Parameter Set Flags <hevc_sps_flags>`
  1806. .. raw:: latex
  1807. \normalsize
  1808. .. _hevc_sps_flags:
  1809. ``Sequence Parameter Set Flags``
  1810. .. raw:: latex
  1811. \small
  1812. .. cssclass:: longtable
  1813. .. flat-table::
  1814. :header-rows: 0
  1815. :stub-columns: 0
  1816. :widths: 1 1 2
  1817. * - ``V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE``
  1818. - 0x00000001
  1819. -
  1820. * - ``V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED``
  1821. - 0x00000002
  1822. -
  1823. * - ``V4L2_HEVC_SPS_FLAG_AMP_ENABLED``
  1824. - 0x00000004
  1825. -
  1826. * - ``V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET``
  1827. - 0x00000008
  1828. -
  1829. * - ``V4L2_HEVC_SPS_FLAG_PCM_ENABLED``
  1830. - 0x00000010
  1831. -
  1832. * - ``V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED``
  1833. - 0x00000020
  1834. -
  1835. * - ``V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT``
  1836. - 0x00000040
  1837. -
  1838. * - ``V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED``
  1839. - 0x00000080
  1840. -
  1841. * - ``V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED``
  1842. - 0x00000100
  1843. -
  1844. .. raw:: latex
  1845. \normalsize
  1846. ``V4L2_CID_STATELESS_HEVC_PPS (struct)``
  1847. Specifies the Picture Parameter Set fields (as extracted from the
  1848. bitstream) for the associated HEVC slice data.
  1849. These bitstream parameters are defined according to :ref:`hevc`.
  1850. They are described in section 7.4.3.3 "Picture parameter set RBSP
  1851. semantics" of the specification.
  1852. .. c:type:: v4l2_ctrl_hevc_pps
  1853. .. tabularcolumns:: |p{1.2cm}|p{8.6cm}|p{7.5cm}|
  1854. .. cssclass:: longtable
  1855. .. flat-table:: struct v4l2_ctrl_hevc_pps
  1856. :header-rows: 0
  1857. :stub-columns: 0
  1858. :widths: 1 1 2
  1859. * - __u8
  1860. - ``pic_parameter_set_id``
  1861. - Identifies the PPS for reference by other syntax elements.
  1862. * - __u8
  1863. - ``num_extra_slice_header_bits``
  1864. - Specifies the number of extra slice header bits that are present
  1865. in the slice header RBSP for coded pictures referring to the PPS.
  1866. * - __u8
  1867. - ``num_ref_idx_l0_default_active_minus1``
  1868. - This value plus 1 specifies the inferred value of num_ref_idx_l0_active_minus1.
  1869. * - __u8
  1870. - ``num_ref_idx_l1_default_active_minus1``
  1871. - This value plus 1 specifies the inferred value of num_ref_idx_l1_active_minus1.
  1872. * - __s8
  1873. - ``init_qp_minus26``
  1874. - This value plus 26 specifies the initial value of SliceQp Y for each slice
  1875. referring to the PPS.
  1876. * - __u8
  1877. - ``diff_cu_qp_delta_depth``
  1878. - Specifies the difference between the luma coding tree block size
  1879. and the minimum luma coding block size of coding units that
  1880. convey cu_qp_delta_abs and cu_qp_delta_sign_flag.
  1881. * - __s8
  1882. - ``pps_cb_qp_offset``
  1883. - Specifies the offsets to the luma quantization parameter Cb.
  1884. * - __s8
  1885. - ``pps_cr_qp_offset``
  1886. - Specifies the offsets to the luma quantization parameter Cr.
  1887. * - __u8
  1888. - ``num_tile_columns_minus1``
  1889. - This value plus 1 specifies the number of tile columns partitioning the picture.
  1890. * - __u8
  1891. - ``num_tile_rows_minus1``
  1892. - This value plus 1 specifies the number of tile rows partitioning the picture.
  1893. * - __u8
  1894. - ``column_width_minus1[20]``
  1895. - This value plus 1 specifies the width of the i-th tile column in units of
  1896. coding tree blocks.
  1897. * - __u8
  1898. - ``row_height_minus1[22]``
  1899. - This value plus 1 specifies the height of the i-th tile row in units of coding
  1900. tree blocks.
  1901. * - __s8
  1902. - ``pps_beta_offset_div2``
  1903. - Specifies the default deblocking parameter offsets for beta divided by 2.
  1904. * - __s8
  1905. - ``pps_tc_offset_div2``
  1906. - Specifies the default deblocking parameter offsets for tC divided by 2.
  1907. * - __u8
  1908. - ``log2_parallel_merge_level_minus2``
  1909. - This value plus 2 specifies the value of the variable Log2ParMrgLevel.
  1910. * - __u8
  1911. - ``padding[4]``
  1912. - Applications and drivers must set this to zero.
  1913. * - __u64
  1914. - ``flags``
  1915. - See :ref:`Picture Parameter Set Flags <hevc_pps_flags>`
  1916. .. _hevc_pps_flags:
  1917. ``Picture Parameter Set Flags``
  1918. .. raw:: latex
  1919. \small
  1920. .. flat-table::
  1921. :header-rows: 0
  1922. :stub-columns: 0
  1923. :widths: 1 1 2
  1924. * - ``V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED``
  1925. - 0x00000001
  1926. -
  1927. * - ``V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT``
  1928. - 0x00000002
  1929. -
  1930. * - ``V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED``
  1931. - 0x00000004
  1932. -
  1933. * - ``V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT``
  1934. - 0x00000008
  1935. -
  1936. * - ``V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED``
  1937. - 0x00000010
  1938. -
  1939. * - ``V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED``
  1940. - 0x00000020
  1941. -
  1942. * - ``V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED``
  1943. - 0x00000040
  1944. -
  1945. * - ``V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT``
  1946. - 0x00000080
  1947. -
  1948. * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED``
  1949. - 0x00000100
  1950. -
  1951. * - ``V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED``
  1952. - 0x00000200
  1953. -
  1954. * - ``V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED``
  1955. - 0x00000400
  1956. -
  1957. * - ``V4L2_HEVC_PPS_FLAG_TILES_ENABLED``
  1958. - 0x00000800
  1959. -
  1960. * - ``V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED``
  1961. - 0x00001000
  1962. -
  1963. * - ``V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED``
  1964. - 0x00002000
  1965. -
  1966. * - ``V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED``
  1967. - 0x00004000
  1968. -
  1969. * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED``
  1970. - 0x00008000
  1971. -
  1972. * - ``V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER``
  1973. - 0x00010000
  1974. -
  1975. * - ``V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT``
  1976. - 0x00020000
  1977. -
  1978. * - ``V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT``
  1979. - 0x00040000
  1980. -
  1981. * - ``V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT``
  1982. - 0x00080000
  1983. - Specifies the presence of deblocking filter control syntax elements in
  1984. the PPS
  1985. * - ``V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING``
  1986. - 0x00100000
  1987. - Specifies that tile column boundaries and likewise tile row boundaries
  1988. are distributed uniformly across the picture
  1989. .. raw:: latex
  1990. \normalsize
  1991. ``V4L2_CID_STATELESS_HEVC_SLICE_PARAMS (struct)``
  1992. Specifies various slice-specific parameters, especially from the NAL unit
  1993. header, general slice segment header and weighted prediction parameter
  1994. parts of the bitstream.
  1995. These bitstream parameters are defined according to :ref:`hevc`.
  1996. They are described in section 7.4.7 "General slice segment header
  1997. semantics" of the specification.
  1998. This control is a dynamically sized 1-dimensional array,
  1999. V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it.
  2000. .. c:type:: v4l2_ctrl_hevc_slice_params
  2001. .. raw:: latex
  2002. \scriptsize
  2003. .. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|
  2004. .. cssclass:: longtable
  2005. .. flat-table:: struct v4l2_ctrl_hevc_slice_params
  2006. :header-rows: 0
  2007. :stub-columns: 0
  2008. :widths: 1 1 2
  2009. * - __u32
  2010. - ``bit_size``
  2011. - Size (in bits) of the current slice data.
  2012. * - __u32
  2013. - ``data_byte_offset``
  2014. - Offset (in byte) to the video data in the current slice data.
  2015. * - __u32
  2016. - ``num_entry_point_offsets``
  2017. - Specifies the number of entry point offset syntax elements in the slice header.
  2018. When the driver supports it, the ``V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS``
  2019. must be set.
  2020. * - __u8
  2021. - ``nal_unit_type``
  2022. - Specifies the coding type of the slice (B, P or I).
  2023. * - __u8
  2024. - ``nuh_temporal_id_plus1``
  2025. - Minus 1 specifies a temporal identifier for the NAL unit.
  2026. * - __u8
  2027. - ``slice_type``
  2028. -
  2029. (V4L2_HEVC_SLICE_TYPE_I, V4L2_HEVC_SLICE_TYPE_P or
  2030. V4L2_HEVC_SLICE_TYPE_B).
  2031. * - __u8
  2032. - ``colour_plane_id``
  2033. - Specifies the colour plane associated with the current slice.
  2034. * - __s32
  2035. - ``slice_pic_order_cnt``
  2036. - Specifies the picture order count.
  2037. * - __u8
  2038. - ``num_ref_idx_l0_active_minus1``
  2039. - This value plus 1 specifies the maximum reference index for reference picture list 0
  2040. that may be used to decode the slice.
  2041. * - __u8
  2042. - ``num_ref_idx_l1_active_minus1``
  2043. - This value plus 1 specifies the maximum reference index for reference picture list 1
  2044. that may be used to decode the slice.
  2045. * - __u8
  2046. - ``collocated_ref_idx``
  2047. - Specifies the reference index of the collocated picture used for
  2048. temporal motion vector prediction.
  2049. * - __u8
  2050. - ``five_minus_max_num_merge_cand``
  2051. - Specifies the maximum number of merging motion vector prediction
  2052. candidates supported in the slice subtracted from 5.
  2053. * - __s8
  2054. - ``slice_qp_delta``
  2055. - Specifies the initial value of QpY to be used for the coding blocks in the slice.
  2056. * - __s8
  2057. - ``slice_cb_qp_offset``
  2058. - Specifies a difference to be added to the value of pps_cb_qp_offset.
  2059. * - __s8
  2060. - ``slice_cr_qp_offset``
  2061. - Specifies a difference to be added to the value of pps_cr_qp_offset.
  2062. * - __s8
  2063. - ``slice_act_y_qp_offset``
  2064. - Specifies the offset to the luma of quantization parameter qP derived in section 8.6.2
  2065. * - __s8
  2066. - ``slice_act_cb_qp_offset``
  2067. - Specifies the offset to the cb of quantization parameter qP derived in section 8.6.2
  2068. * - __s8
  2069. - ``slice_act_cr_qp_offset``
  2070. - Specifies the offset to the cr of quantization parameter qP derived in section 8.6.2
  2071. * - __s8
  2072. - ``slice_beta_offset_div2``
  2073. - Specifies the deblocking parameter offsets for beta divided by 2.
  2074. * - __s8
  2075. - ``slice_tc_offset_div2``
  2076. - Specifies the deblocking parameter offsets for tC divided by 2.
  2077. * - __u8
  2078. - ``pic_struct``
  2079. - Indicates whether a picture should be displayed as a frame or as one or more fields.
  2080. * - __u32
  2081. - ``slice_segment_addr``
  2082. - Specifies the address of the first coding tree block in the slice segment.
  2083. * - __u8
  2084. - ``ref_idx_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
  2085. - The list of L0 reference elements as indices in the DPB.
  2086. * - __u8
  2087. - ``ref_idx_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
  2088. - The list of L1 reference elements as indices in the DPB.
  2089. * - __u16
  2090. - ``short_term_ref_pic_set_size``
  2091. - Specifies the size, in bits, of the short-term reference picture set, described as st_ref_pic_set()
  2092. in the specification, included in the slice header or SPS (section 7.3.6.1).
  2093. * - __u16
  2094. - ``long_term_ref_pic_set_size``
  2095. - Specifies the size, in bits, of the long-term reference picture set include in the slice header
  2096. or SPS. It is the number of bits in the conditional block if(long_term_ref_pics_present_flag)
  2097. in section 7.3.6.1 of the specification.
  2098. * - __u8
  2099. - ``padding``
  2100. - Applications and drivers must set this to zero.
  2101. * - struct :c:type:`v4l2_hevc_pred_weight_table`
  2102. - ``pred_weight_table``
  2103. - The prediction weight coefficients for inter-picture prediction.
  2104. * - __u64
  2105. - ``flags``
  2106. - See :ref:`Slice Parameters Flags <hevc_slice_params_flags>`
  2107. .. raw:: latex
  2108. \normalsize
  2109. .. _hevc_slice_params_flags:
  2110. ``Slice Parameters Flags``
  2111. .. raw:: latex
  2112. \scriptsize
  2113. .. flat-table::
  2114. :header-rows: 0
  2115. :stub-columns: 0
  2116. :widths: 1 1 2
  2117. * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA``
  2118. - 0x00000001
  2119. -
  2120. * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA``
  2121. - 0x00000002
  2122. -
  2123. * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED``
  2124. - 0x00000004
  2125. -
  2126. * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO``
  2127. - 0x00000008
  2128. -
  2129. * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT``
  2130. - 0x00000010
  2131. -
  2132. * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0``
  2133. - 0x00000020
  2134. -
  2135. * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV``
  2136. - 0x00000040
  2137. -
  2138. * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED``
  2139. - 0x00000080
  2140. -
  2141. * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED``
  2142. - 0x00000100
  2143. -
  2144. * - ``V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT``
  2145. - 0x00000200
  2146. -
  2147. .. raw:: latex
  2148. \normalsize
  2149. ``V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (integer)``
  2150. Specifies entry point offsets in bytes.
  2151. This control is a dynamically sized array. The number of entry point
  2152. offsets is reported by the ``elems`` field.
  2153. This bitstream parameter is defined according to :ref:`hevc`.
  2154. They are described in section 7.4.7.1 "General slice segment header
  2155. semantics" of the specification.
  2156. When multiple slices are submitted in a request, the length of
  2157. this array must be the sum of num_entry_point_offsets of all the
  2158. slices in the request.
  2159. ``V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (struct)``
  2160. Specifies the HEVC scaling matrix parameters used for the scaling process
  2161. for transform coefficients.
  2162. These matrix and parameters are defined according to :ref:`hevc`.
  2163. They are described in section 7.4.5 "Scaling list data semantics" of
  2164. the specification.
  2165. .. c:type:: v4l2_ctrl_hevc_scaling_matrix
  2166. .. raw:: latex
  2167. \scriptsize
  2168. .. tabularcolumns:: |p{5.4cm}|p{6.8cm}|p{5.1cm}|
  2169. .. cssclass:: longtable
  2170. .. flat-table:: struct v4l2_ctrl_hevc_scaling_matrix
  2171. :header-rows: 0
  2172. :stub-columns: 0
  2173. :widths: 1 1 2
  2174. * - __u8
  2175. - ``scaling_list_4x4[6][16]``
  2176. - Scaling list is used for the scaling process for transform
  2177. coefficients. The values on each scaling list are expected
  2178. in raster scan order.
  2179. * - __u8
  2180. - ``scaling_list_8x8[6][64]``
  2181. - Scaling list is used for the scaling process for transform
  2182. coefficients. The values on each scaling list are expected
  2183. in raster scan order.
  2184. * - __u8
  2185. - ``scaling_list_16x16[6][64]``
  2186. - Scaling list is used for the scaling process for transform
  2187. coefficients. The values on each scaling list are expected
  2188. in raster scan order.
  2189. * - __u8
  2190. - ``scaling_list_32x32[2][64]``
  2191. - Scaling list is used for the scaling process for transform
  2192. coefficients. The values on each scaling list are expected
  2193. in raster scan order.
  2194. * - __u8
  2195. - ``scaling_list_dc_coef_16x16[6]``
  2196. - Scaling list is used for the scaling process for transform
  2197. coefficients. The values on each scaling list are expected
  2198. in raster scan order.
  2199. * - __u8
  2200. - ``scaling_list_dc_coef_32x32[2]``
  2201. - Scaling list is used for the scaling process for transform
  2202. coefficients. The values on each scaling list are expected
  2203. in raster scan order.
  2204. .. raw:: latex
  2205. \normalsize
  2206. .. c:type:: v4l2_hevc_dpb_entry
  2207. .. raw:: latex
  2208. \small
  2209. .. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{12.1cm}|
  2210. .. flat-table:: struct v4l2_hevc_dpb_entry
  2211. :header-rows: 0
  2212. :stub-columns: 0
  2213. :widths: 1 1 2
  2214. * - __u64
  2215. - ``timestamp``
  2216. - Timestamp of the V4L2 capture buffer to use as reference, used
  2217. with B-coded and P-coded frames. The timestamp refers to the
  2218. ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
  2219. :c:func:`v4l2_timeval_to_ns()` function to convert the struct
  2220. :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
  2221. * - __u8
  2222. - ``flags``
  2223. - Long term flag for the reference frame
  2224. (V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE). The flag is set as
  2225. described in the ITU HEVC specification chapter "8.3.2 Decoding
  2226. process for reference picture set".
  2227. * - __u8
  2228. - ``field_pic``
  2229. - Whether the reference is a field picture or a frame.
  2230. See :ref:`HEVC dpb field pic Flags <hevc_dpb_field_pic_flags>`
  2231. * - __s32
  2232. - ``pic_order_cnt_val``
  2233. - The picture order count of the current picture.
  2234. * - __u8
  2235. - ``padding[2]``
  2236. - Applications and drivers must set this to zero.
  2237. .. raw:: latex
  2238. \normalsize
  2239. .. _hevc_dpb_field_pic_flags:
  2240. ``HEVC dpb field pic Flags``
  2241. .. raw:: latex
  2242. \scriptsize
  2243. .. flat-table::
  2244. :header-rows: 0
  2245. :stub-columns: 0
  2246. :widths: 1 1 2
  2247. * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME``
  2248. - 0
  2249. - (progressive) Frame
  2250. * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD``
  2251. - 1
  2252. - Top field
  2253. * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD``
  2254. - 2
  2255. - Bottom field
  2256. * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM``
  2257. - 3
  2258. - Top field, bottom field, in that order
  2259. * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP``
  2260. - 4
  2261. - Bottom field, top field, in that order
  2262. * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP``
  2263. - 5
  2264. - Top field, bottom field, top field repeated, in that order
  2265. * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM``
  2266. - 6
  2267. - Bottom field, top field, bottom field repeated, in that order
  2268. * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING``
  2269. - 7
  2270. - Frame doubling
  2271. * - ``V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING``
  2272. - 8
  2273. - Frame tripling
  2274. * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM``
  2275. - 9
  2276. - Top field paired with previous bottom field in output order
  2277. * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP``
  2278. - 10
  2279. - Bottom field paired with previous top field in output order
  2280. * - ``V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM``
  2281. - 11
  2282. - Top field paired with next bottom field in output order
  2283. * - ``V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP``
  2284. - 12
  2285. - Bottom field paired with next top field in output order
  2286. .. c:type:: v4l2_hevc_pred_weight_table
  2287. .. raw:: latex
  2288. \footnotesize
  2289. .. tabularcolumns:: |p{0.8cm}|p{10.6cm}|p{5.9cm}|
  2290. .. flat-table:: struct v4l2_hevc_pred_weight_table
  2291. :header-rows: 0
  2292. :stub-columns: 0
  2293. :widths: 1 1 2
  2294. * - __s8
  2295. - ``delta_luma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
  2296. - The difference of the weighting factor applied to the luma
  2297. prediction value for list 0.
  2298. * - __s8
  2299. - ``luma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
  2300. - The additive offset applied to the luma prediction value for list 0.
  2301. * - __s8
  2302. - ``delta_chroma_weight_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
  2303. - The difference of the weighting factor applied to the chroma
  2304. prediction value for list 0.
  2305. * - __s8
  2306. - ``chroma_offset_l0[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
  2307. - The difference of the additive offset applied to the chroma
  2308. prediction values for list 0.
  2309. * - __s8
  2310. - ``delta_luma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
  2311. - The difference of the weighting factor applied to the luma
  2312. prediction value for list 1.
  2313. * - __s8
  2314. - ``luma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
  2315. - The additive offset applied to the luma prediction value for list 1.
  2316. * - __s8
  2317. - ``delta_chroma_weight_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
  2318. - The difference of the weighting factor applied to the chroma
  2319. prediction value for list 1.
  2320. * - __s8
  2321. - ``chroma_offset_l1[V4L2_HEVC_DPB_ENTRIES_NUM_MAX][2]``
  2322. - The difference of the additive offset applied to the chroma
  2323. prediction values for list 1.
  2324. * - __u8
  2325. - ``luma_log2_weight_denom``
  2326. - The base 2 logarithm of the denominator for all luma weighting
  2327. factors.
  2328. * - __s8
  2329. - ``delta_chroma_log2_weight_denom``
  2330. - The difference of the base 2 logarithm of the denominator for
  2331. all chroma weighting factors.
  2332. * - __u8
  2333. - ``padding[6]``
  2334. - Applications and drivers must set this to zero.
  2335. .. raw:: latex
  2336. \normalsize
  2337. ``V4L2_CID_STATELESS_HEVC_DECODE_MODE (enum)``
  2338. Specifies the decoding mode to use. Currently exposes slice-based and
  2339. frame-based decoding but new modes might be added later on.
  2340. This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
  2341. pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
  2342. are required to set this control in order to specify the decoding mode
  2343. that is expected for the buffer.
  2344. Drivers may expose a single or multiple decoding modes, depending
  2345. on what they can support.
  2346. .. c:type:: v4l2_stateless_hevc_decode_mode
  2347. .. raw:: latex
  2348. \small
  2349. .. tabularcolumns:: |p{9.4cm}|p{0.6cm}|p{7.3cm}|
  2350. .. flat-table::
  2351. :header-rows: 0
  2352. :stub-columns: 0
  2353. :widths: 1 1 2
  2354. * - ``V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED``
  2355. - 0
  2356. - Decoding is done at the slice granularity.
  2357. The OUTPUT buffer must contain a single slice.
  2358. * - ``V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED``
  2359. - 1
  2360. - Decoding is done at the frame granularity.
  2361. The OUTPUT buffer must contain all slices needed to decode the
  2362. frame.
  2363. .. raw:: latex
  2364. \normalsize
  2365. ``V4L2_CID_STATELESS_HEVC_START_CODE (enum)``
  2366. Specifies the HEVC slice start code expected for each slice.
  2367. This control is used as a modifier for V4L2_PIX_FMT_HEVC_SLICE
  2368. pixel format. Applications that support V4L2_PIX_FMT_HEVC_SLICE
  2369. are required to set this control in order to specify the start code
  2370. that is expected for the buffer.
  2371. Drivers may expose a single or multiple start codes, depending
  2372. on what they can support.
  2373. .. c:type:: v4l2_stateless_hevc_start_code
  2374. .. tabularcolumns:: |p{9.2cm}|p{0.6cm}|p{7.5cm}|
  2375. .. flat-table::
  2376. :header-rows: 0
  2377. :stub-columns: 0
  2378. :widths: 1 1 2
  2379. * - ``V4L2_STATELESS_HEVC_START_CODE_NONE``
  2380. - 0
  2381. - Selecting this value specifies that HEVC slices are passed
  2382. to the driver without any start code. The bitstream data should be
  2383. according to :ref:`hevc` 7.3.1.1 General NAL unit syntax, hence
  2384. contains emulation prevention bytes when required.
  2385. * - ``V4L2_STATELESS_HEVC_START_CODE_ANNEX_B``
  2386. - 1
  2387. - Selecting this value specifies that HEVC slices are expected
  2388. to be prefixed by Annex B start codes. According to :ref:`hevc`
  2389. valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
  2390. .. raw:: latex
  2391. \normalsize
  2392. ``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID (integer)``
  2393. Specifies a priority identifier for the NAL unit, which will be applied to
  2394. the base layer. By default this value is set to 0 for the base layer,
  2395. and the next layer will have the priority ID assigned as 1, 2, 3 and so on.
  2396. The video encoder can't decide the priority id to be applied to a layer,
  2397. so this has to come from client.
  2398. This is applicable to H264 and valid Range is from 0 to 63.
  2399. Source Rec. ITU-T H.264 (06/2019); G.7.4.1.1, G.8.8.1.
  2400. ``V4L2_CID_MPEG_VIDEO_LTR_COUNT (integer)``
  2401. Specifies the maximum number of Long Term Reference (LTR) frames at any
  2402. given time that the encoder can keep.
  2403. This is applicable to the H264 and HEVC encoders.
  2404. ``V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (integer)``
  2405. After setting this control the frame that will be queued next
  2406. will be marked as a Long Term Reference (LTR) frame
  2407. and given this LTR index which ranges from 0 to LTR_COUNT-1.
  2408. This is applicable to the H264 and HEVC encoders.
  2409. Source Rec. ITU-T H.264 (06/2019); Table 7.9
  2410. ``V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES (bitmask)``
  2411. Specifies the Long Term Reference (LTR) frame(s) to be used for
  2412. encoding the next frame queued after setting this control.
  2413. This provides a bitmask which consists of bits [0, LTR_COUNT-1].
  2414. This is applicable to the H264 and HEVC encoders.
  2415. ``V4L2_CID_STATELESS_HEVC_DECODE_PARAMS (struct)``
  2416. Specifies various decode parameters, especially the references picture order
  2417. count (POC) for all the lists (short, long, before, current, after) and the
  2418. number of entries for each of them.
  2419. These parameters are defined according to :ref:`hevc`.
  2420. They are described in section 8.3 "Slice decoding process" of the
  2421. specification.
  2422. .. c:type:: v4l2_ctrl_hevc_decode_params
  2423. .. cssclass:: longtable
  2424. .. flat-table:: struct v4l2_ctrl_hevc_decode_params
  2425. :header-rows: 0
  2426. :stub-columns: 0
  2427. :widths: 1 1 2
  2428. * - __s32
  2429. - ``pic_order_cnt_val``
  2430. - PicOrderCntVal as described in section 8.3.1 "Decoding process
  2431. for picture order count" of the specification.
  2432. * - __u16
  2433. - ``short_term_ref_pic_set_size``
  2434. - Specifies the size, in bits, of the short-term reference picture set, of the first slice
  2435. described as st_ref_pic_set() in the specification, included in the slice header
  2436. or SPS (section 7.3.6.1).
  2437. * - __u16
  2438. - ``long_term_ref_pic_set_size``
  2439. - Specifies the size, in bits, of the long-term reference picture set, of the first slice
  2440. included in the slice header or SPS. It is the number of bits in the conditional block
  2441. if(long_term_ref_pics_present_flag) in section 7.3.6.1 of the specification.
  2442. * - __u8
  2443. - ``num_active_dpb_entries``
  2444. - The number of entries in ``dpb``.
  2445. * - __u8
  2446. - ``num_poc_st_curr_before``
  2447. - The number of reference pictures in the short-term set that come before
  2448. the current frame.
  2449. * - __u8
  2450. - ``num_poc_st_curr_after``
  2451. - The number of reference pictures in the short-term set that come after
  2452. the current frame.
  2453. * - __u8
  2454. - ``num_poc_lt_curr``
  2455. - The number of reference pictures in the long-term set.
  2456. * - __u8
  2457. - ``poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
  2458. - PocStCurrBefore as described in section 8.3.2 "Decoding process for reference
  2459. picture set": provides the index of the short term before references in DPB array.
  2460. * - __u8
  2461. - ``poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
  2462. - PocStCurrAfter as described in section 8.3.2 "Decoding process for reference
  2463. picture set": provides the index of the short term after references in DPB array.
  2464. * - __u8
  2465. - ``poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
  2466. - PocLtCurr as described in section 8.3.2 "Decoding process for reference
  2467. picture set": provides the index of the long term references in DPB array.
  2468. * - __u8
  2469. - ``num_delta_pocs_of_ref_rps_idx``
  2470. - When the short_term_ref_pic_set_sps_flag in the slice header is equal to 0,
  2471. it is the same as the derived value NumDeltaPocs[RefRpsIdx]. It can be used to parse
  2472. the RPS data in slice headers instead of skipping it with @short_term_ref_pic_set_size.
  2473. When the value of short_term_ref_pic_set_sps_flag in the slice header is
  2474. equal to 1, num_delta_pocs_of_ref_rps_idx shall be set to 0.
  2475. * - struct :c:type:`v4l2_hevc_dpb_entry`
  2476. - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
  2477. - The decoded picture buffer, for meta-data about reference frames.
  2478. * - __u64
  2479. - ``flags``
  2480. - See :ref:`Decode Parameters Flags <hevc_decode_params_flags>`
  2481. .. _hevc_decode_params_flags:
  2482. ``Decode Parameters Flags``
  2483. .. cssclass:: longtable
  2484. .. flat-table::
  2485. :header-rows: 0
  2486. :stub-columns: 0
  2487. :widths: 1 1 2
  2488. * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC``
  2489. - 0x00000001
  2490. -
  2491. * - ``V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC``
  2492. - 0x00000002
  2493. -
  2494. * - ``V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR``
  2495. - 0x00000004
  2496. -
  2497. ``V4L2_CID_STATELESS_HEVC_EXT_SPS_LT_RPS (struct)``
  2498. Subset of the :c:type:`v4l2_ctrl_hevc_sps` control.
  2499. It extends it with the list of Long-term reference sets parameters.
  2500. These parameters are defined according to :ref:`hevc`.
  2501. They are described in section 7.4.3.2.1 "General sequence parameter set
  2502. RBSP semantics" of the specification.
  2503. This control is a dynamically sized 1-dimensional array.
  2504. The values in the array should be ignored when either
  2505. num_long_term_ref_pics_sps is 0 or the
  2506. V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT flag is not set in
  2507. :c:type:`v4l2_ctrl_hevc_sps`.
  2508. .. c:type:: v4l2_ctrl_hevc_ext_sps_lt_rps
  2509. .. cssclass:: longtable
  2510. .. flat-table:: struct v4l2_ctrl_hevc_ext_sps_lt_rps
  2511. :header-rows: 0
  2512. :stub-columns: 0
  2513. :widths: 1 1 2
  2514. * - __u16
  2515. - ``lt_ref_pic_poc_lsb_sps``
  2516. - Long term reference picture order count as described in section 7.4.3.2.1
  2517. "General sequence parameter set RBSP semantics" of the specification.
  2518. * - __u16
  2519. - ``flags``
  2520. - See :ref:`Extended Long-Term RPS Flags <hevc_ext_sps_lt_rps_flags>`
  2521. .. _hevc_ext_sps_lt_rps_flags:
  2522. ``Extended SPS Long-Term RPS Flags``
  2523. .. cssclass:: longtable
  2524. .. flat-table::
  2525. :header-rows: 0
  2526. :stub-columns: 0
  2527. :widths: 1 1 2
  2528. * - ``V4L2_HEVC_EXT_SPS_LT_RPS_FLAG_USED_LT``
  2529. - 0x00000001
  2530. - Specifies if the long-term reference picture is used 7.4.3.2.1 "General sequence parameter
  2531. set RBSP semantics" of the specification.
  2532. ``V4L2_CID_STATELESS_HEVC_EXT_SPS_ST_RPS (struct)``
  2533. Subset of the :c:type:`v4l2_ctrl_hevc_sps` control.
  2534. It extends it with the list of Short-term reference sets parameters.
  2535. These parameters are defined according to :ref:`hevc`.
  2536. They are described in section 7.4.8 "Short-term reference picture set
  2537. semantics" of the specification.
  2538. This control is a dynamically sized 1-dimensional array.
  2539. The values in the array should be ignored when
  2540. num_short_term_ref_pic_sets is 0.
  2541. .. c:type:: v4l2_ctrl_hevc_ext_sps_st_rps
  2542. .. cssclass:: longtable
  2543. .. flat-table:: struct v4l2_ctrl_hevc_ext_sps_st_rps
  2544. :header-rows: 0
  2545. :stub-columns: 0
  2546. :widths: 1 1 2
  2547. * - __u8
  2548. - ``delta_idx_minus1``
  2549. - Specifies the delta compare to the index. See details in section 7.4.8 "Short-term
  2550. reference picture set semantics" of the specification.
  2551. * - __u8
  2552. - ``delta_rps_sign``
  2553. - Sign of the delta as specified in section 7.4.8 "Short-term reference picture set
  2554. semantics" of the specification.
  2555. * - __u8
  2556. - ``num_negative_pics``
  2557. - Number of short-term RPS entries that have picture order count values less than the
  2558. picture order count value of the current picture.
  2559. * - __u8
  2560. - ``num_positive_pics``
  2561. - Number of short-term RPS entries that have picture order count values greater than the
  2562. picture order count value of the current picture.
  2563. * - __u32
  2564. - ``used_by_curr_pic``
  2565. - Bit i specifies if short-term RPS i is used by the current picture.
  2566. * - __u32
  2567. - ``use_delta_flag``
  2568. - Bit i specifies if short-term RPS i is included in the short-term RPS entries.
  2569. * - __u16
  2570. - ``abs_delta_rps_minus1``
  2571. - Absolute delta RPS as specified in section 7.4.8 "Short-term reference picture set
  2572. semantics" of the specification.
  2573. * - __u16
  2574. - ``delta_poc_s0_minus1[16]``
  2575. - Specifies the negative picture order count delta for the i-th entry in the short-term RPS.
  2576. See details in section 7.4.8 "Short-term reference picture set semantics" of the
  2577. specification.
  2578. * - __u16
  2579. - ``delta_poc_s1_minus1[16]``
  2580. - Specifies the positive picture order count delta for the i-th entry in the short-term RPS.
  2581. See details in section 7.4.8 "Short-term reference picture set semantics" of the
  2582. specification.
  2583. * - __u16
  2584. - ``flags``
  2585. - See :ref:`Extended Short-Term RPS Flags <hevc_ext_sps_st_rps_flags>`
  2586. .. _hevc_ext_sps_st_rps_flags:
  2587. ``Extended SPS Short-Term RPS Flags``
  2588. .. cssclass:: longtable
  2589. .. flat-table::
  2590. :header-rows: 0
  2591. :stub-columns: 0
  2592. :widths: 1 1 2
  2593. * - ``V4L2_HEVC_EXT_SPS_ST_RPS_FLAG_INTER_REF_PIC_SET_PRED``
  2594. - 0x00000001
  2595. - Specifies if the short-term RPS is predicted from another short term RPS. See details in
  2596. section 7.4.8 "Short-term reference picture set semantics" of the specification.
  2597. .. _v4l2-codec-stateless-av1:
  2598. ``V4L2_CID_STATELESS_AV1_SEQUENCE (struct)``
  2599. Represents an AV1 Sequence OBU (Open Bitstream Unit). See section 5.5
  2600. "Sequence header OBU syntax" in :ref:`av1` for more details.
  2601. .. c:type:: v4l2_ctrl_av1_sequence
  2602. .. cssclass:: longtable
  2603. .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
  2604. .. flat-table:: struct v4l2_ctrl_av1_sequence
  2605. :header-rows: 0
  2606. :stub-columns: 0
  2607. :widths: 1 1 2
  2608. * - __u32
  2609. - ``flags``
  2610. - See :ref:`AV1 Sequence Flags <av1_sequence_flags>`.
  2611. * - __u8
  2612. - ``seq_profile``
  2613. - Specifies the features that can be used in the coded video sequence.
  2614. * - __u8
  2615. - ``order_hint_bits``
  2616. - Specifies the number of bits used for the order_hint field at each frame.
  2617. * - __u8
  2618. - ``bit_depth``
  2619. - the bit depth to use for the sequence as described in section 5.5.2
  2620. "Color config syntax" in :ref:`av1` for more details.
  2621. * - __u8
  2622. - ``reserved``
  2623. - Applications and drivers must set this to zero.
  2624. * - __u16
  2625. - ``max_frame_width_minus_1``
  2626. - Specifies the maximum frame width minus 1 for the frames represented by
  2627. this sequence header.
  2628. * - __u16
  2629. - ``max_frame_height_minus_1``
  2630. - Specifies the maximum frame height minus 1 for the frames represented by
  2631. this sequence header.
  2632. .. _av1_sequence_flags:
  2633. ``AV1 Sequence Flags``
  2634. .. cssclass:: longtable
  2635. .. flat-table::
  2636. :header-rows: 0
  2637. :stub-columns: 0
  2638. :widths: 1 1 2
  2639. * - ``V4L2_AV1_SEQUENCE_FLAG_STILL_PICTURE``
  2640. - 0x00000001
  2641. - If set, specifies that the coded video sequence contains only one coded
  2642. frame. If not set, specifies that the coded video sequence contains one
  2643. or more coded frames.
  2644. * - ``V4L2_AV1_SEQUENCE_FLAG_USE_128X128_SUPERBLOCK``
  2645. - 0x00000002
  2646. - If set, indicates that superblocks contain 128x128 luma samples.
  2647. When equal to 0, it indicates that superblocks contain 64x64 luma
  2648. samples. The number of contained chroma samples depends on
  2649. subsampling_x and subsampling_y.
  2650. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_FILTER_INTRA``
  2651. - 0x00000004
  2652. - If set, specifies that the use_filter_intra syntax element may be
  2653. present. If not set, specifies that the use_filter_intra syntax element
  2654. will not be present.
  2655. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTRA_EDGE_FILTER``
  2656. - 0x00000008
  2657. - Specifies whether the intra edge filtering process should be enabled.
  2658. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_INTERINTRA_COMPOUND``
  2659. - 0x00000010
  2660. - If set, specifies that the mode info for inter blocks may contain the
  2661. syntax element interintra. If not set, specifies that the syntax element
  2662. interintra will not be present.
  2663. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_MASKED_COMPOUND``
  2664. - 0x00000020
  2665. - If set, specifies that the mode info for inter blocks may contain the
  2666. syntax element compound_type. If not set, specifies that the syntax
  2667. element compound_type will not be present.
  2668. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_WARPED_MOTION``
  2669. - 0x00000040
  2670. - If set, indicates that the allow_warped_motion syntax element may be
  2671. present. If not set, indicates that the allow_warped_motion syntax
  2672. element will not be present.
  2673. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_DUAL_FILTER``
  2674. - 0x00000080
  2675. - If set, indicates that the inter prediction filter type may be specified
  2676. independently in the horizontal and vertical directions. If the flag is
  2677. equal to 0, only one filter type may be specified, which is then used in
  2678. both directions.
  2679. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_ORDER_HINT``
  2680. - 0x00000100
  2681. - If set, indicates that tools based on the values of order hints may be
  2682. used. If not set, indicates that tools based on order hints are
  2683. disabled.
  2684. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_JNT_COMP``
  2685. - 0x00000200
  2686. - If set, indicates that the distance weights process may be used for
  2687. inter prediction.
  2688. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_REF_FRAME_MVS``
  2689. - 0x00000400
  2690. - If set, indicates that the use_ref_frame_mvs syntax element may be
  2691. present. If not set, indicates that the use_ref_frame_mvs syntax element
  2692. will not be present.
  2693. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_SUPERRES``
  2694. - 0x00000800
  2695. - If set, specifies that the use_superres syntax element will be present
  2696. in the uncompressed header. If not set, specifies that the use_superres
  2697. syntax element will not be present (instead use_superres will be set to
  2698. 0 in the uncompressed header without being read).
  2699. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_CDEF``
  2700. - 0x00001000
  2701. - If set, specifies that cdef filtering may be enabled. If not set,
  2702. specifies that cdef filtering is disabled.
  2703. * - ``V4L2_AV1_SEQUENCE_FLAG_ENABLE_RESTORATION``
  2704. - 0x00002000
  2705. - If set, specifies that loop restoration filtering may be enabled. If not
  2706. set, specifies that loop restoration filtering is disabled.
  2707. * - ``V4L2_AV1_SEQUENCE_FLAG_MONO_CHROME``
  2708. - 0x00004000
  2709. - If set, indicates that the video does not contain U and V color planes.
  2710. If not set, indicates that the video contains Y, U, and V color planes.
  2711. * - ``V4L2_AV1_SEQUENCE_FLAG_COLOR_RANGE``
  2712. - 0x00008000
  2713. - If set, signals full swing representation, i.e. "Full Range
  2714. Quantization". If not set, signals studio swing representation, i.e.
  2715. "Limited Range Quantization".
  2716. * - ``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X``
  2717. - 0x00010000
  2718. - Specify the chroma subsampling format.
  2719. * - ``V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y``
  2720. - 0x00020000
  2721. - Specify the chroma subsampling format.
  2722. * - ``V4L2_AV1_SEQUENCE_FLAG_FILM_GRAIN_PARAMS_PRESENT``
  2723. - 0x00040000
  2724. - Specifies whether film grain parameters are present in the coded video
  2725. sequence.
  2726. * - ``V4L2_AV1_SEQUENCE_FLAG_SEPARATE_UV_DELTA_Q``
  2727. - 0x00080000
  2728. - If set, indicates that the U and V planes may have separate delta
  2729. quantizer values. If not set, indicates that the U and V planes will share
  2730. the same delta quantizer value.
  2731. ``V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY (struct)``
  2732. Represents a single AV1 tile inside an AV1 Tile Group. Note that MiRowStart,
  2733. MiRowEnd, MiColStart and MiColEnd can be retrieved from struct
  2734. v4l2_av1_tile_info in struct v4l2_ctrl_av1_frame using tile_row and
  2735. tile_col. See section 6.10.1 "General tile group OBU semantics" in
  2736. :ref:`av1` for more details.
  2737. .. c:type:: v4l2_ctrl_av1_tile_group_entry
  2738. .. cssclass:: longtable
  2739. .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
  2740. .. flat-table:: struct v4l2_ctrl_av1_tile_group_entry
  2741. :header-rows: 0
  2742. :stub-columns: 0
  2743. :widths: 1 1 2
  2744. * - __u32
  2745. - ``tile_offset``
  2746. - Offset from the OBU data, i.e. where the coded tile data actually starts.
  2747. * - __u32
  2748. - ``tile_size``
  2749. - Specifies the size in bytes of the coded tile. Equivalent to "TileSize"
  2750. in :ref:`av1`.
  2751. * - __u32
  2752. - ``tile_row``
  2753. - Specifies the row of the current tile. Equivalent to "TileRow" in
  2754. :ref:`av1`.
  2755. * - __u32
  2756. - ``tile_col``
  2757. - Specifies the column of the current tile. Equivalent to "TileColumn" in
  2758. :ref:`av1`.
  2759. .. c:type:: v4l2_av1_warp_model
  2760. AV1 Warp Model as described in section 3 "Symbols and abbreviated terms" of
  2761. :ref:`av1`.
  2762. .. raw:: latex
  2763. \scriptsize
  2764. .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
  2765. .. flat-table::
  2766. :header-rows: 0
  2767. :stub-columns: 0
  2768. :widths: 1 1 2
  2769. * - ``V4L2_AV1_WARP_MODEL_IDENTITY``
  2770. - 0
  2771. - Warp model is just an identity transform.
  2772. * - ``V4L2_AV1_WARP_MODEL_TRANSLATION``
  2773. - 1
  2774. - Warp model is a pure translation.
  2775. * - ``V4L2_AV1_WARP_MODEL_ROTZOOM``
  2776. - 2
  2777. - Warp model is a rotation + symmetric zoom + translation.
  2778. * - ``V4L2_AV1_WARP_MODEL_AFFINE``
  2779. - 3
  2780. - Warp model is a general affine transform.
  2781. .. c:type:: v4l2_av1_reference_frame
  2782. AV1 Reference Frames as described in section 6.10.24 "Ref frames semantics"
  2783. of :ref:`av1`.
  2784. .. raw:: latex
  2785. \scriptsize
  2786. .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
  2787. .. flat-table::
  2788. :header-rows: 0
  2789. :stub-columns: 0
  2790. :widths: 1 1 2
  2791. * - ``V4L2_AV1_REF_INTRA_FRAME``
  2792. - 0
  2793. - Intra Frame Reference.
  2794. * - ``V4L2_AV1_REF_LAST_FRAME``
  2795. - 1
  2796. - Last Frame Reference.
  2797. * - ``V4L2_AV1_REF_LAST2_FRAME``
  2798. - 2
  2799. - Last2 Frame Reference.
  2800. * - ``V4L2_AV1_REF_LAST3_FRAME``
  2801. - 3
  2802. - Last3 Frame Reference.
  2803. * - ``V4L2_AV1_REF_GOLDEN_FRAME``
  2804. - 4
  2805. - Golden Frame Reference.
  2806. * - ``V4L2_AV1_REF_BWDREF_FRAME``
  2807. - 5
  2808. - BWD Frame Reference.
  2809. * - ``V4L2_AV1_REF_ALTREF2_FRAME``
  2810. - 6
  2811. - ALTREF2 Frame Reference.
  2812. * - ``V4L2_AV1_REF_ALTREF_FRAME``
  2813. - 7
  2814. - ALTREF Frame Reference.
  2815. .. c:type:: v4l2_av1_global_motion
  2816. AV1 Global Motion parameters as described in section 6.8.17
  2817. "Global motion params semantics" of :ref:`av1`.
  2818. .. cssclass:: longtable
  2819. .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
  2820. .. flat-table:: struct v4l2_av1_global_motion
  2821. :header-rows: 0
  2822. :stub-columns: 0
  2823. :widths: 1 1 2
  2824. * - __u8
  2825. - ``flags[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
  2826. - A bitfield containing the flags per reference frame. See
  2827. :ref:`AV1 Global Motion Flags <av1_global_motion_flags>` for more
  2828. details.
  2829. * - enum :c:type:`v4l2_av1_warp_model`
  2830. - ``type[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
  2831. - The type of global motion transform used.
  2832. * - __s32
  2833. - ``params[V4L2_AV1_TOTAL_REFS_PER_FRAME][6]``
  2834. - This field has the same meaning as "gm_params" in :ref:`av1`.
  2835. * - __u8
  2836. - ``invalid``
  2837. - Bitfield indicating whether the global motion params are invalid for a
  2838. given reference frame. See section 7.11.3.6 Setup shear process and the
  2839. variable "warpValid". Use V4L2_AV1_GLOBAL_MOTION_IS_INVALID(ref) to
  2840. create a suitable mask.
  2841. * - __u8
  2842. - ``reserved[3]``
  2843. - Applications and drivers must set this to zero.
  2844. .. _av1_global_motion_flags:
  2845. ``AV1 Global Motion Flags``
  2846. .. cssclass:: longtable
  2847. .. flat-table::
  2848. :header-rows: 0
  2849. :stub-columns: 0
  2850. :widths: 1 1 2
  2851. * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_GLOBAL``
  2852. - 0x00000001
  2853. - Specifies whether global motion parameters are present for a particular
  2854. reference frame.
  2855. * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_ROT_ZOOM``
  2856. - 0x00000002
  2857. - Specifies whether a particular reference frame uses rotation and zoom
  2858. global motion.
  2859. * - ``V4L2_AV1_GLOBAL_MOTION_FLAG_IS_TRANSLATION``
  2860. - 0x00000004
  2861. - Specifies whether a particular reference frame uses translation global
  2862. motion
  2863. .. c:type:: v4l2_av1_frame_restoration_type
  2864. AV1 Frame Restoration Type.
  2865. .. raw:: latex
  2866. \scriptsize
  2867. .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
  2868. .. flat-table::
  2869. :header-rows: 0
  2870. :stub-columns: 0
  2871. :widths: 1 1 2
  2872. * - ``V4L2_AV1_FRAME_RESTORE_NONE``
  2873. - 0
  2874. - No filtering is applied.
  2875. * - ``V4L2_AV1_FRAME_RESTORE_WIENER``
  2876. - 1
  2877. - Wiener filter process is invoked.
  2878. * - ``V4L2_AV1_FRAME_RESTORE_SGRPROJ``
  2879. - 2
  2880. - Self guided filter process is invoked.
  2881. * - ``V4L2_AV1_FRAME_RESTORE_SWITCHABLE``
  2882. - 3
  2883. - Restoration filter is swichtable.
  2884. .. c:type:: v4l2_av1_loop_restoration
  2885. AV1 Loop Restoration as described in section 6.10.15 "Loop restoration params
  2886. semantics" of :ref:`av1`.
  2887. .. cssclass:: longtable
  2888. .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
  2889. .. flat-table:: struct v4l2_av1_loop_restoration
  2890. :header-rows: 0
  2891. :stub-columns: 0
  2892. :widths: 1 1 2
  2893. * - __u8
  2894. - ``flags``
  2895. - See :ref:`AV1 Loop Restoration Flags <av1_loop_restoration_flags>`.
  2896. * - __u8
  2897. - ``lr_unit_shift``
  2898. - Specifies if the luma restoration size should be halved.
  2899. * - __u8
  2900. - ``lr_uv_shift``
  2901. - Specifies if the chroma size should be half the luma size.
  2902. * - __u8
  2903. - ``reserved``
  2904. - Applications and drivers must set this to zero.
  2905. * - :c:type:`v4l2_av1_frame_restoration_type`
  2906. - ``frame_restoration_type[V4L2_AV1_NUM_PLANES_MAX]``
  2907. - Specifies the type of restoration used for each plane.
  2908. * - __u8
  2909. - ``loop_restoration_size[V4L2_AV1_MAX_NUM_PLANES]``
  2910. - Specifies the size of loop restoration units in units of samples in the
  2911. current plane.
  2912. .. _av1_loop_restoration_flags:
  2913. ``AV1 Loop Restoration Flags``
  2914. .. cssclass:: longtable
  2915. .. flat-table::
  2916. :header-rows: 0
  2917. :stub-columns: 0
  2918. :widths: 1 1 2
  2919. * - ``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_LR``
  2920. - 0x00000001
  2921. - Retains the same meaning as UsesLr in :ref:`av1`.
  2922. * - ``V4L2_AV1_LOOP_RESTORATION_FLAG_USES_CHROMA_LR``
  2923. - 0x00000002
  2924. - Retains the same meaning as UsesChromaLr in :ref:`av1`.
  2925. .. c:type:: v4l2_av1_cdef
  2926. AV1 CDEF params semantics as described in section 6.10.14 "CDEF params
  2927. semantics" of :ref:`av1`.
  2928. .. cssclass:: longtable
  2929. .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
  2930. .. flat-table:: struct v4l2_av1_cdef
  2931. :header-rows: 0
  2932. :stub-columns: 0
  2933. :widths: 1 1 2
  2934. * - __u8
  2935. - ``damping_minus_3``
  2936. - Controls the amount of damping in the deringing filter.
  2937. * - __u8
  2938. - ``bits``
  2939. - Specifies the number of bits needed to specify which CDEF filter to
  2940. apply.
  2941. * - __u8
  2942. - ``y_pri_strength[V4L2_AV1_CDEF_MAX]``
  2943. - Specifies the strength of the primary filter.
  2944. * - __u8
  2945. - ``y_sec_strength[V4L2_AV1_CDEF_MAX]``
  2946. - Specifies the strength of the secondary filter.
  2947. * - __u8
  2948. - ``uv_pri_strength[V4L2_AV1_CDEF_MAX]``
  2949. - Specifies the strength of the primary filter.
  2950. * - __u8
  2951. - ``uv_sec_strength[V4L2_AV1_CDEF_MAX]``
  2952. - Specifies the strength of the secondary filter.
  2953. .. c:type:: v4l2_av1_segment_feature
  2954. AV1 segment features as described in section 3 "Symbols and abbreviated terms"
  2955. of :ref:`av1`.
  2956. .. raw:: latex
  2957. \scriptsize
  2958. .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
  2959. .. flat-table::
  2960. :header-rows: 0
  2961. :stub-columns: 0
  2962. :widths: 1 1 2
  2963. * - ``V4L2_AV1_SEG_LVL_ALT_Q``
  2964. - 0
  2965. - Index for quantizer segment feature.
  2966. * - ``V4L2_AV1_SEG_LVL_ALT_LF_Y_V``
  2967. - 1
  2968. - Index for vertical luma loop filter segment feature.
  2969. * - ``V4L2_AV1_SEG_LVL_REF_FRAME``
  2970. - 5
  2971. - Index for reference frame segment feature.
  2972. * - ``V4L2_AV1_SEG_LVL_REF_SKIP``
  2973. - 6
  2974. - Index for skip segment feature.
  2975. * - ``V4L2_AV1_SEG_LVL_REF_GLOBALMV``
  2976. - 7
  2977. - Index for global mv feature.
  2978. * - ``V4L2_AV1_SEG_LVL_MAX``
  2979. - 8
  2980. - Number of segment features.
  2981. .. c:type:: v4l2_av1_segmentation
  2982. AV1 Segmentation params as defined in section 6.8.13 "Segmentation params
  2983. semantics" of :ref:`av1`.
  2984. .. cssclass:: longtable
  2985. .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
  2986. .. flat-table:: struct v4l2_av1_segmentation
  2987. :header-rows: 0
  2988. :stub-columns: 0
  2989. :widths: 1 1 2
  2990. * - __u8
  2991. - ``flags``
  2992. - See :ref:`AV1 Segmentation Flags <av1_segmentation_flags>`
  2993. * - __u8
  2994. - ``last_active_seg_id``
  2995. - Indicates the highest numbered segment id that has some
  2996. enabled feature. This is used when decoding the segment id to only decode
  2997. choices corresponding to used segments.
  2998. * - __u8
  2999. - ``feature_enabled[V4L2_AV1_MAX_SEGMENTS]``
  3000. - Bitmask defining which features are enabled in each segment. Use
  3001. V4L2_AV1_SEGMENT_FEATURE_ENABLED to build a suitable mask.
  3002. * - __u16
  3003. - ``feature_data[V4L2_AV1_MAX_SEGMENTS][V4L2_AV1_SEG_LVL_MAX]``
  3004. - Data attached to each feature. Data entry is only valid if the feature
  3005. is enabled.
  3006. .. _av1_segmentation_flags:
  3007. ``AV1 Segmentation Flags``
  3008. .. cssclass:: longtable
  3009. .. flat-table::
  3010. :header-rows: 0
  3011. :stub-columns: 0
  3012. :widths: 1 1 2
  3013. * - ``V4L2_AV1_SEGMENTATION_FLAG_ENABLED``
  3014. - 0x00000001
  3015. - If set, indicates that this frame makes use of the segmentation tool. If
  3016. not set, indicates that the frame does not use segmentation.
  3017. * - ``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_MAP``
  3018. - 0x00000002
  3019. - If set, indicates that the segmentation map are updated during the
  3020. decoding of this frame. If not set, indicates that the segmentation map
  3021. from the previous frame is used.
  3022. * - ``V4L2_AV1_SEGMENTATION_FLAG_TEMPORAL_UPDATE``
  3023. - 0x00000004
  3024. - If set, indicates that the updates to the segmentation map are coded
  3025. relative to the existing segmentation map. If not set, indicates that
  3026. the new segmentation map is coded without reference to the existing
  3027. segmentation map.
  3028. * - ``V4L2_AV1_SEGMENTATION_FLAG_UPDATE_DATA``
  3029. - 0x00000008
  3030. - If set, indicates that the updates to the segmentation map are coded
  3031. relative to the existing segmentation map. If not set, indicates that
  3032. the new segmentation map is coded without reference to the existing
  3033. segmentation map.
  3034. * - ``V4L2_AV1_SEGMENTATION_FLAG_SEG_ID_PRE_SKIP``
  3035. - 0x00000010
  3036. - If set, indicates that the segment id will be read before the skip
  3037. syntax element. If not set, indicates that the skip syntax element will
  3038. be read first.
  3039. .. c:type:: v4l2_av1_loop_filter
  3040. AV1 Loop filter params as defined in section 6.8.10 "Loop filter semantics" of
  3041. :ref:`av1`.
  3042. .. cssclass:: longtable
  3043. .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
  3044. .. flat-table:: struct v4l2_av1_loop_filter
  3045. :header-rows: 0
  3046. :stub-columns: 0
  3047. :widths: 1 1 2
  3048. * - __u8
  3049. - ``flags``
  3050. - See
  3051. :ref:`AV1 Loop Filter flags <av1_loop_filter_flags>` for more details.
  3052. * - __u8
  3053. - ``level[4]``
  3054. - An array containing loop filter strength values. Different loop
  3055. filter strength values from the array are used depending on the image
  3056. plane being filtered, and the edge direction (vertical or horizontal)
  3057. being filtered.
  3058. * - __u8
  3059. - ``sharpness``
  3060. - indicates the sharpness level. The loop_filter_level and
  3061. loop_filter_sharpness together determine when a block edge is filtered,
  3062. and by how much the filtering can change the sample values. The loop
  3063. filter process is described in section 7.14 of :ref:`av1`.
  3064. * - __u8
  3065. - ``ref_deltas[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
  3066. - contains the adjustment needed for the filter level based on the
  3067. chosen reference frame. If this syntax element is not present, it
  3068. maintains its previous value.
  3069. * - __u8
  3070. - ``mode_deltas[2]``
  3071. - contains the adjustment needed for the filter level based on
  3072. the chosen mode. If this syntax element is not present, it maintains its
  3073. previous value.
  3074. * - __u8
  3075. - ``delta_lf_res``
  3076. - specifies the left shift which should be applied to decoded loop filter
  3077. delta values.
  3078. .. _av1_loop_filter_flags:
  3079. ``AV1 Loop Filter Flags``
  3080. .. cssclass:: longtable
  3081. .. flat-table::
  3082. :header-rows: 0
  3083. :stub-columns: 0
  3084. :widths: 1 1 2
  3085. * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_ENABLED``
  3086. - 0x00000001
  3087. - If set, means that the filter level depends on the mode and reference
  3088. frame used to predict a block. If not set, means that the filter level
  3089. does not depend on the mode and reference frame.
  3090. * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_UPDATE``
  3091. - 0x00000002
  3092. - If set, means that additional syntax elements are present that specify
  3093. which mode and reference frame deltas are to be updated. If not set,
  3094. means that these syntax elements are not present.
  3095. * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_PRESENT``
  3096. - 0x00000004
  3097. - Specifies whether loop filter delta values are present
  3098. * - ``V4L2_AV1_LOOP_FILTER_FLAG_DELTA_LF_MULTI``
  3099. - 0x00000008
  3100. - A value equal to 1 specifies that separate loop filter
  3101. deltas are sent for horizontal luma edges, vertical luma edges,
  3102. the U edges, and the V edges. A value of delta_lf_multi equal to 0
  3103. specifies that the same loop filter delta is used for all edges.
  3104. .. c:type:: v4l2_av1_quantization
  3105. AV1 Quantization params as defined in section 6.8.11 "Quantization params
  3106. semantics" of :ref:`av1`.
  3107. .. cssclass:: longtable
  3108. .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
  3109. .. flat-table:: struct v4l2_av1_quantization
  3110. :header-rows: 0
  3111. :stub-columns: 0
  3112. :widths: 1 1 2
  3113. * - __u8
  3114. - ``flags``
  3115. - See
  3116. :ref:`AV1 Loop Filter flags <av1_quantization_flags>` for more details.
  3117. * - __u8
  3118. - ``base_q_idx``
  3119. - Indicates the base frame qindex. This is used for Y AC coefficients and
  3120. as the base value for the other quantizers.
  3121. * - __u8
  3122. - ``delta_q_y_dc``
  3123. - Indicates the Y DC quantizer relative to base_q_idx.
  3124. * - __u8
  3125. - ``delta_q_u_dc``
  3126. - Indicates the U DC quantizer relative to base_q_idx.
  3127. * - __u8
  3128. - ``delta_q_u_ac``
  3129. - Indicates the U AC quantizer relative to base_q_idx.
  3130. * - __u8
  3131. - ``delta_q_v_dc``
  3132. - Indicates the V DC quantizer relative to base_q_idx.
  3133. * - __u8
  3134. - ``delta_q_v_ac``
  3135. - Indicates the V AC quantizer relative to base_q_idx.
  3136. * - __u8
  3137. - ``qm_y``
  3138. - Specifies the level in the quantizer matrix that should be used for
  3139. luma plane decoding.
  3140. * - __u8
  3141. - ``qm_u``
  3142. - Specifies the level in the quantizer matrix that should be used for
  3143. chroma U plane decoding.
  3144. * - __u8
  3145. - ``qm_v``
  3146. - Specifies the level in the quantizer matrix that should be used for
  3147. chroma V plane decoding.
  3148. * - __u8
  3149. - ``delta_q_res``
  3150. - Specifies the left shift which should be applied to decoded quantizer
  3151. index delta values.
  3152. .. _av1_quantization_flags:
  3153. ``AV1 Quantization Flags``
  3154. .. cssclass:: longtable
  3155. .. flat-table::
  3156. :header-rows: 0
  3157. :stub-columns: 0
  3158. :widths: 1 1 2
  3159. * - ``V4L2_AV1_QUANTIZATION_FLAG_DIFF_UV_DELTA``
  3160. - 0x00000001
  3161. - If set, indicates that the U and V delta quantizer values are coded
  3162. separately. If not set, indicates that the U and V delta quantizer
  3163. values share a common value.
  3164. * - ``V4L2_AV1_QUANTIZATION_FLAG_USING_QMATRIX``
  3165. - 0x00000002
  3166. - If set, specifies that the quantizer matrix will be used to compute
  3167. quantizers.
  3168. * - ``V4L2_AV1_QUANTIZATION_FLAG_DELTA_Q_PRESENT``
  3169. - 0x00000004
  3170. - Specifies whether quantizer index delta values are present.
  3171. .. c:type:: v4l2_av1_tile_info
  3172. AV1 Tile info as defined in section 6.8.14 "Tile info semantics" of ref:`av1`.
  3173. .. cssclass:: longtable
  3174. .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
  3175. .. flat-table:: struct v4l2_av1_tile_info
  3176. :header-rows: 0
  3177. :stub-columns: 0
  3178. :widths: 1 1 2
  3179. * - __u8
  3180. - ``flags``
  3181. - See
  3182. :ref:`AV1 Tile Info flags <av1_tile_info_flags>` for more details.
  3183. * - __u8
  3184. - ``context_update_tile_id``
  3185. - Specifies which tile to use for the CDF update.
  3186. * - __u8
  3187. - ``tile_cols``
  3188. - Specifies the number of tiles across the frame.
  3189. * - __u8
  3190. - ``tile_rows``
  3191. - Specifies the number of tiles down the frame.
  3192. * - __u32
  3193. - ``mi_col_starts[V4L2_AV1_MAX_TILE_COLS + 1]``
  3194. - An array specifying the start column (in units of 4x4 luma
  3195. samples) for each tile across the image.
  3196. * - __u32
  3197. - ``mi_row_starts[V4L2_AV1_MAX_TILE_ROWS + 1]``
  3198. - An array specifying the start row (in units of 4x4 luma
  3199. samples) for each tile across the image.
  3200. * - __u32
  3201. - ``width_in_sbs_minus_1[V4L2_AV1_MAX_TILE_COLS]``
  3202. - Specifies the width of a tile minus 1 in units of superblocks.
  3203. * - __u32
  3204. - ``height_in_sbs_minus_1[V4L2_AV1_MAX_TILE_ROWS]``
  3205. - Specifies the height of a tile minus 1 in units of superblocks.
  3206. * - __u8
  3207. - ``tile_size_bytes``
  3208. - Specifies the number of bytes needed to code each tile size.
  3209. * - __u8
  3210. - ``reserved[3]``
  3211. - Applications and drivers must set this to zero.
  3212. .. _av1_tile_info_flags:
  3213. ``AV1 Tile Info Flags``
  3214. .. cssclass:: longtable
  3215. .. flat-table::
  3216. :header-rows: 0
  3217. :stub-columns: 0
  3218. :widths: 1 1 2
  3219. * - ``V4L2_AV1_TILE_INFO_FLAG_UNIFORM_TILE_SPACING``
  3220. - 0x00000001
  3221. - If set, means that the tiles are uniformly spaced across the frame. (In
  3222. other words, all tiles are the same size except for the ones at the
  3223. right and bottom edge which can be smaller). If not set means that the
  3224. tile sizes are coded.
  3225. .. c:type:: v4l2_av1_frame_type
  3226. AV1 Frame Type
  3227. .. raw:: latex
  3228. \scriptsize
  3229. .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
  3230. .. flat-table::
  3231. :header-rows: 0
  3232. :stub-columns: 0
  3233. :widths: 1 1 2
  3234. * - ``V4L2_AV1_KEY_FRAME``
  3235. - 0
  3236. - Key frame.
  3237. * - ``V4L2_AV1_INTER_FRAME``
  3238. - 1
  3239. - Inter frame.
  3240. * - ``V4L2_AV1_INTRA_ONLY_FRAME``
  3241. - 2
  3242. - Intra-only frame.
  3243. * - ``V4L2_AV1_SWITCH_FRAME``
  3244. - 3
  3245. - Switch frame.
  3246. .. c:type:: v4l2_av1_interpolation_filter
  3247. AV1 Interpolation Filter
  3248. .. raw:: latex
  3249. \scriptsize
  3250. .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
  3251. .. flat-table::
  3252. :header-rows: 0
  3253. :stub-columns: 0
  3254. :widths: 1 1 2
  3255. * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP``
  3256. - 0
  3257. - Eight tap filter.
  3258. * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH``
  3259. - 1
  3260. - Eight tap smooth filter.
  3261. * - ``V4L2_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP``
  3262. - 2
  3263. - Eight tap sharp filter.
  3264. * - ``V4L2_AV1_INTERPOLATION_FILTER_BILINEAR``
  3265. - 3
  3266. - Bilinear filter.
  3267. * - ``V4L2_AV1_INTERPOLATION_FILTER_SWITCHABLE``
  3268. - 4
  3269. - Filter selection is signaled at the block level.
  3270. .. c:type:: v4l2_av1_tx_mode
  3271. AV1 Tx mode as described in section 6.8.21 "TX mode semantics" of :ref:`av1`.
  3272. .. raw:: latex
  3273. \scriptsize
  3274. .. tabularcolumns:: |p{7.4cm}|p{0.3cm}|p{9.6cm}|
  3275. .. flat-table::
  3276. :header-rows: 0
  3277. :stub-columns: 0
  3278. :widths: 1 1 2
  3279. * - ``V4L2_AV1_TX_MODE_ONLY_4X4``
  3280. - 0
  3281. - The inverse transform will use only 4x4 transforms.
  3282. * - ``V4L2_AV1_TX_MODE_LARGEST``
  3283. - 1
  3284. - The inverse transform will use the largest transform size that fits
  3285. inside the block.
  3286. * - ``V4L2_AV1_TX_MODE_SELECT``
  3287. - 2
  3288. - The choice of transform size is specified explicitly for each block.
  3289. ``V4L2_CID_STATELESS_AV1_FRAME (struct)``
  3290. Represents a Frame Header OBU. See 6.8 "Frame Header OBU semantics" of
  3291. :ref:`av1` for more details.
  3292. .. c:type:: v4l2_ctrl_av1_frame
  3293. .. cssclass:: longtable
  3294. .. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
  3295. .. flat-table:: struct v4l2_ctrl_av1_frame
  3296. :header-rows: 0
  3297. :stub-columns: 0
  3298. :widths: 1 1 2
  3299. * - struct :c:type:`v4l2_av1_tile_info`
  3300. - ``tile_info``
  3301. - Tile info
  3302. * - struct :c:type:`v4l2_av1_quantization`
  3303. - ``quantization``
  3304. - Quantization parameters.
  3305. * - __u8
  3306. - ``superres_denom``
  3307. - The denominator for the upscaling ratio.
  3308. * - struct :c:type:`v4l2_av1_segmentation`
  3309. - ``segmentation``
  3310. - Segmentation parameters.
  3311. * - struct :c:type:`v4l2_av1_loop_filter`
  3312. - ``loop_filter``
  3313. - Loop filter params
  3314. * - struct :c:type:`v4l2_av1_cdef`
  3315. - ``cdef``
  3316. - CDEF params
  3317. * - __u8
  3318. - ``skip_mode_frame[2]``
  3319. - Specifies the frames to use for compound prediction when skip_mode is
  3320. equal to 1.
  3321. * - __u8
  3322. - ``primary_ref_frame``
  3323. - Specifies which reference frame contains the CDF values and other state
  3324. that should be loaded at the start of the frame.
  3325. * - struct :c:type:`v4l2_av1_loop_restoration`
  3326. - ``loop_restoration``
  3327. - Loop restoration parameters.
  3328. * - struct :c:type:`v4l2_av1_global_motion`
  3329. - ``global_motion``
  3330. - Global motion parameters.
  3331. * - __u32
  3332. - ``flags``
  3333. - See
  3334. :ref:`AV1 Frame flags <av1_frame_flags>` for more details.
  3335. * - enum :c:type:`v4l2_av1_frame_type`
  3336. - ``frame_type``
  3337. - Specifies the AV1 frame type
  3338. * - __u32
  3339. - ``order_hint``
  3340. - Specifies OrderHintBits least significant bits of the expected output
  3341. order for this frame.
  3342. * - __u32
  3343. - ``upscaled_width``
  3344. - The upscaled width.
  3345. * - enum :c:type:`v4l2_av1_interpolation_filter`
  3346. - ``interpolation_filter``
  3347. - Specifies the filter selection used for performing inter prediction.
  3348. * - enum :c:type:`v4l2_av1_tx_mode`
  3349. - ``tx_mode``
  3350. - Specifies how the transform size is determined.
  3351. * - __u32
  3352. - ``frame_width_minus_1``
  3353. - Add 1 to get the frame's width.
  3354. * - __u32
  3355. - ``frame_height_minus_1``
  3356. - Add 1 to get the frame's height.
  3357. * - __u16
  3358. - ``render_width_minus_1``
  3359. - Add 1 to get the render width of the frame in luma samples.
  3360. * - __u16
  3361. - ``render_height_minus_1``
  3362. - Add 1 to get the render height of the frame in luma samples.
  3363. * - __u32
  3364. - ``current_frame_id``
  3365. - Specifies the frame id number for the current frame. Frame
  3366. id numbers are additional information that do not affect the decoding
  3367. process, but provide decoders with a way of detecting missing reference
  3368. frames so that appropriate action can be taken.
  3369. * - __u8
  3370. - ``buffer_removal_time[V4L2_AV1_MAX_OPERATING_POINTS]``
  3371. - Specifies the frame removal time in units of DecCT clock ticks counted
  3372. from the removal time of the last random access point for operating point
  3373. opNum.
  3374. * - __u8
  3375. - ``reserved[4]``
  3376. - Applications and drivers must set this to zero.
  3377. * - __u32
  3378. - ``order_hints[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
  3379. - Specifies the expected output order hint for each reference frame.
  3380. This field corresponds to the OrderHints variable from the specification
  3381. (section 5.9.2 "Uncompressed header syntax"). As such, this is only
  3382. used for non-intra frames and ignored otherwise. order_hints[0] is
  3383. always ignored.
  3384. * - __u64
  3385. - ``reference_frame_ts[V4L2_AV1_TOTAL_REFS_PER_FRAME]``
  3386. - The V4L2 timestamp for each of the reference frames enumerated in
  3387. enum :c:type:`v4l2_av1_reference_frame` starting at
  3388. ``V4L2_AV1_REF_LAST_FRAME``. This represents the state of reference
  3389. slot as described in the spec and updated by userland through the
  3390. "Reference frame update process" in section 7.20 The timestamp refers
  3391. to the ``timestamp`` field in struct :c:type:`v4l2_buffer`. Use the
  3392. :c:func:`v4l2_timeval_to_ns()` function to convert the struct
  3393. :c:type:`timeval` in struct :c:type:`v4l2_buffer` to a __u64.
  3394. * - __s8
  3395. - ``ref_frame_idx[V4L2_AV1_REFS_PER_FRAME]``
  3396. - An index into ``reference_frame_ts`` representing the ordered list of
  3397. references used by inter-frame. Matches the bitstream syntax
  3398. element of the same name.
  3399. * - __u8
  3400. - ``refresh_frame_flags``
  3401. - Contains a bitmask that specifies which reference frame slots will be
  3402. updated with the current frame after it is decoded.
  3403. .. _av1_frame_flags:
  3404. ``AV1 Frame Flags``
  3405. .. cssclass:: longtable
  3406. .. flat-table::
  3407. :header-rows: 0
  3408. :stub-columns: 0
  3409. :widths: 1 1 2
  3410. * - ``V4L2_AV1_FRAME_FLAG_SHOW_FRAME``
  3411. - 0x00000001
  3412. - If set, specifies that this frame should be immediately output once
  3413. decoded. If not set, specifies that this frame should not be immediately
  3414. output; it may be output later if a later uncompressed header uses
  3415. show_existing_frame equal to 1.
  3416. * - ``V4L2_AV1_FRAME_FLAG_SHOWABLE_FRAME``
  3417. - 0x00000002
  3418. - If set, specifies that the frame may be output using the
  3419. show_existing_frame mechanism. If not set, specifies that this frame
  3420. will not be output using the show_existing_frame mechanism.
  3421. * - ``V4L2_AV1_FRAME_FLAG_ERROR_RESILIENT_MODE``
  3422. - 0x00000004
  3423. - Specifies whether error resilient mode is enabled.
  3424. * - ``V4L2_AV1_FRAME_FLAG_DISABLE_CDF_UPDATE``
  3425. - 0x00000008
  3426. - Specifies whether the CDF update in the symbol decoding process should
  3427. be disabled.
  3428. * - ``V4L2_AV1_FRAME_FLAG_ALLOW_SCREEN_CONTENT_TOOLS``
  3429. - 0x00000010
  3430. - If set, indicates that intra blocks may use palette encoding. If not
  3431. set, indicates that palette encoding is never used.
  3432. * - ``V4L2_AV1_FRAME_FLAG_FORCE_INTEGER_MV``
  3433. - 0x00000020
  3434. - If set, specifies that motion vectors will always be integers. If not
  3435. set, specifies that motion vectors can contain fractional bits.
  3436. * - ``V4L2_AV1_FRAME_FLAG_ALLOW_INTRABC``
  3437. - 0x00000040
  3438. - If set, indicates that intra block copy may be used in this frame. If
  3439. not set, indicates that intra block copy is not allowed in this frame.
  3440. * - ``V4L2_AV1_FRAME_FLAG_USE_SUPERRES``
  3441. - 0x00000080
  3442. - If set, indicates that upscaling is needed.
  3443. * - ``V4L2_AV1_FRAME_FLAG_ALLOW_HIGH_PRECISION_MV``
  3444. - 0x00000100
  3445. - If set, specifies that motion vectors are specified to eighth pel
  3446. precision. If not set, specifies that motion vectors are specified to
  3447. quarter pel precision;
  3448. * - ``V4L2_AV1_FRAME_FLAG_IS_MOTION_MODE_SWITCHABLE``
  3449. - 0x00000200
  3450. - If not set, specifies that only the SIMPLE motion mode will be used.
  3451. * - ``V4L2_AV1_FRAME_FLAG_USE_REF_FRAME_MVS``
  3452. - 0x00000400
  3453. - If set specifies that motion vector information from a previous frame
  3454. can be used when decoding the current frame. If not set, specifies that
  3455. this information will not be used.
  3456. * - ``V4L2_AV1_FRAME_FLAG_DISABLE_FRAME_END_UPDATE_CDF``
  3457. - 0x00000800
  3458. - If set indicates that the end of frame CDF update is disabled. If not
  3459. set, indicates that the end of frame CDF update is enabled
  3460. * - ``V4L2_AV1_FRAME_FLAG_ALLOW_WARPED_MOTION``
  3461. - 0x00001000
  3462. - If set, indicates that the syntax element motion_mode may be present, if
  3463. not set, indicates that the syntax element motion_mode will not be
  3464. present.
  3465. * - ``V4L2_AV1_FRAME_FLAG_REFERENCE_SELECT``
  3466. - 0x00002000
  3467. - If set, specifies that the mode info for inter blocks contains the
  3468. syntax element comp_mode that indicates whether to use single or
  3469. compound reference prediction. If not set, specifies that all inter
  3470. blocks will use single prediction.
  3471. * - ``V4L2_AV1_FRAME_FLAG_REDUCED_TX_SET``
  3472. - 0x00004000
  3473. - If set, specifies that the frame is restricted to a reduced subset of
  3474. the full set of transform types.
  3475. * - ``V4L2_AV1_FRAME_FLAG_SKIP_MODE_ALLOWED``
  3476. - 0x00008000
  3477. - This flag retains the same meaning as SkipModeAllowed in :ref:`av1`.
  3478. * - ``V4L2_AV1_FRAME_FLAG_SKIP_MODE_PRESENT``
  3479. - 0x00010000
  3480. - If set, specifies that the syntax element skip_mode will be present, if
  3481. not set, specifies that skip_mode will not be used for this frame.
  3482. * - ``V4L2_AV1_FRAME_FLAG_FRAME_SIZE_OVERRIDE``
  3483. - 0x00020000
  3484. - If set, specifies that the frame size will either be specified as the
  3485. size of one of the reference frames, or computed from the
  3486. frame_width_minus_1 and frame_height_minus_1 syntax elements. If not
  3487. set, specifies that the frame size is equal to the size in the sequence
  3488. header.
  3489. * - ``V4L2_AV1_FRAME_FLAG_BUFFER_REMOVAL_TIME_PRESENT``
  3490. - 0x00040000
  3491. - If set, specifies that buffer_removal_time is present. If not set,
  3492. specifies that buffer_removal_time is not present.
  3493. * - ``V4L2_AV1_FRAME_FLAG_FRAME_REFS_SHORT_SIGNALING``
  3494. - 0x00080000
  3495. - If set, indicates that only two reference frames are explicitly
  3496. signaled. If not set, indicates that all reference frames are explicitly
  3497. signaled.
  3498. ``V4L2_CID_STATELESS_AV1_FILM_GRAIN (struct)``
  3499. Represents the optional film grain parameters. See section
  3500. 6.8.20 "Film grain params semantics" of :ref:`av1` for more details.
  3501. .. c:type:: v4l2_ctrl_av1_film_grain
  3502. .. cssclass:: longtable
  3503. .. tabularcolumns:: |p{1.5cm}|p{5.8cm}|p{10.0cm}|
  3504. .. flat-table:: struct v4l2_ctrl_av1_film_grain
  3505. :header-rows: 0
  3506. :stub-columns: 0
  3507. :widths: 1 1 2
  3508. * - __u8
  3509. - ``flags``
  3510. - See :ref:`AV1 Film Grain Flags <av1_film_grain_flags>`.
  3511. * - __u8
  3512. - ``cr_mult``
  3513. - Represents a multiplier for the cr component used in derivation of the
  3514. input index to the cr component scaling function.
  3515. * - __u16
  3516. - ``grain_seed``
  3517. - Specifies the starting value for the pseudo-random numbers used during
  3518. film grain synthesis.
  3519. * - __u8
  3520. - ``film_grain_params_ref_idx``
  3521. - Indicates which reference frame contains the film grain parameters to be
  3522. used for this frame.
  3523. * - __u8
  3524. - ``num_y_points``
  3525. - Specifies the number of points for the piece-wise linear scaling
  3526. function of the luma component.
  3527. * - __u8
  3528. - ``point_y_value[V4L2_AV1_MAX_NUM_Y_POINTS]``
  3529. - Represents the x (luma value) coordinate for the i-th point
  3530. of the piecewise linear scaling function for luma component. The values
  3531. are signaled on the scale of 0..255. In case of 10 bit video, these
  3532. values correspond to luma values divided by 4. In case of 12 bit video,
  3533. these values correspond to luma values divided by 16.
  3534. * - __u8
  3535. - ``point_y_scaling[V4L2_AV1_MAX_NUM_Y_POINTS]``
  3536. - Represents the scaling (output) value for the i-th point
  3537. of the piecewise linear scaling function for luma component.
  3538. * - __u8
  3539. - ``num_cb_points``
  3540. - Specifies the number of points for the piece-wise linear scaling
  3541. function of the cb component.
  3542. * - __u8
  3543. - ``point_cb_value[V4L2_AV1_MAX_NUM_CB_POINTS]``
  3544. - Represents the x coordinate for the i-th point of the
  3545. piece-wise linear scaling function for cb component. The values are
  3546. signaled on the scale of 0..255.
  3547. * - __u8
  3548. - ``point_cb_scaling[V4L2_AV1_MAX_NUM_CB_POINTS]``
  3549. - Represents the scaling (output) value for the i-th point of the
  3550. piecewise linear scaling function for cb component.
  3551. * - __u8
  3552. - ``num_cr_points``
  3553. - Represents the number of points for the piece-wise
  3554. linear scaling function of the cr component.
  3555. * - __u8
  3556. - ``point_cr_value[V4L2_AV1_MAX_NUM_CR_POINTS]``
  3557. - Represents the x coordinate for the i-th point of the
  3558. piece-wise linear scaling function for cr component. The values are
  3559. signaled on the scale of 0..255.
  3560. * - __u8
  3561. - ``point_cr_scaling[V4L2_AV1_MAX_NUM_CR_POINTS]``
  3562. - Represents the scaling (output) value for the i-th point of the
  3563. piecewise linear scaling function for cr component.
  3564. * - __u8
  3565. - ``grain_scaling_minus_8``
  3566. - Represents the shift - 8 applied to the values of the chroma component.
  3567. The grain_scaling_minus_8 can take values of 0..3 and determines the
  3568. range and quantization step of the standard deviation of film grain.
  3569. * - __u8
  3570. - ``ar_coeff_lag``
  3571. - Specifies the number of auto-regressive coefficients for luma and
  3572. chroma.
  3573. * - __u8
  3574. - ``ar_coeffs_y_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
  3575. - Specifies auto-regressive coefficients used for the Y plane.
  3576. * - __u8
  3577. - ``ar_coeffs_cb_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
  3578. - Specifies auto-regressive coefficients used for the U plane.
  3579. * - __u8
  3580. - ``ar_coeffs_cr_plus_128[V4L2_AV1_AR_COEFFS_SIZE]``
  3581. - Specifies auto-regressive coefficients used for the V plane.
  3582. * - __u8
  3583. - ``ar_coeff_shift_minus_6``
  3584. - Specifies the range of the auto-regressive coefficients. Values of 0,
  3585. 1, 2, and 3 correspond to the ranges for auto-regressive coefficients of
  3586. [-2, 2), [-1, 1), [-0.5, 0.5) and [-0.25, 0.25) respectively.
  3587. * - __u8
  3588. - ``grain_scale_shift``
  3589. - Specifies how much the Gaussian random numbers should be scaled down
  3590. during the grain synthesis process.
  3591. * - __u8
  3592. - ``cb_mult``
  3593. - Represents a multiplier for the cb component used in derivation of the
  3594. input index to the cb component scaling function.
  3595. * - __u8
  3596. - ``cb_luma_mult``
  3597. - Represents a multiplier for the average luma component used in
  3598. derivation of the input index to the cb component scaling function..
  3599. * - __u8
  3600. - ``cr_luma_mult``
  3601. - Represents a multiplier for the average luma component used in
  3602. derivation of the input index to the cr component scaling function.
  3603. * - __u16
  3604. - ``cb_offset``
  3605. - Represents an offset used in derivation of the input index to the
  3606. cb component scaling function.
  3607. * - __u16
  3608. - ``cr_offset``
  3609. - Represents an offset used in derivation of the input index to the
  3610. cr component scaling function.
  3611. * - __u8
  3612. - ``reserved[4]``
  3613. - Applications and drivers must set this to zero.
  3614. .. _av1_film_grain_flags:
  3615. ``AV1 Film Grain Flags``
  3616. .. cssclass:: longtable
  3617. .. flat-table::
  3618. :header-rows: 0
  3619. :stub-columns: 0
  3620. :widths: 1 1 2
  3621. * - ``V4L2_AV1_FILM_GRAIN_FLAG_APPLY_GRAIN``
  3622. - 0x00000001
  3623. - If set, specifies that film grain should be added to this frame. If not
  3624. set, specifies that film grain should not be added.
  3625. * - ``V4L2_AV1_FILM_GRAIN_FLAG_UPDATE_GRAIN``
  3626. - 0x00000002
  3627. - If set, means that a new set of parameters should be sent. If not set,
  3628. specifies that the previous set of parameters should be used.
  3629. * - ``V4L2_AV1_FILM_GRAIN_FLAG_CHROMA_SCALING_FROM_LUMA``
  3630. - 0x00000004
  3631. - If set, specifies that the chroma scaling is inferred from the luma
  3632. scaling.
  3633. * - ``V4L2_AV1_FILM_GRAIN_FLAG_OVERLAP``
  3634. - 0x00000008
  3635. - If set, indicates that the overlap between film grain blocks shall be
  3636. applied. If not set, indicates that the overlap between film grain blocks
  3637. shall not be applied.
  3638. * - ``V4L2_AV1_FILM_GRAIN_FLAG_CLIP_TO_RESTRICTED_RANGE``
  3639. - 0x00000010
  3640. - If set, indicates that clipping to the restricted (studio, i.e. limited)
  3641. range shall be applied to the sample values after adding the film grain
  3642. (see the semantics for color_range for an explanation of studio swing).
  3643. If not set, indicates that clipping to the full range shall be applied
  3644. to the sample values after adding the film grain.