12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720 |
- /*
- * Copyright (c) 2016-2023, NVIDIA CORPORATION. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. The names of its contributors may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- /* This file contains amendments to the V4L2 headers made after the
- * supported kernel version and NVIDIA extensions.
- */
- #ifndef __V4L2_NV_EXTENSIONS_H__
- #define __V4L2_NV_EXTENSIONS_H__
- /**
- * @file
- * <b>NVIDIA V4L2 API Extensions</b>
- *
- * @b Description: This file declares NVIDIA V4L2 extensions,
- * controls and structures.
- */
- /**
- *
- * @defgroup ee_extensions_group V4L2 NV Extensions API
- *
- * This file declares NVIDIA V4L2 extensions, controls, and structures.
- *
- */
- /**
- * Defines V4L2 pixel format for DIVX.
- */
- #define V4L2_PIX_FMT_DIVX4 v4l2_fourcc('D', 'V', 'X', '4')
- #define V4L2_PIX_FMT_DIVX5 v4l2_fourcc('D', 'V', 'X', '5')
- /**
- * Defines V4L2 pixel format for H.265.
- */
- #define V4L2_PIX_FMT_H265 v4l2_fourcc('H', '2', '6', '5')
- /**
- * Defines the V4L2 pixel format for VP9.
- */
- #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0')
- /**
- * Defines the V4L2 pixel format for AV1.
- */
- #define V4L2_PIX_FMT_AV1 v4l2_fourcc('A', 'V', '1', '0')
- /**
- * Defines the V4L2 pixel format for representing single plane 10-bit Y/CbCr 4:2:0 decoder data.
- */
- #define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0') /* Y/CbCr 4:2:0, 10 bits per channel */
- /**
- * Defines the V4L2 pixel format for representing semi-planar 10-bit Y/CbCr 4:2:0 decoder data.
- */
- #define V4L2_PIX_FMT_P010M v4l2_fourcc('P', 'M', '1', '0') /* Y/CbCr 4:2:0, 10 bits per channel */
- /**
- * Defines the V4L2 pixel format for representing single plane 12-bit Y/CbCr 4:2:0 decoder data.
- */
- #define V4L2_PIX_FMT_P012 v4l2_fourcc('P', '0', '1', '2') /* Y/CbCr 4:2:0, 12 bits per channel */
- /**
- * Defines the V4L2 pixel format for representing semi-planar 12-bit Y/CbCr 4:2:0 decoder data.
- */
- #define V4L2_PIX_FMT_P012M v4l2_fourcc('P', 'M', '1', '2') /* Y/CbCr 4:2:0, 12 bits per channel */
- /**
- * Defines the V4L2 pixel format for representing semi-planar 8-bit Y/CbCr 4:4:4 decoder data.
- */
- #define V4L2_PIX_FMT_NV24M v4l2_fourcc('N', 'M', '2', '4') /* Y/CbCr 4:4:4, 8 bits per channel */
- /**
- * Defines the V4L2 pixel format for representing semi-planar 10-bit Y/CbCr 4:4:4 decoder data.
- */
- #define V4L2_PIX_FMT_NV24_10LE v4l2_fourcc('N', 'V', '1', '0') /* Y/CbCr 4:4:4, 10 bits per channel */
- /**
- * Defines the V4L2 pixel format for representing planar 10-bit Y/CbCr 4:4:4 decoder data.
- */
- #define V4L2_PIX_FMT_YUV444_10LE v4l2_fourcc('P', '4', '1', '0') /* Y/Cb/Cr 4:4:4, 10 bits per channel */
- /**
- * Defines the V4L2 pixel format for representing planar 12-bit Y/CbCr 4:4:4 decoder data.
- */
- #define V4L2_PIX_FMT_YUV444_12LE v4l2_fourcc('P', '4', '1', '2') /* Y/Cb/Cr 4:4:4, 12 bits per channel */
- /** @cond UNUSED */
- /* >> The declarations from here to the next endcond statement are not
- * >> currently implemented. DO NOT USE. */
- #define V4L2_PIX_FMT_YUV422RM v4l2_fourcc('4', '2', 'R', 'M')
- #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /** H264 parsed slices. */
- #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /** VP8 parsed frames. */
- #define V4L2_CTRL_FLAG_CAN_STORE 0x0200
- /** @endcond */
- /**
- * Defines the V4L2 event type for decoder resolution event change.
- */
- #define V4L2_EVENT_RESOLUTION_CHANGE 5
- /** @cond UNUSED */
- /* >> The declarations from here to the next endcond statement are not
- * >> currently implemented. DO NOT USE. */
- /*---------------Below are changes from the v4l2-controls.h----------------------*/
- #define V4L2_CID_MPEG_VIDEO_H264_SPS (V4L2_CID_MPEG_BASE+383)
- #define V4L2_CID_MPEG_VIDEO_H264_PPS (V4L2_CID_MPEG_BASE+384)
- #define V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX (V4L2_CID_MPEG_BASE+385)
- #define V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAM (V4L2_CID_MPEG_BASE+386)
- #define V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAM (V4L2_CID_MPEG_BASE+387)
- #define V4L2_CID_MPEG_VIDEO_VP8_FRAME_HDR (V4L2_CID_MPEG_BASE+512)
- /** @endcond */
- /**
- * Defines the control ID to set the H.265 encoder profile.
- *
- * A v4l2_mpeg_video_h265_profile must be passed.
- */
- #define V4L2_CID_MPEG_VIDEO_H265_PROFILE (V4L2_CID_MPEG_BASE+513)
- /**
- * Defines the possible profiles for H.265 encoder.
- */
- enum v4l2_mpeg_video_h265_profile {
- /** H.265 Main profile. */
- V4L2_MPEG_VIDEO_H265_PROFILE_MAIN = 0,
- /** H.265 Main10 profile. */
- V4L2_MPEG_VIDEO_H265_PROFILE_MAIN10 = 1,
- /** H.265 MainStillPicture profile. */
- V4L2_MPEG_VIDEO_H265_PROFILE_MAINSTILLPICTURE = 2,
- /** H.265 FREXT profile. */
- V4L2_MPEG_VIDEO_H265_PROFILE_FREXT = 3,
- };
- /**
- * Defines the control ID to set the encoder IDR frame interval.
- * Must be used with \c VIDIOC_S_EXT_CTRLS IOCTL.
- */
- #define V4L2_CID_MPEG_VIDEO_IDR_INTERVAL (V4L2_CID_MPEG_BASE+514)
- /** @cond UNUSED */
- /* >> The declarations from here to the next endcond statement are not
- * >> currently implemented. DO NOT USE. */
- /* Complex controls */
- #define V4L2_H264_SPS_CONSTRAINT_SET0_FLAG 0x01
- #define V4L2_H264_SPS_CONSTRAINT_SET1_FLAG 0x02
- #define V4L2_H264_SPS_CONSTRAINT_SET2_FLAG 0x04
- #define V4L2_H264_SPS_CONSTRAINT_SET3_FLAG 0x08
- #define V4L2_H264_SPS_CONSTRAINT_SET4_FLAG 0x10
- #define V4L2_H264_SPS_CONSTRAINT_SET5_FLAG 0x20
- #define V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE 0x01
- #define V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS 0x02
- #define V4L2_H264_SPS_FLAG_DELTA_PIC_ORDER_ALWAYS_ZERO 0x04
- #define V4L2_H264_SPS_FLAG_GAPS_IN_FRAME_NUM_VALUE_ALLOWED 0x08
- #define V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY 0x10
- #define V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD 0x20
- #define V4L2_H264_SPS_FLAG_DIRECT_8X8_INFERENCE 0x40
- struct v4l2_ctrl_h264_sps {
- __u8 profile_idc;
- __u8 constraint_set_flags;
- __u8 level_idc;
- __u8 seq_parameter_set_id;
- __u8 chroma_format_idc;
- __u8 bit_depth_luma_minus8;
- __u8 bit_depth_chroma_minus8;
- __u8 log2_max_frame_num_minus4;
- __u8 pic_order_cnt_type;
- __u8 log2_max_pic_order_cnt_lsb_minus4;
- __s32 offset_for_non_ref_pic;
- __s32 offset_for_top_to_bottom_field;
- __u8 num_ref_frames_in_pic_order_cnt_cycle;
- __s32 offset_for_ref_frame[255];
- __u8 max_num_ref_frames;
- __u16 pic_width_in_mbs_minus1;
- __u16 pic_height_in_map_units_minus1;
- __u8 flags;
- };
- #define V4L2_H264_PPS_FLAG_ENTROPY_CODING_MODE 0x0001
- #define V4L2_H264_PPS_FLAG_BOTTOM_FIELD_PIC_ORDER_IN_FRAME_PRESENT 0x0002
- #define V4L2_H264_PPS_FLAG_WEIGHTED_PRED 0x0004
- #define V4L2_H264_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT 0x0008
- #define V4L2_H264_PPS_FLAG_CONSTRAINED_INTRA_PRED 0x0010
- #define V4L2_H264_PPS_FLAG_REDUNDANT_PIC_CNT_PRESENT 0x0020
- #define V4L2_H264_PPS_FLAG_TRANSFORM_8X8_MODE 0x0040
- #define V4L2_H264_PPS_FLAG_PIC_SCALING_MATRIX_PRESENT 0x0080
- struct v4l2_ctrl_h264_pps {
- __u8 pic_parameter_set_id;
- __u8 seq_parameter_set_id;
- __u8 num_slice_groups_minus1;
- __u8 num_ref_idx_l0_default_active_minus1;
- __u8 num_ref_idx_l1_default_active_minus1;
- __u8 weighted_bipred_idc;
- __s8 pic_init_qp_minus26;
- __s8 pic_init_qs_minus26;
- __s8 chroma_qp_index_offset;
- __s8 second_chroma_qp_index_offset;
- __u8 flags;
- };
- struct v4l2_ctrl_h264_scaling_matrix {
- __u8 scaling_list_4x4[6][16];
- __u8 scaling_list_8x8[6][64];
- };
- struct v4l2_h264_weight_factors {
- __s8 luma_weight[32];
- __s8 luma_offset[32];
- __s8 chroma_weight[32][2];
- __s8 chroma_offset[32][2];
- };
- struct v4l2_h264_pred_weight_table {
- __u8 luma_log2_weight_denom;
- __u8 chroma_log2_weight_denom;
- struct v4l2_h264_weight_factors weight_factors[2];
- };
- #define V4L2_SLICE_FLAG_FIELD_PIC 0x01
- #define V4L2_SLICE_FLAG_BOTTOM_FIELD 0x02
- #define V4L2_SLICE_FLAG_DIRECT_SPATIAL_MV_PRED 0x04
- #define V4L2_SLICE_FLAG_SP_FOR_SWITCH 0x08
- struct v4l2_ctrl_h264_slice_param {
- /** Holds the size in bytes, including the header. */
- __u32 size;
- /** Holds the offset in bits to slice_data() from the beginning of this slice. */
- __u32 header_bit_size;
- __u16 first_mb_in_slice;
- __u8 slice_type;
- __u8 pic_parameter_set_id;
- __u8 colour_plane_id;
- __u16 frame_num;
- __u16 idr_pic_id;
- __u16 pic_order_cnt_lsb;
- __s32 delta_pic_order_cnt_bottom;
- __s32 delta_pic_order_cnt0;
- __s32 delta_pic_order_cnt1;
- __u8 redundant_pic_cnt;
- struct v4l2_h264_pred_weight_table pred_weight_table;
- /* Size in bits of dec_ref_pic_marking() syntax element. */
- __u32 dec_ref_pic_marking_bit_size;
- /* Size in bits of pic order count syntax. */
- __u32 pic_order_cnt_bit_size;
- __u8 cabac_init_idc;
- __s8 slice_qp_delta;
- __s8 slice_qs_delta;
- __u8 disable_deblocking_filter_idc;
- __s8 slice_alpha_c0_offset_div2;
- __s8 slice_beta_offset_div2;
- __u32 slice_group_change_cycle;
- __u8 num_ref_idx_l0_active_minus1;
- __u8 num_ref_idx_l1_active_minus1;
- /* Entries on each list are indices
- * into v4l2_ctrl_h264_decode_param.dpb[]. */
- __u8 ref_pic_list0[32];
- __u8 ref_pic_list1[32];
- __u8 flags;
- };
- /** Defines whether the v4l2_h264_dpb_entry structure is used.
- If not set, this entry is unused for reference. */
- #define V4L2_H264_DPB_ENTRY_FLAG_ACTIVE 0x01
- #define V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM 0x02
- struct v4l2_h264_dpb_entry {
- __u32 buf_index; /**< v4l2_buffer index. */
- __u16 frame_num;
- __u16 pic_num;
- /** @note `v4l2_buffer.field` specifies this field. */
- __s32 top_field_order_cnt;
- __s32 bottom_field_order_cnt;
- __u8 flags; /* V4L2_H264_DPB_ENTRY_FLAG_* */
- };
- struct v4l2_ctrl_h264_decode_param {
- __u32 num_slices;
- __u8 idr_pic_flag;
- __u8 nal_ref_idc;
- __s32 top_field_order_cnt;
- __s32 bottom_field_order_cnt;
- __u8 ref_pic_list_p0[32];
- __u8 ref_pic_list_b0[32];
- __u8 ref_pic_list_b1[32];
- struct v4l2_h264_dpb_entry dpb[16];
- };
- #define V4L2_VP8_SEGMNT_HDR_FLAG_ENABLED 0x01
- #define V4L2_VP8_SEGMNT_HDR_FLAG_UPDATE_MAP 0x02
- #define V4L2_VP8_SEGMNT_HDR_FLAG_UPDATE_FEATURE_DATA 0x04
- struct v4l2_vp8_sgmnt_hdr {
- __u8 segment_feature_mode;
- __s8 quant_update[4];
- __s8 lf_update[4];
- __u8 segment_probs[3];
- __u8 flags;
- };
- #define V4L2_VP8_LF_HDR_ADJ_ENABLE 0x01
- #define V4L2_VP8_LF_HDR_DELTA_UPDATE 0x02
- struct v4l2_vp8_loopfilter_hdr {
- __u8 type;
- __u8 level;
- __u8 sharpness_level;
- __s8 ref_frm_delta_magnitude[4];
- __s8 mb_mode_delta_magnitude[4];
- __u8 flags;
- };
- struct v4l2_vp8_quantization_hdr {
- __u8 y_ac_qi;
- __s8 y_dc_delta;
- __s8 y2_dc_delta;
- __s8 y2_ac_delta;
- __s8 uv_dc_delta;
- __s8 uv_ac_delta;
- __u16 dequant_factors[4][3][2];
- };
- struct v4l2_vp8_entropy_hdr {
- __u8 coeff_probs[4][8][3][11];
- __u8 y_mode_probs[4];
- __u8 uv_mode_probs[3];
- __u8 mv_probs[2][19];
- };
- #define V4L2_VP8_FRAME_HDR_FLAG_EXPERIMENTAL 0x01
- #define V4L2_VP8_FRAME_HDR_FLAG_SHOW_FRAME 0x02
- #define V4L2_VP8_FRAME_HDR_FLAG_MB_NO_SKIP_COEFF 0x04
- struct v4l2_ctrl_vp8_frame_hdr {
- /** 0: keyframe, 1: not a keyframe. */
- __u8 key_frame;
- __u8 version;
- /** Populated also if not a key frame. */
- __u16 width;
- __u8 horizontal_scale;
- __u16 height;
- __u8 vertical_scale;
- struct v4l2_vp8_sgmnt_hdr sgmnt_hdr;
- struct v4l2_vp8_loopfilter_hdr lf_hdr;
- struct v4l2_vp8_quantization_hdr quant_hdr;
- struct v4l2_vp8_entropy_hdr entropy_hdr;
- __u8 sign_bias_golden;
- __u8 sign_bias_alternate;
- __u8 prob_skip_false;
- __u8 prob_intra;
- __u8 prob_last;
- __u8 prob_gf;
- __u32 first_part_size;
- /**
- * Holds the offset in bits of the MB data in the first partition,
- * i.e. bit offset starting from first_part_offset.
- */
- __u32 first_part_offset;
- __u32 macroblock_bit_offset;
- __u8 num_dct_parts;
- __u32 dct_part_sizes[8];
- __u8 bool_dec_range;
- __u8 bool_dec_value;
- __u8 bool_dec_count;
- /** Holds the v4l2_buffer index of the last reference frame. */
- __u32 last_frame;
- /** Holds the v4l2_buffer index of the golden reference frame. */
- __u32 golden_frame;
- /** Holds the v4l2_buffer index of the alt reference frame. */
- __u32 alt_frame;
- __u8 flags;
- };
- /** @endcond */
- /*---------------Add below NVIDIA specific extensions ----------------------*/
- /**
- * @defgroup V4L2Dec V4L2 Video Decoder
- *
- * @brief NVIDIA V4L2 Video Decoder Description and Extensions
- *
- * The video decoder device node is
- *
- * /dev/nvhost-nvdec
- *
- * ### Supported Pixel Formats
- * OUTPUT PLANE | CAPTURE PLANE | PLATFORM
- * :----------------: | :----------------: | :--------------------:
- * V4L2_PIX_FMT_H264 | V4L2_PIX_FMT_NV12M | T210, T186, T194, T234
- * V4L2_PIX_FMT_H265 | V4L2_PIX_FMT_NV12M | T210, T186, T194, T234
- * V4L2_PIX_FMT_VP8 | V4L2_PIX_FMT_NV12M | T210, T186, T194, T234
- * V4L2_PIX_FMT_VP9 | V4L2_PIX_FMT_NV12M | T210, T186, T194, T234
- * V4L2_PIX_FMT_MPEG1 | V4L2_PIX_FMT_NV12M | T210, T186, T194, T234
- * V4L2_PIX_FMT_MPEG2 | V4L2_PIX_FMT_NV12M | T210, T186, T194, T234
- * V4L2_PIX_FMT_MPEG4 | V4L2_PIX_FMT_NV12M | T210, T186, T194, T234
- * V4L2_PIX_FMT_DIVX4 | V4L2_PIX_FMT_NV12M | T210, T186, T194, T234
- * V4L2_PIX_FMT_DIVX5 | V4L2_PIX_FMT_NV12M | T210, T186, T194, T234
- * V4L2_PIX_FMT_JPEG | V4L2_PIX_FMT_NV12M | T210, T186, T194, T234
- * V4L2_PIX_FMT_MJPEG | V4L2_PIX_FMT_NV12M | T210, T186, T194, T234
- * V4L2_PIX_FMT_AV1 | V4L2_PIX_FMT_NV12M | T234
- *
- * ### Supported Memory Types
- * MEMORY | OUTPUT PLANE | CAPTURE PLANE
- * :------------------: | :----------: | :-----------:
- * V4L2_MEMORY_MMAP | Y | Y
- * V4L2_MEMORY_DMABUF | N | Y
- * V4L2_MEMORY_USERPTR | Y | N
- *
- * ### Supported Controls
- * - #V4L2_CID_MPEG_VIDEO_DISABLE_COMPLETE_FRAME_INPUT
- * - #V4L2_CID_MPEG_VIDEO_DISABLE_DPB
- * - #V4L2_CID_MPEG_VIDEO_ERROR_REPORTING
- * - #V4L2_CID_MPEG_VIDEO_SKIP_FRAMES
- * - V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (Get the minimum buffers to be allocated on capture plane.
- * Read only. Valid after #V4L2_EVENT_RESOLUTION_CHANGE)
- * - #V4L2_CID_MPEG_VIDEODEC_INPUT_METADATA
- * - #V4L2_CID_MPEG_VIDEODEC_METADATA
- * - #V4L2_CID_MPEG_VIDEO_CUDA_MEM_TYPE
- * - #V4L2_CID_MPEG_VIDEO_CUDA_GPU_ID
- * - #V4L2_CID_MPEG_VIDEODEC_DROP_FRAME_INTERVAL
- *
- * ### Supported Events
- * Event | Purpose
- * ----------------------------- | :----------------------------:
- * #V4L2_EVENT_RESOLUTION_CHANGE | Resolution of the stream has changed.
- *
- * ### Handling Resolution Change Events
- * When the decoder generates a \c V4L2_EVENT_RESOLUTION_CHANGE event, the
- * application calls \c STREAMOFF on the capture plane to tell the decoder to
- * deallocate the current buffers by calling REQBUF with count zero, get
- * the new capture plane format, and then proceed with setting up the buffers
- * for the capture plane.
- *
- * In case of decoder, the buffer format might differ from the display resolution.
- * The application must use \c VIDIOC_G_CROP to get the display resolution.
- *
- * ### EOS Handling
- * The following sequence must be followed for sending EOS and recieving EOS
- * from the decoder.
- * -# Send EOS to decoder by queueing on the output plane a buffer with
- * bytesused = 0 for the 0th plane (`v4l2_buffer.m.planes[0].bytesused = 0`).
- * -# Dequeues buffers on the output plane until it gets a buffer with bytesused = 0
- * for the 0th plane (`v4l2_buffer.m.planes[0].bytesused == 0`)
- * -# Dequeues buffers on the capture plane until it gets a buffer with bytesused = 0
- * for the 0th plane.
- *
- * ### Decoder Input Frame Metadata
- * Decoder supports reporting stream header parsing error info as input frame metadata.
- * See \c V4L2_CID_MPEG_VIDEO_ERROR_REPORTING, \c V4L2_CID_MPEG_VIDEODEC_INPUT_METADATA
- * and \c v4l2_ctrl_video_metadata for more information.
- *
- * ### Decoder Output Frame Metadata
- * Decoder supports reporting frame related metadata, including error reports and
- * DPB info. See \c V4L2_CID_MPEG_VIDEO_ERROR_REPORTING, \c V4L2_CID_MPEG_VIDEODEC_METADATA
- * and \c v4l2_ctrl_video_metadata for more information.
- *
- * @note Currently, V4L2 plugins do not support odd resolution.
- * @{
- * @ingroup ee_extensions_group
- */
- /**
- * Defines the Control ID to indicate to the decoder that the input
- * buffers do not contain complete buffers.
- *
- * @note This control must be set in case of frames containing multiple slices
- * when the input buffers do not contain all the slices of the frame.
- *
- * A boolean value must be supplied with this control.
- *
- */
- #define V4L2_CID_MPEG_VIDEO_DISABLE_COMPLETE_FRAME_INPUT (V4L2_CID_MPEG_BASE+515)
- /**
- * Defines the Control ID to disable decoder DPB management.
- *
- * @note This only works for streams having a single reference frame.
- *
- * A boolean value must be supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEO_DISABLE_DPB (V4L2_CID_MPEG_BASE+516)
- /**
- * Defines the Control ID to enable decoder error and metadata reporting.
- *
- * A boolean value must be supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEO_ERROR_REPORTING (V4L2_CID_MPEG_BASE+517)
- /**
- * Defines the Control ID to set the skip frames property of the decoder.
- *
- * Decoder must be configured to skip certain types of frames. One
- * \c v4l2_skip_frames_type must be passed.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- * This control ID is supported only for H264.
- */
- #define V4L2_CID_MPEG_VIDEO_SKIP_FRAMES (V4L2_CID_MPEG_BASE+518)
- /**
- * Defines the Control ID to get the decoder output metadata.
- *
- * @note Metadata reporting must be enabled using
- * #V4L2_CID_MPEG_VIDEO_ERROR_REPORTING IOCTL for this.
- *
- * A pointer to a valid \c v4l2_ctrl_video_metadata structure must be supplied
- * with this control.
- *
- * @attention This control must be read after dequeueing a buffer successfully from
- * the capture plane. The values in the structure are valid until the buffer is queued
- * again.
- */
- #define V4L2_CID_MPEG_VIDEODEC_METADATA (V4L2_CID_MPEG_BASE+519)
- /**
- * Defines the Control ID to get the decoder input header error metadata.
- *
- * @note Metadata reporting must be enabled using
- * #V4L2_CID_MPEG_VIDEO_ERROR_REPORTING IOCTL for this.
- *
- * A pointer to a valid \c v4l2_ctrl_video_metadata structure must be supplied
- * with this control.
- *
- * @attention This control must be read after dequeueing a buffer successfully from
- * the output plane. The values in the structure are valid until the buffer is queued
- * again.
- */
- #define V4L2_CID_MPEG_VIDEODEC_INPUT_METADATA (V4L2_CID_MPEG_BASE+520)
- /**
- * Defines the Control ID to check if display data is present.
- *
- * This control returns true if HDR metadata is present in the stream.
- *
- */
- #define V4L2_CID_VIDEODEC_DISPLAYDATA_PRESENT (V4L2_CID_MPEG_BASE+521)
- /**
- * Defines the Control ID to get display data if V4L2_CID_VIDEODEC_DISPLAYDATA_PRESENT returns true.
- *
- * This control returns display data such as display_primaries, white_point and
- * display_parameter_luminance required for display module.
- *
- */
- #define V4L2_CID_VIDEODEC_HDR_MASTERING_DISPLAY_DATA (V4L2_CID_MPEG_BASE+522)
- /**
- * Defines the Control ID to get Sample Aspect Ratio width for decoding.
- *
- * This control returns unsigned integer of Sample Aspect Ratio width.
- *
- * @attention This control must be set after receiving V4L2_EVENT_RESOLUTION_CHANGE.
- *
- */
- #define V4L2_CID_MPEG_VIDEODEC_SAR_WIDTH (V4L2_CID_MPEG_BASE+569)
- /**
- * Defines the Control ID to get Sample Aspect Ratio height for decoding.
- *
- * This control returns unsigned integer of Sample Aspect Ratio height.
- *
- * @attention This control must be set after receiving V4L2_EVENT_RESOLUTION_CHANGE.
- *
- */
- #define V4L2_CID_MPEG_VIDEODEC_SAR_HEIGHT (V4L2_CID_MPEG_BASE+570)
- /**
- * Defines the Control ID to embed the SEI data coming from upstream plugins.
- *
- * This control sets the SEI payload size and SEI data pointer for encoder.
- *
- * @attention This control must be set after receiving V4L2_EVENT_RESOLUTION_CHANGE.
- *
- */
- #define V4L2_CID_MPEG_VIDEOENC_DS_SEI_DATA (V4L2_CID_MPEG_BASE+571)
- /** @} */
- /**
- * @defgroup V4L2Conv V4L2 Video Converter
- *
- * @brief NVIDIA V4L2 Video Converter Description and Extensions
- *
- * Use the video converter for color space conversion, scaling, and
- * conversion between hardware buffer memory (\c V4L2_MEMORY_MMAP/\c
- * V4L2_MEMORY_DMABUF), software buffer memory (\c V4L2_MEMORY_USERPTR), and
- * other operations such as cropping, flipping/rotating, and
- * temporal noise reduction (TNR).
- * The video converter device node is \c "/dev/nvhost-vic".
- *
- * ### Supported Pixelformats
- * PIXEL FORMAT | PIXEL FORMAT
- * :---------------------: | :--------------:
- * V4L2_PIX_FMT_YUV444M | V4L2_PIX_FMT_YVU422M
- * V4L2_PIX_FMT_YUV420M | V4L2_PIX_FMT_YVU420M
- * V4L2_PIX_FMT_NV12M | V4L2_PIX_FMT_GREY
- * V4L2_PIX_FMT_YUYV | V4L2_PIX_FMT_YVYU
- * V4L2_PIX_FMT_UYVY | V4L2_PIX_FMT_VYUY
- * V4L2_PIX_FMT_ABGR32 | V4L2_PIX_FMT_XBGR32
- *
- * ### Supported Pixel Formats for TNR
- * PIXEL FORMAT | PIXEL FORMAT
- * :---------------------: | :--------------:
- * V4L2_PIX_FMT_YUV420M | V4L2_PIX_FMT_NV12M
- * V4L2_PIX_FMT_UYVY | V4L2_PIX_FMT_YUYV
- *
- * ### Supported Memory Types
- * MEMORY | OUTPUT PLANE | CAPTURE PLANE
- * :------------------: | :----------: | :-----------:
- * V4L2_MEMORY_MMAP | Y | Y
- * V4L2_MEMORY_DMABUF | Y | Y
- * V4L2_MEMORY_USERPTR | Y | Y
- *
- * ### Supported Controls
- * - #V4L2_CID_VIDEO_CONVERT_OUTPUT_PLANE_LAYOUT
- * - #V4L2_CID_VIDEO_CONVERT_CAPTURE_PLANE_LAYOUT
- * - #V4L2_CID_VIDEO_CONVERT_FLIP_METHOD
- * - #V4L2_CID_VIDEO_CONVERT_INTERPOLATION_METHOD
- * - #V4L2_CID_VIDEO_CONVERT_TNR_ALGORITHM
- * - #V4L2_CID_VIDEO_CONVERT_YUV_RESCALE_METHOD
- *
- * ### Cropping
- * Video converter supports cropping using \c VIDIOC_S_SELECTION IOCTL with type
- * \c V4L2_BUF_TYPE_VIDEO_CAPTURE and target \c V4L2_SEL_TGT_CROP. This must
- * be set before requesting buffers on either plane.
- *
- * ### EOS Handling
- * The following sequence must be followed for sending EOS and recieving EOS
- * from the converter.
- * -# Send EOS to converter by queueing on the output plane a buffer with
- * bytesused = 0 for the 0th plane (`v4l2_buffer.m.planes[0].bytesused = 0`).
- * -# Dequeues buffers on the capture plane until it gets a buffer with bytesused = 0
- * for the 0th plane.
- *
- * @note Currently, V4L2 plugins do not support odd resolution.
- * @{
- * @ingroup ee_extensions_group
- */
- /**
- * Defines the Control ID to set converter output plane buffer layout.
- *
- * A value of type \c v4l2_nv_buffer_layout must be supplied with this control.
- *
- * @attention This control must be set before requesting buffers on the output plane.
- */
- #define V4L2_CID_VIDEO_CONVERT_OUTPUT_PLANE_LAYOUT (V4L2_CID_MPEG_BASE+523)
- /**
- * Defines the Control ID to set converter capture plane buffer layout.
- *
- * A value of type \c v4l2_nv_buffer_layout must be supplied with this control.
- *
- * @attention This control must be set before requesting buffers on the capture plane.
- */
- #define V4L2_CID_VIDEO_CONVERT_CAPTURE_PLANE_LAYOUT (V4L2_CID_MPEG_BASE+524)
- /**
- * Defines the Control ID to set the converter flip/rotation method.
- *
- * A value of type \c v4l2_flip_method must be supplied with this control.
- *
- * @attention This control must be set before requesting buffers on either plane.
- */
- #define V4L2_CID_VIDEO_CONVERT_FLIP_METHOD (V4L2_CID_MPEG_BASE+525)
- /**
- * Defines the Control ID to set the converter interpolation method.
- *
- * A value of type \c v4l2_interpolation_method must be supplied with this control.
- *
- * @attention This control must be set before requesting buffers on either plane.
- */
- #define V4L2_CID_VIDEO_CONVERT_INTERPOLATION_METHOD (V4L2_CID_MPEG_BASE+526)
- /**
- * Defines the Control ID to set the converter Temporal Noise Reduction (TNR) algorithm.
- *
- * A value of type \c v4l2_tnr_algorithm must be supplied with this control.
- *
- * @attention This control must be set before requesting buffers on either plane.
- * @attention TNR algorithms are not supported with YUV422 and YUV444 capture
- * plane formats.
- */
- #define V4L2_CID_VIDEO_CONVERT_TNR_ALGORITHM (V4L2_CID_MPEG_BASE+527)
- /** @} */
- /**
- * @defgroup V4L2Enc V4L2 Video Encoder
- *
- * @brief NVIDIA V4L2 Video Encoder Description and Extensions
- *
- * The video encoder device node is \c "/dev/nvhost-msenc".
- *
- * ### Supported Pixelformats
- * OUTPUT PLANE | CAPTURE PLANE | PLATFORM
- * :---------------------: | :-----------------: | :--------------------:
- * V4L2_PIX_FMT_YUV420M | V4L2_PIX_FMT_H264 | T210, T186, T194, T234
- * V4L2_PIX_FMT_NV12M | |
- * V4L2_PIX_FMT_YUV444M | |
- * V4L2_PIX_FMT_NV24M | |
- * | |
- * V4L2_PIX_FMT_YUV420M | V4L2_PIX_FMT_H265 | T210, T186, T194, T234
- * V4L2_PIX_FMT_NV12M | |
- * V4L2_PIX_FMT_YUV444M | |
- * V4L2_PIX_FMT_NV24M | |
- * V4L2_PIX_FMT_P010M | |
- * V4L2_PIX_FMT_NV24_10LE | |
- * | |
- * V4L2_PIX_FMT_YUV420M | V4L2_PIX_FMT_VP8 | T210, T186
- * V4L2_PIX_FMT_NV12M | |
- * | |
- * V4L2_PIX_FMT_YUV420M | V4L2_PIX_FMT_VP9 | T186, T194
- * V4L2_PIX_FMT_NV12M | |
- * | |
- * V4L2_PIX_FMT_YUV420M | V4L2_PIX_FMT_AV1 | T234
- * V4L2_PIX_FMT_NV12M | |
- *
- * ### Supported Memory Types
- * MEMORY | OUTPUT PLANE | CAPTURE PLANE
- * :------------------: | :----------: | :-----------:
- * V4L2_MEMORY_MMAP | Y | Y
- * V4L2_MEMORY_DMABUF | Y | N
- * V4L2_MEMORY_USERPTR | N | N
- * \attention For the video encoder, it is necessary that the capture plane
- * format be set before the output plane format and only then request buffers on
- * any of the planes.
- *
- * ### Supported Controls
- * The following sections describe the supported controls.
- *
- * #### Controls From the Open Source V4L2-Controls Header
- * Control ID | Purpose | Runtime Configurable
- * -------------------------------- | -------------------- | :------------------:
- * V4L2_CID_MPEG_VIDEO_BITRATE | Bitrate | Y
- * V4L2_CID_MPEG_VIDEO_H264_PROFILE | H.264 Encode Profile | N
- * V4L2_CID_MPEG_VIDEO_BITRATE_MODE | Rate Control Mode | N
- * V4L2_CID_MPEG_VIDEO_GOP_SIZE | I-frame Interval | N
- * V4L2_CID_MPEG_VIDEO_H264_LEVEL | Encode Level | N
- * V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE | Force I-frame on one of queued output plane buffer | Y
- *
- * All non-runtime configurable options must be set after setting formats on
- * both the planes and before requesting buffers on either plane.
- *
- * The runtime configurable parameters can be called anytime after setting
- * formats on both the planes.
- *
- * #### NVIDIA-Specific Controls
- * - #V4L2_CID_MPEG_VIDEO_H265_PROFILE
- * - #V4L2_CID_MPEG_VIDEO_IDR_INTERVAL
- * - #V4L2_CID_MPEG_VIDEOENC_TEMPORAL_TRADEOFF_LEVEL
- * - #V4L2_CID_MPEG_VIDEOENC_SLICE_LENGTH_PARAM
- * - #V4L2_CID_MPEG_VIDEOENC_ROI_PARAMS
- * - #V4L2_CID_MPEG_VIDEOENC_VIRTUALBUFFER_SIZE
- * - #V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES
- * - #V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM
- * - #V4L2_CID_MPEG_VIDEOENC_NUM_BFRAMES
- * - #V4L2_CID_MPEG_VIDEOENC_INSERT_SPS_PPS_AT_IDR
- * - #V4L2_CID_MPEG_VIDEOENC_METADATA
- * - #V4L2_CID_MPEG_VIDEOENC_METADATA_MV
- * - #V4L2_CID_MPEG_VIDEOENC_ENABLE_METADATA_MV
- * - #V4L2_CID_MPEG_VIDEOENC_QP_RANGE
- * - #V4L2_CID_MPEG_VIDEOENC_HW_PRESET_TYPE_PARAM
- * - #V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA
- * - #V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RPS_CONTROL
- * - #V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RATE_CONTROL
- * - #V4L2_CID_MPEG_VIDEOENC_ENABLE_ROI_PARAM
- * - #V4L2_CID_MPEG_VIDEOENC_ENABLE_RECONCRC_PARAM
- * - #V4L2_CID_MPEG_VIDEOENC_INSERT_VUI
- * - #V4L2_CID_MPEG_VIDEOENC_INSERT_AUD
- * - #V4L2_CID_MPEG_VIDEOENC_EXTEDED_COLORFORMAT
- * - #V4L2_CID_MPEG_VIDEOENC_ENABLE_ALLIFRAME_ENCODE
- * - #V4L2_CID_MPEG_VIDEOENC_H265_LEVEL
- * - #V4L2_CID_MPEG_VIDEOENC_ENABLE_SLICE_LEVEL_ENCODE
- * - #V4L2_CID_MPEG_VIDEOENC_POC_TYPE
- * - #V4L2_CID_MPEG_VIDEOENC_H265_VUI_EXT_SAR_WIDTH
- * - #V4L2_CID_MPEG_VIDEOENC_H265_VUI_EXT_SAR_HEIGHT
- * - #V4L2_CID_MPEG_VIDEOENC_FORCE_INTRA_FRAME
- * - #V4L2_CID_MPEG_VIDEOENC_FORCE_IDR_FRAME
- * - #V4L2_CID_MPEG_VIDEOENC_AV1_HEADERS_WITH_FRAME
- * - #V4L2_CID_MPEG_VIDEOENC_AV1_TILE_CONFIGURATION
- * - #V4L2_CID_MPEG_VIDEOENC_AV1_ENABLE_SSIMRDO
- * - #V4L2_CID_MPEG_VIDEOENC_AV1_DISABLE_CDF_UPDATE
- * - #V4L2_CID_MPEG_VIDEOENC_PPE_INIT_PARAMS
- *
- * #### Setting Framerate
- * The encoder framerate can be set with \c VIDIOC_S_PARM IOCTL by setting the numerator
- * and denominator in `v4l2_streamparm.parm.output.timeperframe`.
- *
- * ### Supported Encoder Profiles
- * #### H.264
- * - V4L2_MPEG_VIDEO_H264_PROFILE_MAIN
- * - V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE
- * - V4L2_MPEG_VIDEO_H264_PROFILE_HIGH
- *
- * #### H.265
- * - V4L2_MPEG_VIDEO_H265_PROFILE_MAIN
- * - V4L2_MPEG_VIDEO_H265_PROFILE_MAIN10
- *
- * ### Encoder Output Metadata
- * The encoder supports reporting frame related metadata, including motion vectors
- * for that frame. See \c V4L2_CID_MPEG_VIDEOENC_METADATA,
- * \c V4L2_CID_MPEG_VIDEOENC_METADATA_MV and \c V4L2_CID_MPEG_VIDEOENC_ENABLE_METADATA_MV
- * for more information.
- *
- * ### EOS Handling
- * The following sequence must be followed for sending EOS and recieving EOS
- * from the encoder.
- * -# Send EOS to encoder by queueing on the output plane a buffer with
- * bytesused = 0 for the 0th plane (`v4l2_buffer.m.planes[0].bytesused = 0`).
- * -# Dequeues buffers on the capture plane until it gets a buffer with bytesused = 0
- * for the 0th plane.
- *
- * @note Currently, V4L2 plugins do not support odd resolution.
- * @{
- * @ingroup ee_extensions_group
- */
- /**
- * Defines the Control ID to configure encoder to drop frames while encoding.
- *
- * A value of type \c v4l2_enc_temporal_tradeoff_level_type must be supplied
- * with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_TEMPORAL_TRADEOFF_LEVEL (V4L2_CID_MPEG_BASE+528)
- /**
- * Defines the Control ID to configure encoder slice length either in terms of MBs or bits.
- *
- * A pointer to a valid \c v4l2_enc_slice_length_param structure must be supplied
- * with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_SLICE_LENGTH_PARAM (V4L2_CID_MPEG_BASE+529)
- /**
- * Defines the Control ID to configure encoder to encode particular region of frame in high
- * quality.
- *
- * A pointer to a valid \c v4l2_enc_frame_ROI_params structure must be supplied
- * with this control.
- *
- * @attention This control must be set after requesting buffers on both the
- * planes.
- */
- #define V4L2_CID_MPEG_VIDEOENC_ROI_PARAMS (V4L2_CID_MPEG_BASE+530)
- /**
- * Defines the Control ID to specify virtual buffer size in bits for encoder.
- *
- * A pointer to a valid \c v4l2_enc_virtual_buffer_size structure must be
- * supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_VIRTUALBUFFER_SIZE (V4L2_CID_MPEG_BASE+531)
- /**
- * Defines the Control ID to specify maximum number of reference frames that can be used.
- *
- * An integer value must be supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES (V4L2_CID_MPEG_BASE+532)
- /**
- * Defines the Control ID to specify the encoder slice intra refresh interval.
- *
- * A pointer to a valid \c v4l2_enc_slice_intrarefresh_param structure must be
- * supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM (V4L2_CID_MPEG_BASE+533)
- /**
- * Defines the Control ID to set number of B frames to be encoded between two P frames.
- *
- * This works with H.264 encoder. This also works with H.265 encoder for Jetson Xavier and
- * Jetson Xavier NX platforms. An integer value must be supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_NUM_BFRAMES (V4L2_CID_MPEG_BASE+534)
- /**
- * Defines the Control ID to enable/disable inserting SPS and PPS explicitly at IDR interval.
- *
- * A boolean value must be supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_INSERT_SPS_PPS_AT_IDR (V4L2_CID_MPEG_BASE+535)
- /**
- * Defines the Control ID to get encoder output metadata.
- *
- * A pointer to valid #v4l2_ctrl_video_metadata structure must be supplied with
- * this control.
- *
- * @attention This control must be read after dequeueing a buffer successfully from
- * the capture plane. The values in the structure are valid until the buffer is queued
- * again.
- */
- #define V4L2_CID_MPEG_VIDEOENC_METADATA (V4L2_CID_MPEG_BASE+536)
- /**
- * Defines the Control ID to enable/disable encoder motion vector reporting.
- *
- * A boolean value must be supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_ENABLE_METADATA_MV (V4L2_CID_MPEG_BASE+537)
- /**
- * Defines the Control ID to get encoder output motion vector metadata.
- *
- * A pointer to valid \c v4l2_ctrl_videoenc_outputbuf_metadata_MV structure must
- * be supplied with this control.
- *
- * @attention This control must be read after dequeueing a buffer successfully from
- * the capture plane. The values in the structure are valid until the buffer is queued
- * again.
- */
- #define V4L2_CID_MPEG_VIDEOENC_METADATA_MV (V4L2_CID_MPEG_BASE+538)
- /**
- * Defines the Control ID to set QP range for I/P/B frames.
- *
- * A pointer to a valid \c v4l2_ctrl_video_qp_range structure must
- * be supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_QP_RANGE (V4L2_CID_MPEG_BASE+539)
- /**
- * Defines the Control ID to set encoder HW Preset type.
- *
- * A pointer to valid #v4l2_enc_hw_preset_type_param structure must
- * be supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_HW_PRESET_TYPE_PARAM (V4L2_CID_MPEG_BASE+540)
- /**
- * Defines the Control ID to provide input metadata for encoder buffer.
- *
- * A pointer to valid #v4l2_ctrl_videoenc_input_metadata structure must be
- * supplied with this control.
- *
- * @attention This control must be called before queueing a buffer on the output
- * plane. Use the bitwise OR of v4l2_enc_input_metadata_param in the
- * v4l2_ctrl_videoenc_input_metadata.metadata_flag to provide different input
- * metadata parameters in one s_ctrl call.
- */
- #define V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA (V4L2_CID_MPEG_BASE+541)
- /**
- * Defines the Control ID to configure encoder for external RPS control.
- *
- * A pointer to a valid #v4l2_enc_enable_ext_rps_ctr structure must be supplied
- * with this control.
- *
- * @attention This control must be set after requesting buffers on both the
- * planes. The value for V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES, if being entered,
- * must be set after this control.
- */
- #define V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RPS_CONTROL (V4L2_CID_MPEG_BASE+542)
- /**
- * Defines the Control ID to configure encoder for external rate control.
- *
- * A pointer to a valid #v4l2_enc_enable_ext_rate_ctr structure must be supplied
- * with this control.
- *
- * @attention This control must be set after requesting buffers on both the
- * planes.
- */
- #define V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RATE_CONTROL (V4L2_CID_MPEG_BASE+543)
- /**
- * Defines the Control ID to configure ROI encoding for a session.
- *
- * A pointer to a valid #v4l2_enc_enable_roi_param structure must be supplied
- * with this control.
- *
- * @attention This control must be set after requesting buffers on both the
- * planes.
- */
- #define V4L2_CID_MPEG_VIDEOENC_ENABLE_ROI_PARAM (V4L2_CID_MPEG_BASE+544)
- /**
- * Defines the Control ID to configure Reconstructed CRC for a session.
- *
- * A pointer to a valid #v4l2_enc_enable_reconcrc_param structure must be supplied
- * with this control.
- *
- * @attention This control must be set after requesting buffers on both the
- * planes.
- */
- #define V4L2_CID_MPEG_VIDEOENC_ENABLE_RECONCRC_PARAM (V4L2_CID_MPEG_BASE+545)
- /**
- * Control ID to enable/disable inserting VUI in SPS.
- *
- * A boolean value should be supplied with this control.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_INSERT_VUI (V4L2_CID_MPEG_BASE+546)
- /**
- * Control ID to enable/disable inserting AUD(Access Unit Delimiter).
- *
- * A boolean value should be supplied with this control.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_INSERT_AUD (V4L2_CID_MPEG_BASE+547)
- /**
- * Control ID to enable/disable setting extended color format.
- *
- * A boolean value should be supplied with this control.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane. Also this control should be
- * enabled/disabled only after V4L2_CID_MPEG_VIDEOENC_INSERT_VUI is set
- */
- #define V4L2_CID_MPEG_VIDEOENC_EXTEDED_COLORFORMAT (V4L2_CID_MPEG_BASE+548)
- /**
- * Control ID to select which NVDEC IP to decode.
- *
- * @note This functionality is currently being deprecated and no longer
- * functional.
- *
- * A v4l2_decode_instance_type should be supplied with this control.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEO_DECODE_INSTANCE (V4L2_CID_MPEG_BASE+549)
- /**
- * Control ID to issue a pseudo POLL call on the fd opened in non blocking mode.
- *
- * A pointer to a valid #v4l2_ctrl_video_device_poll must be supplied with this control.
- *
- * @attention This should only be called when the Decoder or Encoder is opened with
- * O_NONBLOCK flag.
- */
- #define V4L2_CID_MPEG_VIDEO_DEVICE_POLL (V4L2_CID_MPEG_BASE+550)
- /**
- * Control ID to set/clear the polling interrupt mode. Useful when a POLL issued from the
- * application but wants the wait to be interrupted.
- *
- * A boolean value must be supplied with this control, True indicates polling interrupt shall be
- * enabled and it shall stay enabled (i.e calls to POLL will return immediately) until a call to
- * same control ID is made by passing a boolean 0 value.
- *
- * @attention This should only be called when the Decoder or Encoder is opened with
- * O_NONBLOCK flag.
- */
- #define V4L2_CID_MPEG_SET_POLL_INTERRUPT (V4L2_CID_MPEG_BASE+551)
- /**
- * Control ID to enable/disable setting rate control two pass CBR.
- *
- * A boolean value should be supplied with this control.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_TWO_PASS_CBR (V4L2_CID_MPEG_BASE+552)
- /**
- * Defines the Control ID to set the converter YUV Rescale method.
- *
- * A value of type \c v4l2_yuv_rescale_method must be supplied with this control.
- *
- * @attention This control must be set before requesting buffers on either plane.
- */
- #define V4L2_CID_VIDEO_CONVERT_YUV_RESCALE_METHOD (V4L2_CID_MPEG_BASE+553)
- /**
- * Control ID to enable maximum Performance.
- *
- * An integer value must be supplied with this control.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEO_MAX_PERFORMANCE (V4L2_CID_MPEG_BASE+554)
- /**
- * Control ID to enable/disable setting for all i-Frame encoding.
- *
- * A boolean value should be supplied with this control.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_ENABLE_ALLIFRAME_ENCODE (V4L2_CID_MPEG_BASE+555)
- /**
- * Defines the Control ID to set buf api to be used by decoder/encoder.
- *
- * Note: This Control ID is no longer supported.
- */
- #define V4L2_CID_MPEG_VIDEO_BUF_API_TYPE (V4L2_CID_MPEG_BASE+556)
- /**
- * Defines the Control ID to set cuda memory type to be used by decoder/encoder.
- *
- * This control can be used by the decoder to set the memory type for surfaces.
- * A value of \c v4l2_cuda_mem_type needs to be set with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEO_CUDA_MEM_TYPE (V4L2_CID_MPEG_BASE+557)
- /**
- * Defines the Control ID to set GPU ID to be used by decoder/encoder.
- *
- * An integer value should be supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEO_CUDA_GPU_ID (V4L2_CID_MPEG_BASE+558)
- /**
- * Defines the Control ID to set drop frames interval for decoder.
- *
- * An integer value should be supplied with this control. A value of "x"
- * indicates every "x"th frame should be given out from the decoder, rest shall
- * dropped after decoding.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEODEC_DROP_FRAME_INTERVAL (V4L2_CID_MPEG_BASE+559)
- /**
- * Control ID to enable/disable setting for attaching VP8/9 headers.
- * Only to be used for VP8/9 pixel format not for H264/5.
- *
- * A boolean value should be supplied with this control.
- * If value is false headers will be disabled and true will enable the headers.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_VPX_HEADERS_WITH_FRAME (V4L2_CID_MPEG_BASE+560)
- /**
- * Defines the control ID to set the H.265 encoder level.
- *
- * A v4l2_mpeg_video_h265_level must be passed.
- */
- #define V4L2_CID_MPEG_VIDEOENC_H265_LEVEL (V4L2_CID_MPEG_BASE+561)
- /**
- * Control ID to enable/disable slice level encode output.
- *
- * A boolean value should be supplied with this control.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_ENABLE_SLICE_LEVEL_ENCODE (V4L2_CID_MPEG_BASE+562)
- /**
- * Defines the Control ID to set Picture Order Count property in frames.
- *
- * This works only with H.264 encoder. An integer value must be supplied with this
- * control.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_POC_TYPE (V4L2_CID_MPEG_BASE+563)
- /**
- * Defines the Control ID to set Sample Aspect Ratio width for H265 VUI encoding.
- *
- * An integer value must be supplied with this control.
- * The VUI Sample Aspect Ratio indicator for H265 follows the standard enum defined for
- * v4l2_mpeg_video_h264_vui_sar_idc.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_H265_VUI_EXT_SAR_WIDTH (V4L2_CID_MPEG_BASE+564)
- /**
- * Defines the Control ID to set Sample Aspect Ratio height for H265 VUI encoding.
- *
- * An integer value must be supplied with this control.
- * The VUI Sample Aspect Ratio indicator for H265 follows the standard enum defined
- * for v4l2_mpeg_video_h264_vui_sar_idc.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_H265_VUI_EXT_SAR_HEIGHT (V4L2_CID_MPEG_BASE+565)
- /**
- * Defines the Control ID to force INTRA frame.
- *
- * This control can be used by encoder to force encoding an intra frame.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_FORCE_INTRA_FRAME (V4L2_CID_MPEG_BASE+566)
- /**
- * Defines the Control ID to force IDR frame.
- *
- * This control can be used by encoder to force encoding an idr frame.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_FORCE_IDR_FRAME (V4L2_CID_MPEG_BASE+567)
- /**
- * Defines the Control ID to set low latency to be used by decoder.
- *
- * This control can be used by decoder to set low latency for streams having
- * I and IPPP frames.
- *
- * @attention This control must be set before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEO_CUDA_LOW_LATENCY (V4L2_CID_MPEG_BASE+568)
- /**
- * Control ID to enable/disable setting for attaching IVF headers.
- * Only to be used for AV1 codec.
- *
- * A boolean value should be supplied with this control.
- * If value is false headers will be disabled and true will enable the headers.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_AV1_HEADERS_WITH_FRAME (V4L2_CID_MPEG_BASE+569)
- /**
- * Defines the Control ID to configure AV1 tile for a session.
- *
- * A pointer to a valid #v4l2_enc_av1_tile_config structure must be supplied
- * with this control.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- **/
- #define V4L2_CID_MPEG_VIDEOENC_AV1_TILE_CONFIGURATION (V4L2_CID_MPEG_BASE+570)
- /**
- * Defines the Control ID to enable variance based SSIM RDO for AV1.
- *
- * A boolean value should be supplied with this control.
- * If value is false SSIM RDO is disabled else true when enabled.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- **/
- #define V4L2_CID_MPEG_VIDEOENC_AV1_ENABLE_SSIMRDO (V4L2_CID_MPEG_BASE+571)
- /**
- * Defines the Control ID to enable CDF update for AV1.
- *
- * A boolean value should be supplied with this control.
- * If value is true the CDF update in the symbol decoding process is disabled.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- **/
- #define V4L2_CID_MPEG_VIDEOENC_AV1_DISABLE_CDF_UPDATE (V4L2_CID_MPEG_BASE+572)
- /**
- * Defines the Control ID to set total frames to encode.
- *
- * An integer value should be supplied with this control. A value of "x"
- * indicates the number of frames that are given to encoder for encoding.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- **/
- #define V4L2_CID_MPEG_VIDEOENC_FRAMES_TO_ENCODE (V4L2_CID_MPEG_BASE+573)
- /**
- * Defines the Control ID to configure initial QP parameters for a encoder session.
- *
- * A pointer to a valid #v4l2_ctrl_video_init_qp structure must be supplied
- * with this control.
- *
- **/
- #define V4L2_CID_MPEG_VIDEOENC_INIT_FRAME_QP (V4L2_CID_MPEG_BASE+574)
- /**
- * Defines the Control ID to enable lossless H.264/H.265 encoding.
- *
- * An boolean value must be supplied with this control. Default is 0.
- * Lossless encoding is supported only for YUV444 8/10-bit format.
- * @note This control must be set in case of H.264 YUV444 encoding as
- * it does not support lossy encoding.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_ENABLE_LOSSLESS (V4L2_CID_MPEG_BASE+575)
- /**
- * Defines the Control ID to set chroma_factor_idc for H.265 encoding.
- *
- * An integer value must be supplied with this control. Default is 1, and
- * 3 for YUV444 8/10-bit format.
- *
- * @attention This control should be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_H265_CHROMA_FACTOR_IDC (V4L2_CID_MPEG_BASE+576)
- /**
- * Defines the Control ID to configure preprocessing enhancement for a session.
- *
- * A pointer to a valid #v4l2_enc_ppe_init_params structure must be supplied
- * with this control.
- *
- * @attention This control must be set after requesting buffers on both the
- * planes.
- */
- #define V4L2_CID_MPEG_VIDEOENC_PPE_INIT_PARAMS (V4L2_CID_MPEG_BASE+577)
- /**
- * Defines Control ID to configure PRESET id for CUVID Encoder
- *
- * An integer value between 1 to 7 should be supplied with this control.
- *
- * Check PRESET Guide for more details at
- * https://docs.nvidia.com/video-technologies/video-codec-sdk/nvenc-preset-migration-guide/index.html
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_CUDA_PRESET_ID (V4L2_CID_MPEG_BASE+578)
- /**
- * Defines Control ID to configure TUNING INFO id for CUVID Encoder
- *
- * An integer value between 1 to 4 should be supplied with this control.
- *
- * Check PRESET Guide for more details at
- * https://docs.nvidia.com/video-technologies/video-codec-sdk/nvenc-preset-migration-guide/index.html
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_CUDA_TUNING_INFO (V4L2_CID_MPEG_BASE+579)
- /** Defines Control ID to configure CONSTQP VALUE for CUVID Encoder
- *
- * An integer value between 0 to 51 should be supplied with this control.
- *
- * @attention This control must be set after setting formats on both the planes
- * and before requesting buffers on either plane.
- */
- #define V4L2_CID_MPEG_VIDEOENC_CUDA_CONSTQP (V4L2_CID_MPEG_BASE+580)
- /** Defines Control ID to configure FPS VALUE for CUVID Encoder
- *
- * A positive integer value should be supplied with this control.
- *
- * @attention This control is runtime configurable and can be called anytime after setting
- * formats on both the planes.
- */
- #define V4L2_CID_MPEG_VIDEOENC_RECONFIG_FPS (V4L2_CID_MPEG_BASE+581)
- /** @} */
- /**
- * @defgroup V4L2Argus V4L2 Video Camera
- *
- * @brief NVIDIA V4L2 Camera Description and Extensions
- *
- * The camera device node is \c "/dev/video%d".
- *
- * ### Supported Pixelformats
- * CAPTURE PLANE
- * :---------------------
- * V4L2_PIX_FMT_NV12M
- * -
- *
- * ### Supported Memory Types
- * MEMORY | CAPTURE PLANE
- * :------------------: | :-----------:
- * V4L2_MEMORY_MMAP | Y
- * V4L2_MEMORY_DMABUF | Y
- * V4L2_MEMORY_USERPTR | N
- * \attention For the camera, it is necessary that the capture plane
- * format be set and only then request buffers.
- *
- * ### Supported Controls
- * The following sections describe the supported controls.
- *
- * #### Controls From the Open Source V4L2-Controls Header
- * Control ID | Purpose | Runtime Configurable
- * -------------------------------- | -------------------- | :------------------:
- * - #V4L2_CID_3A_LOCK | AWB/AE Lock | Y
- *
- * All non-runtime configurable options must be set after setting format on
- * the capture planes and before requesting buffers.
- *
- *
- * ### NVIDIA-Specific Controls
- * - #V4L2_CID_ARGUS_AUTO_WHITE_BALANCE_MODE
- * - #V4L2_CID_ARGUS_SENSOR_MODE
- * - #V4L2_CID_ARGUS_DENOISE_STRENGTH
- * - #V4L2_CID_ARGUS_DENOISE_MODE
- * - #V4L2_CID_ARGUS_EE_STRENGTH
- * - #V4L2_CID_ARGUS_EE_MODE
- * - #V4L2_CID_ARGUS_AE_ANTIBANDING_MODE
- * - #V4L2_CID_ARGUS_ISP_DIGITAL_GAIN_RANGE
- * - #V4L2_CID_ARGUS_COLOR_SATURATION
- * - #V4L2_CID_ARGUS_GAIN_RANGE
- * - #V4L2_CID_ARGUS_EXPOSURE_TIME_RANGE
- * - #V4L2_CID_ARGUS_METADATA
- *
- * ### Setting Framerate
- * The camera framerate can be set with \c VIDIOC_S_PARM IOCTL by setting the numerator
- * and denominator in `v4l2_streamparm.parm.output.timeperframe`.
- * Selection of camera mode can override this setting. If the camera mode is to be
- * selected along with the specified framerate, then camera mode must be selected before
- * setting the framerate.
- *
- * ### Camera Capture Metadata
- * The camera can be queried to report frame related metadata. See \c V4L2_CID_ARGUS_METADATA
- * for more information.
- *
- * ### EOS Handling
- * Camera outputs all the queued empty buffers with data and TIME_OUT if no more empty buffers
- * are queued. If error is encountered, am empty buffer is queued to the output with
- * V4L2_BUF_FLAG_LAST flag.
- * @{
- * @ingroup ee_extensions_group
- */
- /**
- * Defines the Control ID to set auto white balance mode for camera.
- *
- * A value of type \c v4l2_argus_ac_awb_mode must be supplied
- * with this control.
- *
- * @attention This control should be set after setting format
- * on the capture plane.
- */
- #define V4L2_CID_ARGUS_AUTO_WHITE_BALANCE_MODE (V4L2_CID_CAMERA_CLASS_BASE+20)
- /**
- * Defines the Control ID to set sensor mode for camera.
- *
- * A non-negative integer value must be supplied with this control.
- *
- * @attention This control should be set after setting format
- * and before requesting buffers on the capture plane.
- */
- #define V4L2_CID_ARGUS_SENSOR_MODE (V4L2_CID_CAMERA_CLASS_BASE+32)
- /**
- * Defines the Control ID to set denoise strength for camera.
- *
- * A pointer to a valid structure \c v4l2_argus_denoise_strength must be
- * supplied with this control.
- *
- * @attention This control should be set after setting format
- * on the capture plane.
- */
- #define V4L2_CID_ARGUS_DENOISE_STRENGTH (V4L2_CID_CAMERA_CLASS_BASE+33)
- /**
- * Defines the Control ID to set denoise mode for camera.
- *
- * A value of type \c v4l2_argus_denoise_mode must be
- * supplied with this control.
- *
- * @attention This control should be set after setting format
- * on the capture plane.
- */
- #define V4L2_CID_ARGUS_DENOISE_MODE (V4L2_CID_CAMERA_CLASS_BASE+34)
- /**
- * Defines the Control ID to set edge enhancement strength for camera.
- *
- * A pointer to a valid structure \c v4l2_argus_edge_enhance_strength
- * must be supplied with this control.
- *
- * @attention This control should be set after setting format
- * on the capture plane.
- */
- #define V4L2_CID_ARGUS_EE_STRENGTH (V4L2_CID_CAMERA_CLASS_BASE+35)
- /**
- * Defines the Control ID to set edge enhancement mode for camera.
- *
- * A value of type \c v4l2_argus_edge_enhance_mode
- * must be supplied with this control.
- *
- * @attention This control should be set after setting format
- * on the capture plane.
- */
- #define V4L2_CID_ARGUS_EE_MODE (V4L2_CID_CAMERA_CLASS_BASE+36)
- /**
- * Defines the Control ID to set Auto Exposure antibanding mode for camera.
- *
- * A value of type \c v4l2_argus_ac_ae_antibanding_mode must be supplied
- * with this control.
- *
- * @attention This control should be set after setting format
- * on the capture plane.
- */
- #define V4L2_CID_ARGUS_AE_ANTIBANDING_MODE (V4L2_CID_CAMERA_CLASS_BASE+37)
- /**
- * Defines the Control ID to set edge enhancement settings for camera.
- *
- * A pointer to a valid structure \c v4l2_argus_exposure_compensation
- * must be supplied with this control.
- *
- * @attention This control should be set after setting format
- * on the capture plane.
- */
- #define V4L2_CID_ARGUS_EXPOSURE_COMPENSATION (V4L2_CID_CAMERA_CLASS_BASE+38)
- /**
- * Defines the Control ID to set edge enhancement settings for camera.
- *
- * A pointer to a valid structure \c v4l2_argus_ispdigital_gainrange
- * must be supplied with this control.
- *
- * @attention This control should be set after setting format
- * on the capture plane.
- */
- #define V4L2_CID_ARGUS_ISP_DIGITAL_GAIN_RANGE (V4L2_CID_CAMERA_CLASS_BASE+39)
- /**
- * Defines the Control ID to set sensor mode for camera.
- *
- * A pointer to a valid structure \c v4l2_argus_color_saturation
- * must be supplied with this control.
- * The flag `EnableSaturation` must be set to true to enable setting
- * the specified color saturation
- *
- * @attention This control should be set after setting format
- * and before requesting buffers on the capture plane.
- */
- #define V4L2_CID_ARGUS_COLOR_SATURATION (V4L2_CID_CAMERA_CLASS_BASE+40)
- /**
- * Defines the Control ID to set edge enhancement settings for camera.
- *
- * A pointer to a valid structure \c v4l2_argus_gainrange
- * must be supplied with this control.
- *
- * @attention This control should be set after setting format
- * on the capture plane.
- */
- #define V4L2_CID_ARGUS_GAIN_RANGE (V4L2_CID_CAMERA_CLASS_BASE+41)
- /**
- * Defines the Control ID to set edge enhancement settings for camera.
- *
- * A pointer to a valid structure \c v4l2_argus_exposure_timerange
- * must be supplied with this control.
- *
- * @attention This control should be set after setting format
- * on the capture plane.
- */
- #define V4L2_CID_ARGUS_EXPOSURE_TIME_RANGE (V4L2_CID_CAMERA_CLASS_BASE+42)
- /**
- * Defines the Control ID to get the camera argus output metadata.
- *
- * A pointer to a valid structure \c v4l2_argus_ctrl_metadata must be supplied
- * with this control.
- *
- * @attention This control must be read after dequeueing a buffer successfully from
- * the capture plane. The values in the structure are valid until the buffer is queued
- * again.
- */
- #define V4L2_CID_ARGUS_METADATA (V4L2_CID_CAMERA_CLASS_BASE+43)
- /** @} */
- /** @addtogroup V4L2Dec */
- /** @{ */
- /**
- * Enum v4l2_skip_frames_type, possible methods for decoder skip frames. */
- enum v4l2_skip_frames_type {
- /** Do not skip any frame. */
- V4L2_SKIP_FRAMES_TYPE_NONE = 0,
- /** Skip all non-reference frames. */
- V4L2_SKIP_FRAMES_TYPE_NONREF = 1,
- /** Skip all frames except IDR */
- V4L2_SKIP_FRAMES_TYPE_DECODE_IDR_ONLY = 2,
- };
- /**
- * Enum v4l2_cuda_mem_type, possible methods for cuda memory tpye. */
- enum v4l2_cuda_mem_type {
- /** Memory type device. */
- V4L2_CUDA_MEM_TYPE_DEVICE = 0,
- /** Memory type host. */
- V4L2_CUDA_MEM_TYPE_PINNED = 1,
- /** Memory type unified. */
- V4L2_CUDA_MEM_TYPE_UNIFIED = 2,
- };
- /**
- * Enum v4l2_videodec_input_error_type, possible error types for input stream. */
- enum v4l2_videodec_input_error_type {
- /** no error. */
- V4L2_DEC_ERROR_NONE = 0x0,
- /** sps error. */
- V4L2_DEC_ERROR_SPS = 0x1,
- /** pps error. */
- V4L2_DEC_ERROR_PPS = 0x2,
- /** slice header error. */
- V4L2_DEC_ERROR_SLICE_HDR = 0x4,
- /** missing reference frame error. */
- V4L2_DEC_ERROR_MISSING_REF_FRAME = 0x8,
- /** VPS error. */
- V4L2_DEC_ERROR_VPS = 0x10,
- };
- /**
- * Holds the decoder error status metadata for the frame.
- */
- typedef struct v4l2_ctrl_videodec_statusmetadata_
- {
- /** Error types:
- * bit 0: Fatal
- * bit 1: MB level syntax
- * bit 2: Missing Slice(s)
- * bit 3: PrevFrameLostFlag */
- __u32 DecodeError;
- /** Number of macro blocks decoded without error. */
- __u32 DecodedMBs;
- /** Number of macro blocks where error was concealed. */
- __u32 ConcealedMBs;
- /** POC of the reference frame used for concealment. */
- __u32 nConcealedFromPOC;
- /** Time required to decode the frame, in microseconds. */
- __u32 FrameDecodeTime;
- }v4l2_ctrl_videodec_statusmetadata;
- /**
- * Holds the the frame specific metadata for a reference frame.
- */
- typedef struct v4l2_ctrl_videodec_refframe_metadata_
- {
- /** Boolean value indicating if the frame is present in DPB. */
- __u32 bPresent;
- /** Boolean value indicating if the frame is an IDR. */
- __u32 bIdrFrame;
- /** Boolean value indicating if the frame is a long term reference frame. */
- __u32 bLTRefFrame;
- /** Boolean value indicating if it is a predicted frame. */
- __u32 bPredicted;
- /** Picture order count of the frame. */
- __u32 nPictureOrderCnt;
- /** Frame number. Resets to zero for an IDR frame. */
- __u32 nFrameNum;
- /** Long Term Frame Index of the frame. */
- __u32 nLTRFrameIdx;
- } v4l2_ctrl_videodec_refframe_metadata;
- /**
- * Holds the the frame specific metadata for the current frame.
- */
- typedef struct v4l2_ctrl_videodec_currentframe_metadata_
- {
- /** Boolean value indicating if the current frame is a reference frame. */
- __u32 bRefFrame;
- /** Boolean value indicating if the current frame is an IDR. */
- __u32 bIdrFrame;
- /** Boolean value indicating if the current frame is a long term reference frame. */
- __u32 bLTRefFrame;
- /** Picture order count of the current frame. */
- __u32 nPictureOrderCnt;
- /** Frame number. Resets to zero for an IDR frame. */
- __u32 nFrameNum;
- /** Long Term Frame Index of the current frame. */
- __u32 nLTRFrameIdx;
- } v4l2_ctrl_videodec_currentframe_metadata;
- /**
- * Holds the decoder DPB info metadata.
- */
- typedef struct v4l2_ctrl_videodec_dpbinfometadata_
- {
- /** Metadata for the current decoded frame. */
- v4l2_ctrl_videodec_currentframe_metadata currentFrame;
- /** Number of active frames present in the DPB. */
- __u32 nActiveRefFrames;
- /** An array of metadatas for the active frames in the DPB. Only
- * nActiveRefFrames elements in the array are valid. */
- v4l2_ctrl_videodec_refframe_metadata RPSList[16];
- } v4l2_ctrl_videodec_dpbinfometadata;
- /**
- * Holds H.264 specific decoder metadata for the frame.
- */
- typedef struct v4l2_ctrl_h264dec_bufmetadata_
- {
- /** Holds the number of bits in the frame. */
- __u32 nFrameNumBits;
- /** Type of frame:
- * 0 = B
- * 1 = P
- * 2 = I */
- __u32 FrameType;
- /** Holds the current DPB information of the decoder. */
- v4l2_ctrl_videodec_dpbinfometadata dpbInfo;
- }v4l2_ctrl_h264dec_bufmetadata;
- /**
- * Holds H.265 specific decoder metadata for the frame.
- */
- typedef struct v4l2_ctrl_hevcdec_bufmetadata_
- {
- /** Holds the number of bits in the frame. */
- __u32 nPocLsbBits;
- /** Type of frame:
- * 0 = B
- * 1 = P
- * 2 = I */
- __u32 FrameType;
- /** Holds the current DPB information of the decoder. */
- v4l2_ctrl_videodec_dpbinfometadata dpbInfo;
- }v4l2_ctrl_hevcdec_bufmetadata;
- /**
- * Holds the video decoder input header error metadata for a frame.
- */
- typedef struct v4l2_ctrl_videodec_inputbuf_metadata_
- {
- /** Bits represent types of error as defined
- * with v4l2_videodec_input_error_type. */
- __u32 nBitStreamError;
- } v4l2_ctrl_videodec_inputbuf_metadata;
- /**
- * Holds the video decoder output metadata for a frame.
- */
- typedef struct v4l2_ctrl_videodec_outputbuf_metadata_
- {
- /** Color primaries. */
- __u8 ucColorPrimaries;
- /** Transfer characteristics. */
- __u8 ucTransferCharacteristics;
- /** Matrix coefficients. */
- __u8 ucMatrixCoefficients;
- /** Boolean value indicating if \c FrameDecStats has valid contents. */
- __u32 bValidFrameStatus;
- /** Frame decode statistics. */
- v4l2_ctrl_videodec_statusmetadata FrameDecStats;
- /** Codec specific metadata for the frame. */
- union {
- /** H.264 specific metadata. */
- v4l2_ctrl_h264dec_bufmetadata H264DecParams;
- /** H.265 specific metadata. */
- v4l2_ctrl_hevcdec_bufmetadata HEVCDecParams;
- }CodecParams;
- } v4l2_ctrl_videodec_outputbuf_metadata;
- /** @} */
- /** @addtogroup V4L2Enc */
- /** @{ */
- /**
- * Specifies the types of encoder temporal tradeoff levels
- */
- enum v4l2_enc_temporal_tradeoff_level_type {
- /** Do not drop any buffers. */
- V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROPNONE = 0,
- /** Drop 1 in every 5 buffers. */
- V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP1IN5,
- /** Drop 1 in every 3 buffers. */
- V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP1IN3,
- /** Drop 1 in every 2 buffers. */
- V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP1IN2,
- /** Drop 2 in every 3 buffers. */
- V4L2_ENC_TEMPORAL_TRADEOFF_LEVEL_DROP2IN3,
- };
- /**
- * Specifies the encoder HW Preset type.
- */
- enum v4l2_enc_hw_preset_type {
- /** Encoder HWPreset DISABLED. */
- V4L2_ENC_HW_PRESET_DISABLE = 0,
- /** Encoder HWPreset with per frame encode time UltraFast. */
- V4L2_ENC_HW_PRESET_ULTRAFAST = 1,
- /** Encoder HWPreset with per frame encode time Fast. */
- V4L2_ENC_HW_PRESET_FAST,
- /** Encoder HWPreset with per frame encode time Medium. */
- V4L2_ENC_HW_PRESET_MEDIUM,
- /** Encoder HWPreset with per frame encode time Slow. */
- V4L2_ENC_HW_PRESET_SLOW,
- };
- /**
- * Specifies the encoder HW Preset type.
- */
- enum v4l2_enc_hw_tuning_info_type {
- /** Encoder Tuning Info Undefined */
- V4L2_ENC_TUNING_INFO_UNDEFINED = 0,
- /** Encoder Tuning Info High Quality */
- V4L2_ENC_TUNING_INFO_HIGH_QUALITY = 1,
- /** Encoder Tuning Info Low Latency */
- V4L2_ENC_TUNING_INFO_LOW_LATENCY,
- /** Encoder Tuning Info Ultra Low Latency */
- V4L2_ENC_TUNING_INFO_ULTRA_LOW_LATENCY,
- /** Encoder Tuning Info Lossless */
- V4L2_ENC_TUNING_INFO_LOSSLESS,
- };
- /**
- * Holds encoder HW Preset type parameters
- * to be used with #V4L2_CID_MPEG_VIDEOENC_HW_PRESET_TYPE_PARAM IOCTL.
- */
- typedef struct v4l2_enc_hw_preset_type_param_
- {
- /** Type in which the encoder hw preset is specified, one of type #v4l2_enc_hw_preset_type. */
- enum v4l2_enc_hw_preset_type hw_preset_type;
- /** Boolean value indicating if encoder set to max clock. */
- __u8 set_max_enc_clock;
- }v4l2_enc_hw_preset_type_param;
- /**
- * Enum specifying the type of slice length.
- */
- enum v4l2_enc_slice_length_type {
- /** Slice size is specified in terms of number of bytes. */
- V4L2_ENC_SLICE_LENGTH_TYPE_BITS = 0,
- /** Slice size is specified in terms of number of macroblocks. */
- V4L2_ENC_SLICE_LENGTH_TYPE_MBLK,
- };
- /**
- * Specifies the input buffer metadata flag.
- */
- enum v4l2_enc_input_metadata_param {
- /** Input metadata structure contains ROI parameters. */
- V4L2_ENC_INPUT_ROI_PARAM_FLAG = 1,
- /** Input metadata structure contains GDR parameters. */
- V4L2_ENC_INPUT_GDR_PARAM_FLAG = 1 << 1,
- /** Input metadata structure contains External RPS parameters. */
- V4L2_ENC_INPUT_RPS_PARAM_FLAG = 1 << 2,
- /** Input metadata structure contains External RC parameters. */
- V4L2_ENC_INPUT_RC_PARAM_FLAG = 1 << 3,
- /** Input metadata structure contains ReconCRC parameters. */
- V4L2_ENC_INPUT_RECONCRC_PARAM_FLAG = 1 << 4,
- };
- /**
- * Defines the possible levels for H.265 encoder.
- */
- enum v4l2_mpeg_video_h265_level {
- V4L2_MPEG_VIDEO_H265_LEVEL_1_0_MAIN_TIER = 0,
- V4L2_MPEG_VIDEO_H265_LEVEL_1_0_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_2_0_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_2_0_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_2_1_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_2_1_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_3_0_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_3_0_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_3_1_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_3_1_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_4_0_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_4_0_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_4_1_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_4_1_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_5_0_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_5_0_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_5_1_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_5_1_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_5_2_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_5_2_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_6_0_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_6_0_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_6_1_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_6_1_HIGH_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_6_2_MAIN_TIER,
- V4L2_MPEG_VIDEO_H265_LEVEL_6_2_HIGH_TIER,
- };
- #define V4L2_MPEG_VIDEO_BITRATE_MODE_CONSTQP 0x2
- /**
- * Holds encoder slice length parameters, to be used with
- * \c V4L2_CID_MPEG_VIDEOENC_SLICE_LENGTH_PARAM IOCTL.
- */
- typedef struct v4l2_enc_slice_length_param_
- {
- /** Type in which the slice length is specified, one of type \c v4l2_enc_slice_length_type. */
- enum v4l2_enc_slice_length_type slice_length_type;
- /** Size of the slice in either number of bytes or number of macro blocks. */
- __u32 slice_length;
- }v4l2_enc_slice_length_param;
- /**
- * Holds encoder virtual buffer size parameters, to be used with
- * \c V4L2_CID_MPEG_VIDEOENC_VIRTUALBUFFER_SIZE IOCTL.
- */
- typedef struct v4l2_enc_virtual_buffer_size_
- {
- /** Size of the virtual buffer, in bits. */
- __u32 size;
- }v4l2_enc_virtual_buffer_size;
- /**
- * Holds encoder number of reference frame parameters, to be used with
- * \c V4L2_CID_MPEG_VIDEOENC_NUM_REFERENCE_FRAMES IOCTL.
- *
- * This is not supported for H.265.
- */
- typedef struct v4l2_enc_num_ref_frames_
- {
- /** Number of reference frames. */
- __u32 frames;
- }v4l2_enc_num_ref_frames;
- /**
- * Holds encoder slice intrareferesh parameters, to be used with
- * \c V4L2_CID_MPEG_VIDEOENC_SLICE_INTRAREFRESH_PARAM IOCTL.
- */
- typedef struct v4l2_enc_slice_intrarefresh_param_
- {
- /** Slice intrarefresh interval, in number of slices. */
- __u32 interval;
- }v4l2_enc_slice_intrarefresh_param;
- /**
- * Defines the maximum number of ROI regions supported by the encoder.
- */
- #define V4L2_MAX_ROI_REGIONS 8
- /**
- * Holds the encoder quality parameters for a single ROI region.
- */
- typedef struct v4l2_enc_ROI_param_
- {
- /** Region of interest rectangle. */
- struct v4l2_rect ROIRect;
- /** QP delta for the region. */
- __s32 QPdelta;
- } v4l2_enc_ROI_param;
- /**
- * Holds the encoder frame ROI parameters
- * to be used with #V4L2_CID_MPEG_VIDEOENC_ROI_PARAMS IOCTL.
- */
- typedef struct v4l2_enc_frame_ROI_params_
- {
- /** Number of regions. */
- __u32 num_ROI_regions;
- /** Array of indiviudal ROI parameters. */
- v4l2_enc_ROI_param ROI_params[V4L2_MAX_ROI_REGIONS];
- /** Config store integer to which this control is to be applied.
- * This must be same as the value of config store of \c v4l2_buffer to which
- * the ROI params is applied. */
- __u32 config_store;
- }v4l2_enc_frame_ROI_params;
- /**
- * Defines the available features for preprocessing enhancement (PPE) module
- */
- enum v4l2_ppe_feature {
- /** Default value for no feature enabled */
- V4L2_PPE_FEATURE_NONE = 0,
- /** Temporal Adaptive Quantization (TAQ) */
- V4L2_PPE_FEATURE_TAQ = (1 << 0),
- };
- /**
- * Holds the preprocessing enhancement initialization parameters
- * to be used with #V4L2_CID_MPEG_VIDEOENC_PPE_INIT_PARAMS IOCTL.
- */
- typedef struct v4l2_enc_ppe_init_params_
- {
- /** Boolean value indicating if PPE module should be enabled */
- __u8 enable_ppe;
- /** Bit flags to enable/disable each individual feature */
- __u32 feature_flags;
- /** Boolean value indicating if profiler should be enabled */
- __u8 enable_profiler;
- /** The max number of milliseconds that Nvmedia should wait for each frame processing */
- __s32 wait_time_ms;
- /** Maximum strength of QP delta map for TAQ */
- __u8 taq_max_qp_delta;
- /** Boolean value indicating if TAQ should be applied for B-frames */
- __u8 taq_b_frame_mode;
- }v4l2_enc_ppe_init_params;
- /**
- * Holds the motion vector parameters for a single block.
- * For H.264, nvenc provides one motion vector per 16x16 block(Macroblock).
- * For H.265, nvenc provides one motion vector per 32x32 block(Coded Tree Block).
- */
- typedef struct MVInfo_ {
- /** Number of pixels the macro block moved in horizontal direction. */
- __s32 mv_x : 16;
- /** Number of pixels the macro block moved in vertical direction. */
- __s32 mv_y : 14;
- /** Temporal hints used by hardware for Motion Estimation. */
- __u32 weight : 2;
- } MVInfo;
- /**
- * Holds the motion vector parameters for one complete frame.
- */
- typedef struct v4l2_ctrl_videoenc_outputbuf_metadata_MV_ {
- /** Size of the pMVInfo buffer, in bytes. */
- __u32 bufSize;
- /** Pointer to the buffer containing the motion vectors. */
- MVInfo *pMVInfo;
- } v4l2_ctrl_videoenc_outputbuf_metadata_MV;
- /**
- * Maximum number of reference frames supported by the encoder.
- */
- #define V4L2_MAX_REF_FRAMES 8
- /**
- * Holds the RPS List parameters of encoded frame.
- */
- typedef struct v4l2_enc_frame_full_prop_
- {
- /** Unique frame ID. */
- __u32 nFrameId;
- /** Boolean value indicating if current frame is an IDR. */
- __u8 bIdrFrame;
- /** Boolean value indicating if set Long Term Ref Flag. */
- __u8 bLTRefFrame;
- /** Picture Order Count. */
- __u32 nPictureOrderCnt;
- /** FrameNum. */
- __u32 nFrameNum;
- /** LongTermFrameIdx of a picture. */
- __u32 nLTRFrameIdx;
- } v4l2_enc_frame_full_prop;
- /**
- * Holds the encoder output metadata for a frame, to be used with
- * \c V4L2_CID_MPEG_VIDEOENC_METADATA IOCTL.
- */
- typedef struct v4l2_ctrl_videoenc_outputbuf_metadata_
- {
- /** Boolean value indicating if current frame is a key frame. */
- __u8 KeyFrame;
- /** Boolean value indicating end of frame in case of multi slice encoding. */
- __u8 EndofFrame;
- /** Average QP value of the frame. */
- __u16 AvgQP;
- /** Boolean value indicating if current frame is a golden or alternate frame. */
- __u8 bIsGoldenOrAlternateFrame;
- /** CRC for Reconstructed frame. */
- __u8 bValidReconCRC;
- /** Recon Y-frame CRC */
- __u32 ReconFrame_Y_CRC;
- /** Recon U-frame CRC */
- __u32 ReconFrame_U_CRC;
- /** Recon V-frame CRC */
- __u32 ReconFrame_V_CRC;
- /** Number of bits needed to encode the frame. */
- __u32 EncodedFrameBits;
- /** Minumum QP value in the frame. */
- __u32 FrameMinQP;
- /** Maximum QP value in the frame. */
- __u32 FrameMaxQP;
- /** RPS Feedback. */
- __u32 bRPSFeedback_status;
- /** Reference frame ID used for Motion Estimation of current frame,
- ignored for IDR */
- __u32 nCurrentRefFrameId;
- /** Number of active reference frames. */
- __u32 nActiveRefFrames;
- /** RPS List including most recent frame if it is reference frame. */
- v4l2_enc_frame_full_prop RPSList[V4L2_MAX_REF_FRAMES];
- } v4l2_ctrl_videoenc_outputbuf_metadata;
- /**
- * Holds the metadata parameters for video encoder and decoder.
- *
- * The metadata is valid for the buffer with index \c buffer_index after the
- * buffer is dequeued until it is queued again.
- */
- typedef struct v4l2_ctrl_video_metadata_
- {
- /** A pointer to #v4l2_ctrl_videodec_inputbuf_metadata structure.
- * This must be a valid pointer when used with #V4L2_CID_MPEG_VIDEODEC_INPUT_METADATA
- * IOCTL. */
- v4l2_ctrl_videodec_inputbuf_metadata *VideoDecHeaderErrorMetadata;
- /** A pointer to #v4l2_ctrl_videodec_outputbuf_metadata structure.
- * This must be a valid pointer when used with #V4L2_CID_MPEG_VIDEODEC_METADATA
- * IOCTL. */
- v4l2_ctrl_videodec_outputbuf_metadata *VideoDecMetadata;
- /** A pointer to #v4l2_ctrl_videoenc_outputbuf_metadata structure.
- * This must be a valid pointer when used with #V4L2_CID_MPEG_VIDEOENC_METADATA
- * IOCTL. */
- v4l2_ctrl_videoenc_outputbuf_metadata *VideoEncMetadata;
- /** A pointer to #v4l2_ctrl_videoenc_outputbuf_metadata_MV structure.
- * This must be a valid pointer when used with #V4L2_CID_MPEG_VIDEOENC_METADATA_MV
- * IOCTL. */
- v4l2_ctrl_videoenc_outputbuf_metadata_MV *VideoEncMetadataMV;
- /** Index of the buffer whose metadata is required. */
- __u32 buffer_index;
- } v4l2_ctrl_video_metadata;
- /**
- * Holds the encoder GDR parameters
- * to be used with #V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL.
- */
- typedef struct v4l2_enc_gdr_params_
- {
- /** Parameter for GDR (Intra Refresh) for specified number of frames. */
- __u32 nGDRFrames;
- } v4l2_enc_gdr_params;
- /**
- * Holds the params to configure encoder for external rps control
- * to be used with #V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RPS_CONTROL IOCTL.
- */
- typedef struct v4l2_enc_enable_ext_rps_ctrl_
- {
- /** Boolean value indicating if enabled External RPS control. */
- __u8 bEnableExternalRPS;
- /** Boolean value indicating if allowed gap in frame number. */
- __u8 bGapsInFrameNumAllowed;
- /* TODO : Check for field details. */
- __u32 nH264FrameNumBits;
- /* TODO : Check for field details. */
- __u32 nH265PocLsbBits;
- }v4l2_enc_enable_ext_rps_ctr;
- /**
- * Holds the encoder frame property.
- */
- typedef struct _v4l2_enc_frame_prop
- {
- /** unique Id. */
- __u32 nFrameId;
- /** Long Term Ref Flag. */
- __u8 bLTRefFrame;
- } v4l2_enc_frame_prop;
- /**
- * Holds the encoder frame external rps control parameters
- * to be used with #V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL.
- */
- typedef struct v4l2_enc_frame_ext_rps_ctrl_params_
- {
- /** unique Id of current frame. */
- __u32 nFrameId;
- /** Boolean value indicating if current frame referenced or non-referenced. */
- __u8 bRefFrame;
- /** Boolean value indicating if current frame long Term Ref Flag. */
- __u8 bLTRefFrame;
- /** Max Number of reference frames to use for inter-motion search. */
- __u32 nMaxRefFrames;
- /** # of valid entries in RPS, 0 means IDR. */
- __u32 nActiveRefFrames;;
- /** frame id of reference frame to be used for motion search, ignored for IDR. */
- __u32 nCurrentRefFrameId;
- /** Array of RPS */
- v4l2_enc_frame_prop RPSList[V4L2_MAX_REF_FRAMES];
- }v4l2_enc_frame_ext_rps_ctrl_params;
- /**
- * Holds the params to configure encoder for external rate control mode
- * to be used with #V4L2_CID_MPEG_VIDEOENC_ENABLE_EXTERNAL_RATE_CONTROL IOCTL.
- */
- typedef struct v4l2_enc_enable_ext_rate_ctrl_
- {
- /** Boolean value indicating if enabled External Picture RC. */
- __u8 bEnableExternalPictureRC;
- /** Max QP per session when external picture RC enabled. */
- __u32 nsessionMaxQP;
- }v4l2_enc_enable_ext_rate_ctr;
- /**
- * Holds the encoder frame external rate control parameters
- * to be used with #V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA ioctl.
- */
- typedef struct v4l2_enc_frame_ext_rate_ctrl_params_
- {
- /** Target frame bits. */
- __u32 nTargetFrameBits;
- /** Frame start QP. */
- __u32 nFrameQP;
- /** Frame min QP. */
- __u32 nFrameMinQp;
- /** Frame max QP. */
- __u32 nFrameMaxQp;
- /** Frame min QP deviation. */
- __u32 nMaxQPDeviation;
- }v4l2_enc_frame_ext_rate_ctrl_params;
- /**
- * Holds the params to configure encoder for ROI parameters encoding
- *
- * Must be used with #V4L2_CID_MPEG_VIDEOENC_ENABLE_ROI_PARAM IOCTL.
- */
- typedef struct v4l2_enc_enable_roi_param_
- {
- /** Boolean value to indicating ROI param encoding. */
- __u8 bEnableROI;
- }v4l2_enc_enable_roi_param;
- /**
- * Holds the params to configure encoder for Reconstructed CRC encoding
- *
- * Must be used with #V4L2_CID_MPEG_VIDEOENC_ENABLE_RECONCRC_PARAM IOCTL.
- */
- typedef struct v4l2_enc_enable_reconcrc_param_
- {
- /** Boolean value to indicating Reconstructed CRC encoding. */
- __u8 bEnableReconCRC;
- }v4l2_enc_enable_reconcrc_param;
- /**
- * Holds the encoder frame Reconstructed CRC parameters.
- *
- * Must be used with #V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL.
- */
- typedef struct v4l2_enc_frame_ReconCRC_params_
- {
- /** Rectangle to specify the co-ordinates of the input frame
- * used to calculate reconstructed picture CRC. */
- struct v4l2_rect ReconCRCRect;
- }v4l2_enc_frame_ReconCRC_params;
- /**
- * Holds the encoder frame input metadata parameters.
- *
- * Must be used with #V4L2_CID_MPEG_VIDEOENC_INPUT_METADATA IOCTL.
- */
- typedef struct v4l2_ctrl_videoenc_input_metadata_
- {
- /** Flag to indicate which inputbuffer metadata is valid. */
- __u32 flag;
- /** Pointer to the ROI params structure when ROI param is in metadata_flag. */
- v4l2_enc_frame_ROI_params *VideoEncROIParams;
- /** Pointer to the Reconstructed CRC parameter structure when ReconCRC param is in
- * metadata flag. */
- v4l2_enc_frame_ReconCRC_params *VideoReconCRCParams;
- /** Pointer to the GDR params structure when GDR param is in metadata_flag. */
- v4l2_enc_gdr_params *VideoEncGDRParams;
- /** Pointer to the External RPL control parameter structure when RPS param is in
- * metadata flag. */
- v4l2_enc_frame_ext_rps_ctrl_params *VideoEncRPSParams;
- /** Pointer to the External Rate control parameter structure when RC param is in
- * metadata flag. */
- v4l2_enc_frame_ext_rate_ctrl_params *VideoEncExtRCParams;
- /** Config store integer to which these parameters are to be applied.
- * This must be same as the value of config store of queued v4l2_buffer
- * for which these parameters are valid. */
- __u32 config_store;
- } v4l2_ctrl_videoenc_input_metadata;
- /**
- * Setting Qp values in #v4l2_ctrl_video_qp_range to QP_RETAIN_VAL
- * retains default or previously set QP values.
- */
- #define QP_RETAIN_VAL -1
- /**
- * Holds the encoder frame min/max QP parameters.
- *
- * Must be used with #V4L2_CID_MPEG_VIDEOENC_QP_RANGE IOCTL.
- */
- typedef struct _v4l2_ctrl_video_qp_range
- {
- /** Minimum QP value for I frame. */
- __u32 MinQpI;
- /** Maximum QP value for I frame. */
- __u32 MaxQpI;
- /** Minimum QP value for P frame. */
- __u32 MinQpP;
- /** Maximum QP value for P frame. */
- __u32 MaxQpP;
- /** Minimum QP value for B frame. */
- __u32 MinQpB;
- /** Maximum QP value for B frame. */
- __u32 MaxQpB;
- } v4l2_ctrl_video_qp_range;
- typedef struct _v4l2_ctrl_video_constqp
- {
- __u32 constQpI;
- __u32 constQpP;
- __u32 constQpB;
- } v4l2_ctrl_video_constqp;
- typedef struct _v4l2_ctrl_video_framerate
- {
- __u32 fps_n;
- __u32 fps_d;
- } v4l2_ctrl_video_framerate;
- /**
- * Holds the encoder init QP parameters.
- *
- * Must be used with #V4L2_CID_MPEG_VIDEOENC_INIT_FRAME_QP IOCTL.
- */
- typedef struct _v4l2_ctrl_video_init_qp
- {
- /** Initial QP value for I frame. */
- __u32 IInitQP;
- /** Initial QP value for P frame. */
- __u32 PInitQP;
- /** Initial QP value for B frame. */
- __u32 BInitQP;
- } v4l2_ctrl_video_init_qp;
- /**
- * Holds the params to configure tiles for AV1 encoding
- *
- * Must be used with #V4L2_CID_MPEG_VIDEOENC_AV1_TILE_CONFIGURATION IOCTL.
- */
- typedef struct v4l2_enc_av1_tile_config_
- {
- /** Boolean value to enable multi-tile */
- __u8 bEnableTile;
- /** Log2 Tile Rows */
- __u32 nLog2RowTiles;
- /** Log2 Tile Columns */
- __u32 nLog2ColTiles;
- }v4l2_enc_av1_tile_config;
- /** @} */
- /** @addtogroup V4L2Argus */
- /** @{ */
- /**
- * Enum specifying types of denoise modes.
- */
- enum v4l2_argus_denoise_mode {
- V4L2_ARGUS_DENOISE_MODE_UNKNOWN = 0,
- V4L2_ARGUS_DENOISE_MODE_OFF = 1,
- V4L2_ARGUS_DENOISE_MODE_FAST = 2,
- V4L2_ARGUS_DENOISE_MODE_HIGH_QUALITY = 3,
- };
- /**
- * Enum specifying types of edge enhancement modes.
- */
- enum v4l2_argus_edge_enhance_mode {
- V4L2_ARGUS_EDGE_ENHANCE_MODE_UNKNOWN = 0,
- V4L2_ARGUS_EDGE_ENHANCE_MODE_OFF = 1,
- V4L2_ARGUS_EDGE_ENHANCE_MODE_FAST = 2,
- V4L2_ARGUS_EDGE_ENHANCE_MODE_HIGH_QUALITY = 3,
- };
- /**
- * Enum specifying types of AE antibanding modes.
- */
- enum v4l2_argus_ac_ae_antibanding_mode {
- V4L2_ARGUS_AE_ANTIBANDING_MODE_UNKNOWN = 0,
- V4L2_ARGUS_AE_ANTIBANDING_MODE_OFF = 1,
- V4L2_ARGUS_AE_ANTIBANDING_MODE_AUTO = 2,
- V4L2_ARGUS_AE_ANTIBANDING_MODE_50HZ = 3,
- V4L2_ARGUS_AE_ANTIBANDING_MODE_60HZ = 4,
- };
- /**
- * Enum specifying types of AC AWB modes.
- */
- enum v4l2_argus_ac_awb_mode {
- V4L2_ARGUS_AWB_MODE_OFF = 1,
- V4L2_ARGUS_AWB_MODE_AUTO = 2,
- V4L2_ARGUS_AWB_MODE_INCANDESCENT = 3,
- V4L2_ARGUS_AWB_MODE_FLUORESCENT = 4,
- V4L2_ARGUS_AWB_MODE_WARM_FLUORESCENT = 5,
- V4L2_ARGUS_AWB_MODE_DAYLIGHT = 6,
- V4L2_ARGUS_AWB_MODE_CLOUDY_DAYLIGHT = 7,
- V4L2_ARGUS_AWB_MODE_TWILIGHT = 8,
- V4L2_ARGUS_AWB_MODE_SHADE = 9,
- V4L2_ARGUS_AWB_MODE_MANUAL = 10,
- };
- /**
- * Enum specifying types of AE states.
- */
- enum v4l2_argus_ae_state {
- V4L2_ARGUS_AeState_Unknown = 0,
- V4L2_ARGUS_AE_STATE_INACTIVE = 1,
- V4L2_ARGUS_AE_STATE_SEARCHING = 2,
- V4L2_ARGUS_AE_STATE_CONVERGED = 3,
- V4L2_ARGUS_AE_STATE_FLASH_REQUIRED = 4,
- V4L2_ARGUS_AE_STATE_TIMEOUT = 5,
- };
- /**
- * Enum specifying types of AWB states.
- */
- enum v4l2_argus_awb_state {
- V4L2_ARGUS_AwbState_Unknown = 0,
- V4L2_ARGUS_AWB_STATE_INACTIVE = 1,
- V4L2_ARGUS_AWB_STATE_SEARCHING = 2,
- V4L2_ARGUS_AWB_STATE_CONVERGED = 3,
- V4L2_ARGUS_AWB_STATE_LOCKED = 4,
- };
- /**
- * Holds the strength value for denoise operation.
- *
- * Must be used with #V4L2_CID_ARGUS_DENOISE_STRENGTH ioctl.
- */
- typedef struct _v4l2_argus_denoise_strength
- {
- /** Denoise Strength. Range: {-1.0f, 1.0f} **/
- float DenoiseStrength;
- }v4l2_argus_denoise_strength;
- /**
- * Holds the strength value for edge enhancement operation.
- *
- * Must be used with #V4L2_CID_ARGUS_EE_STRENGTH ioctl.
- */
- typedef struct _v4l2_argus_edge_enhance_strength
- {
- /** Edge Enhance Strength. Range: {-1.0f, 1.0f} **/
- float EdgeEnhanceStrength;
- }v4l2_argus_edge_enhance_strength;
- /**
- * Holds the value for exposure compensation.
- *
- * Must be used with #V4L2_CID_ARGUS_EXPOSURE_COMPENSATION ioctl.
- */
- typedef struct _v4l2_argus_exposure_compensation
- {
- /** Exposure Compensation. Range: {-2.0f, 2.0f} **/
- float ExposureCompensation;
- }v4l2_argus_exposure_compensation;
- /**
- * Holds the value for Isp Digital gain range.
- *
- * Must be used with #V4L2_CID_ARGUS_ISP_DIGITAL_GAIN_RANGE ioctl.
- */
- typedef struct _v4l2_argus_ispdigital_gainrange
- {
- /** Range: {1, 256} **/
- /** Digital Gain Range start limit **/
- float MinISPDigitalGainRange;
- /** Digital Gain Range end limit **/
- float MaxISPDigitalGainRange;
- }v4l2_argus_ispdigital_gainrange;
- /**
- * Holds the value for absolute color saturation.
- *
- * Must be used with #V4L2_CID_ARGUS_COLOR_SATURATION ioctl.
- */
- typedef struct _v4l2_argus_color_saturation
- {
- /** Boolean value to indicate enable of user-specified absolute color saturation **/
- __u8 EnableSaturation;
- /** Specified absolute color saturation **/
- float ColorSaturation;
- }v4l2_argus_color_saturation;
- /**
- * Holds the value for gain range.
- *
- * Must be used with #V4L2_CID_ARGUS_GAIN_RANGE ioctl.
- */
- typedef struct _v4l2_argus_gainrange
- {
- /** Analog Gain Range start limit **/
- float MinGainRange;
- /** Analog Gain Range end limit **/
- float MaxGainRange;
- }v4l2_argus_gainrange;
- /**
- * Holds the value for exposure range.
- *
- * Must be used with #V4L2_CID_ARGUS_EXPOSURE_TIME_RANGE ioctl.
- */
- typedef struct _v4l2_argus_exposure_timerange
- {
- /** Exposure Time Range start limit **/
- __u64 MinExposureTimeRange;
- /** Exposure Time Range end limit **/
- __u64 MaxExposureTimeRange;
- }v4l2_argus_exposure_timerange;
- /**
- * Holds the value for camera output metadata.
- *
- * Must be used with #V4L2_CID_ARGUS_METADATA ioctl.
- */
- typedef struct _v4l2_argus_ctrl_metadata
- {
- /** Boolean value to indicate if AE was locked for this capture **/
- __u8 AeLocked;
- /** Boolean value to indicate if metadata has valid contents **/
- __u8 ValidFrameStatus;
- /** Index of the buffer captured **/
- __u32 BufferIndex;
- /** Focuser Position used for capture**/
- __u32 FocuserPosition;
- /** CCT value calculated by AWB **/
- __u32 AwbCCT;
- /** ISO value used for capture **/
- __u32 SensorSensitivity;
- /** Time (nanoseconds) taken to integrate the capture **/
- __u64 FrameDuration;
- /** Frame readout time for the capture **/
- __u64 FrameReadoutTime;
- /** Sensor Exposure time value for the capture **/
- __u64 SensorExposureTime;
- /** ISP Digital gain value for the capture **/
- float IspDigitalGain;
- /** Estimated scene brightness for the capture **/
- float SceneLux;
- /** Sensor analog gain for the capture **/
- float SensorAnalogGain;
- /** AE state ran for capture **/
- enum v4l2_argus_ae_state AEState;
- /** AWB state ran for capture **/
- enum v4l2_argus_awb_state AWBState;
- }v4l2_argus_ctrl_metadata;
- /** @} */
- /** @addtogroup V4L2Conv */
- /** @{ */
- /**
- * Enum specifying types of buffer layouts.
- */
- enum v4l2_nv_buffer_layout {
- V4L2_NV_BUFFER_LAYOUT_PITCH = 0, /**< Pitch Linear Layout. */
- V4L2_NV_BUFFER_LAYOUT_BLOCKLINEAR = 1, /**< Block Linear Layout. */
- };
- /**
- * Specifies the types of rotation/flip algorithms.
- */
- enum v4l2_flip_method {
- V4L2_FLIP_METHOD_IDENTITY = 0, /**< Identity (no rotation). */
- V4L2_FLIP_METHOD_90L = 1, /**< Rotate counter-clockwise 90 degrees. */
- V4L2_FLIP_METHOD_180 = 2, /**< Rotate 180 degrees. */
- V4L2_FLIP_METHOD_90R = 3, /**< Rotate clockwise 90 degrees. */
- V4L2_FLIP_METHOD_HORIZ = 4, /**< Flip horizontally. */
- V4L2_FLIP_METHOD_INVTRANS = 5, /**< Flip across upper right/lower left diagonal. */
- V4L2_FLIP_METHOD_VERT = 6, /**< Flip vertically. */
- V4L2_FLIP_METHOD_TRANS = 7, /**< Flip across upper left/lower right diagonal. */
- };
- /**
- * Specifies the types of interpolation methods.
- */
- enum v4l2_interpolation_method {
- V4L2_INTERPOLATION_NEAREST = 1, /**< Nearest interpolation method */
- V4L2_INTERPOLATION_BILINEAR = 2, /**< Bi-Linear interpolation method */
- V4L2_INTERPOLATION_5_TAP = 3, /**< 5-Tap interpolation method */
- V4L2_INTERPOLATION_10_TAP = 4, /**< 10-Tap interpolation method */
- V4L2_INTERPOLATION_SMART = 5, /**< Smart interpolation method */
- V4L2_INTERPOLATION_NICEST = 6, /**< Nicest interpolation method */
- };
- /**
- * Specifies the types of TNR algorithms.
- */
- enum v4l2_tnr_algorithm {
- V4L2_TNR_ALGO_ORIGINAL = 0, /**< Default TNR algorithm. */
- V4L2_TNR_ALGO_OUTDOOR_LOW_LIGHT = 1, /**< Outdoor Low Light TNR algorithm. */
- V4L2_TNR_ALGO_OUTDOOR_MEDIUM_LIGHT = 2, /**< Outdoor Medium Light TNR algorithm. */
- V4L2_TNR_ALGO_OUTDOOR_HIGH_LIGHT = 3, /**< Outdoor High Light TNR algorithm. */
- V4L2_TNR_ALGO_INDOOR_LOW_LIGHT = 4, /**< Indoor Low Light TNR algorithm. */
- V4L2_TNR_ALGO_INDOOR_MEDIUM_LIGHT = 5, /**< Indoor Medium Light TNR algorithm. */
- V4L2_TNR_ALGO_INDOOR_HIGH_LIGHT = 6, /**< Indoor High Light TNR algorithm. */
- };
- /**
- * Specifies the types of YUV rescale methods.
- */
- enum v4l2_yuv_rescale_method {
- /**< Disable */
- V4L2_YUV_RESCALE_NONE = 0,
- /**< Standard(limited range [16 235]) to extension(full range [0 255]) */
- V4L2_YUV_RESCALE_STD_TO_EXT = 1,
- /**< Extension(full range [0 255] to standard(limited range [16 235]) */
- V4L2_YUV_RESCALE_EXT_TO_STD = 2,
- };
- typedef struct v4l2_ctrl_video_displaydata_
- {
- __u32 masteringdisplaydatapresent;
- }v4l2_ctrl_video_displaydata;
- /**
- * HDR Metadata.
- */
- typedef struct _v4l2_ctrl_video_hdrmasteringdisplaydata
- {
- // idx 0 : G, 1 : B, 2 : R
- __u16 display_primaries_x[3]; // normalized x chromaticity cordinate. It shall be in the range of 0 to 50000
- __u16 display_primaries_y[3]; // normalized y chromaticity cordinate. It shall be in the range of 0 to 50000
- __u16 white_point_x; // normalized x chromaticity cordinate of white point of mastering display
- __u16 white_point_y; // normalized y chromaticity cordinate of white point of mastering display
- __u32 max_display_parameter_luminance; // nominal maximum display luminance in units of 0.0001 candelas per square metre
- __u32 min_display_parameter_luminance; // nominal minimum display luminance in units of 0.0001 candelas per square metre
- } v4l2_ctrl_video_hdrmasteringdisplaydata;
- /**
- * Poll device
- */
- typedef struct _v4l2_ctrl_video_device_poll
- {
- __u16 req_events; // Requested events, a bitmask of POLLIN, POLLOUT, POLLERR, POLLPRI.
- __u16 resp_events; // Returned events a similar bitmask of above events.
- } v4l2_ctrl_video_device_poll;
- /** @} */
- #endif /*__V4L2_NV_EXTENSIONS_H__*/
|