nvbufsurftransform.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. /*
  2. * Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.
  3. *
  4. * NVIDIA Corporation and its licensors retain all intellectual property
  5. * and proprietary rights in and to this software, related documentation
  6. * and any modifications thereto. Any use, reproduction, disclosure or
  7. * distribution of this software and related documentation without an express
  8. * license agreement from NVIDIA Corporation is strictly prohibited.
  9. *
  10. */
  11. /**
  12. * @file nvbufsurftransform.h
  13. * <b>NvBufSurfTransform Interface </b>
  14. *
  15. * This file specifies the NvBufSurfTransform image transformation APIs.
  16. *
  17. * The NvBufSurfTransform API provides methods to set and get session parameters
  18. * and to transform and composite APIs.
  19. */
  20. #ifndef NVBUFSURFTRANSFORM_H_
  21. #define NVBUFSURFTRANSFORM_H_
  22. #include "nvbufsurface.h"
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. typedef struct CUstream_st* cudaStream_t; //!< Forward declaration of cudaStream_t.
  27. /** @defgroup ds_bbb NvBufSurfTransform Types and Functions
  28. * Defines types and functions of the \ref NvBufSurfTransform
  29. * application programming interface.
  30. * @ingroup ds_nvbuf_api
  31. * @{ */
  32. /**
  33. * Specifies compute devices used by \ref NvBufSurfTransform.
  34. */
  35. typedef enum
  36. {
  37. /** Specifies VIC as a compute device for Jetson or dGPU for an x86_64
  38. system. */
  39. NvBufSurfTransformCompute_Default,
  40. /** Specifies that the GPU is the compute device. */
  41. NvBufSurfTransformCompute_GPU,
  42. /** Specifies that the VIC as a compute device. Supported only for Jetson. */
  43. NvBufSurfTransformCompute_VIC
  44. } NvBufSurfTransform_Compute;
  45. /**
  46. * Specifies video flip methods.
  47. */
  48. typedef enum
  49. {
  50. /** Specifies no video flip. */
  51. NvBufSurfTransform_None,
  52. /** Specifies rotating 90 degrees clockwise. */
  53. NvBufSurfTransform_Rotate90,
  54. /** Specifies rotating 180 degree clockwise. */
  55. NvBufSurfTransform_Rotate180,
  56. /** Specifies rotating 270 degree clockwise. */
  57. NvBufSurfTransform_Rotate270,
  58. /** Specifies video flip with respect to the X-axis. */
  59. NvBufSurfTransform_FlipX,
  60. /** Specifies video flip with respect to the Y-axis. */
  61. NvBufSurfTransform_FlipY,
  62. /** Specifies video flip transpose. */
  63. NvBufSurfTransform_Transpose,
  64. /** Specifies video flip inverse transpose. */
  65. NvBufSurfTransform_InvTranspose,
  66. } NvBufSurfTransform_Flip;
  67. /**
  68. * Specifies video interpolation methods.
  69. */
  70. typedef enum
  71. {
  72. /** Specifies Nearest Interpolation Method interpolation. */
  73. NvBufSurfTransformInter_Nearest = 0,
  74. /** Specifies Bilinear Interpolation Method interpolation. */
  75. NvBufSurfTransformInter_Bilinear,
  76. /** Specifies GPU-Cubic, VIC-5 Tap interpolation. */
  77. NvBufSurfTransformInter_Algo1,
  78. /** Specifies GPU-Super, VIC-10 Tap interpolation. */
  79. NvBufSurfTransformInter_Algo2,
  80. /** Specifies GPU-Lanzos, VIC-Smart interpolation. */
  81. NvBufSurfTransformInter_Algo3,
  82. /** Specifies GPU-Ignored, VIC-Nicest interpolation. */
  83. NvBufSurfTransformInter_Algo4,
  84. /** Specifies GPU-Nearest, VIC-Nearest interpolation. */
  85. NvBufSurfTransformInter_Default
  86. } NvBufSurfTransform_Inter;
  87. /**
  88. * Specifies error codes returned by \ref NvBufSurfTransform functions.
  89. */
  90. typedef enum
  91. {
  92. /** Specifies an error in source or destination ROI. */
  93. NvBufSurfTransformError_ROI_Error = -4,
  94. /** Specifies invalid input parameters. */
  95. NvBufSurfTransformError_Invalid_Params = -3,
  96. /** Specifies a runtime execution error. */
  97. NvBufSurfTransformError_Execution_Error = -2,
  98. /** Specifies an unsupported feature or format. */
  99. NvBufSurfTransformError_Unsupported = -1,
  100. /** Specifies a successful operation. */
  101. NvBufSurfTransformError_Success = 0
  102. } NvBufSurfTransform_Error;
  103. /**
  104. * Specifies transform types.
  105. */
  106. typedef enum {
  107. /** Specifies a transform to crop the source rectangle. */
  108. NVBUFSURF_TRANSFORM_CROP_SRC = 1,
  109. /** Specifies a transform to crop the destination rectangle. */
  110. NVBUFSURF_TRANSFORM_CROP_DST = 1 << 1,
  111. /** Specifies a transform to set the filter type. */
  112. NVBUFSURF_TRANSFORM_FILTER = 1 << 2,
  113. /** Specifies a transform to set the flip method. */
  114. NVBUFSURF_TRANSFORM_FLIP = 1 << 3,
  115. /** Specifies a transform to normalize output. */
  116. NVBUFSURF_TRANSFORM_NORMALIZE = 1 << 4,
  117. /** Specifies a transform to allow odd crop. */
  118. NVBUFSURF_TRANSFORM_ALLOW_ODD_CROP = 1 << 5
  119. } NvBufSurfTransform_Transform_Flag;
  120. /**
  121. * Specifies types of composition operations.
  122. */
  123. typedef enum {
  124. /** Specifies a flag to describe the requested compositing operation. */
  125. NVBUFSURF_TRANSFORM_COMPOSITE = 1,
  126. /** Specifies a flag to describe the requested blending operation.
  127. * This flag is applicable for NvBufSurfTransformMultiInputBufCompositeBlend
  128. * and NvBufSurfTransformMultiInputBufCompositeBlendAsync API to support
  129. * blending operation in upcoming releases.
  130. */
  131. NVBUFSURF_TRANSFORM_BLEND = 1 << 1,
  132. /** Specifies a composite to set the filter type. */
  133. NVBUFSURF_TRANSFORM_COMPOSITE_FILTER = 1 << 2,
  134. } NvBufSurfTransform_Composite_Flag;
  135. /**
  136. * Holds the coordinates of a rectangle.
  137. */
  138. typedef struct
  139. {
  140. /** Holds the rectangle top. */
  141. uint32_t top;
  142. /** Holds the rectangle left side. */
  143. uint32_t left;
  144. /** Holds the rectangle width. */
  145. uint32_t width;
  146. /** Holds the rectangle height. */
  147. uint32_t height;
  148. }NvBufSurfTransformRect;
  149. /**
  150. * Holds configuration parameters for a transform/composite session.
  151. */
  152. typedef struct _NvBufSurfTransformConfigParams
  153. {
  154. /** Holds the mode of operation: VIC (Jetson) or GPU (iGPU + dGPU)
  155. If VIC is configured, \a gpu_id is ignored. */
  156. NvBufSurfTransform_Compute compute_mode;
  157. /** Holds the GPU ID to be used for processing. */
  158. int32_t gpu_id;
  159. /** User configure stream to be used. If NULL, the default stream is used.
  160. Ignored if VIC is used. */
  161. cudaStream_t cuda_stream;
  162. } NvBufSurfTransformConfigParams;
  163. /**
  164. * Holds transform parameters for a transform call.
  165. */
  166. typedef struct _NvBufSurfaceTransformParams
  167. {
  168. /** Holds a flag that indicates which transform parameters are valid. */
  169. uint32_t transform_flag;
  170. /** Holds the flip method. */
  171. NvBufSurfTransform_Flip transform_flip;
  172. /** Holds a transform filter. */
  173. NvBufSurfTransform_Inter transform_filter;
  174. /** Holds a pointer to a list of source rectangle coordinates for
  175. a crop operation. */
  176. NvBufSurfTransformRect *src_rect;
  177. /** Holds a pointer to list of destination rectangle coordinates for
  178. a crop operation. */
  179. NvBufSurfTransformRect *dst_rect;
  180. }NvBufSurfTransformParams;
  181. /**
  182. * Holds composite parameters for a composite call.
  183. */
  184. typedef struct _NvBufSurfTransformCompositeParams
  185. {
  186. /** Holds a flag that indicates which composition parameters are valid. */
  187. uint32_t composite_flag;
  188. /** Holds the number of input buffers to be composited. */
  189. uint32_t input_buf_count;
  190. /** Holds source rectangle coordinates of input buffers for compositing. */
  191. NvBufSurfTransformRect *src_comp_rect;
  192. /** Holds destination rectangle coordinates of input buffers for
  193. compositing. */
  194. NvBufSurfTransformRect *dst_comp_rect;
  195. /** Holds a composite filter. */
  196. NvBufSurfTransform_Inter composite_filter;
  197. }NvBufSurfTransformCompositeParams;
  198. typedef struct _NvBufSurfTransform_ColorParams {
  199. double red; /**< Holds the red component of color.
  200. Value must be in the range 0.0-1.0. */
  201. double green; /**< Holds the green component of color.
  202. Value must be in the range 0.0-1.0.*/
  203. double blue; /**< Holds the blue component of color.
  204. Value must be in the range 0.0-1.0.*/
  205. double alpha; /**< Holds the alpha component of color.
  206. Value must be in the range 0.0-1.0.*/
  207. } NvBufSurfTransform_ColorParams;
  208. /**
  209. * Holds composite blend parameters for a composite blender call.
  210. */
  211. typedef struct _NvBufSurfTransformCompositeBlendParams
  212. {
  213. /** Holds a flag that indicates which composition parameters are valid. */
  214. uint32_t composite_blend_flag;
  215. /** Holds the number of input buffers to be composited. */
  216. uint32_t input_buf_count;
  217. /** Holds a blend/composite filter applicable only */
  218. NvBufSurfTransform_Inter composite_blend_filter;
  219. /** Holds background color list for blending if background buffer is absent, if NULL
  220. * it wont be used, background buffer is expected to be NULL, if blending with
  221. * static color is required
  222. */
  223. NvBufSurfTransform_ColorParams *color_bg;
  224. /** Holds a boolean flag list indicating whether blending to be done for particular buffer,
  225. * if NULL, blending will be on all buffers, if valid value API expects at least numFilled
  226. * size list and each element can take value 0 or 1
  227. */
  228. uint32_t *perform_blending;
  229. }NvBufSurfTransformCompositeBlendParams;
  230. /**
  231. * Holds extended composite blend parameters for NvBufSurfTransformMultiInputBufCompositeBlend
  232. * and NvBufSurfTransformMultiInputBufCompositeBlendAsync API
  233. */
  234. typedef struct _NvBufSurfTransformCompositeBlendParamsEx
  235. {
  236. /** Holds legacy composite blend parameters */
  237. NvBufSurfTransformCompositeBlendParams params;
  238. /** Holds source rectangle coordinates of input buffers for compositing. */
  239. NvBufSurfTransformRect *src_comp_rect;
  240. /** Holds destination rectangle coordinates of input buffers for compositing. */
  241. NvBufSurfTransformRect *dst_comp_rect;
  242. /** Holds composite filters to use for composition/blending. */
  243. NvBufSurfTransform_Inter *composite_blend_filter;
  244. /** Holds alpha values of input buffers for the blending. */
  245. float *alpha;
  246. /** reserved fields. */
  247. void *reserved[STRUCTURE_PADDING];
  248. }NvBufSurfTransformCompositeBlendParamsEx;
  249. /**
  250. ** Holds the information about synchronization objects for asynchronous
  251. * transform/composite APIs
  252. *
  253. */
  254. typedef struct NvBufSurfTransformSyncObj* NvBufSurfTransformSyncObj_t;
  255. /**
  256. * \brief Sets user-defined session parameters.
  257. *
  258. * If user-defined session parameters are set, they override the
  259. * NvBufSurfTransform() function's default session.
  260. *
  261. * @param[in] config_params A pointer to a structure that is populated
  262. * with the session parameters to be used.
  263. *
  264. * @return An \ref NvBufSurfTransform_Error value indicating
  265. * success or failure.
  266. */
  267. NvBufSurfTransform_Error NvBufSurfTransformSetSessionParams
  268. (NvBufSurfTransformConfigParams *config_params);
  269. /**
  270. * \brief Gets the session parameters used by NvBufSurfTransform().
  271. *
  272. * @param[out] config_params A pointer to a caller-allocated structure to be
  273. * populated with the session parameters used.
  274. *
  275. * @return An \ref NvBufSurfTransform_Error value indicating
  276. * success or failure.
  277. */
  278. NvBufSurfTransform_Error NvBufSurfTransformGetSessionParams
  279. (NvBufSurfTransformConfigParams *config_params);
  280. /**
  281. * \brief Performs a transformation on batched input images.
  282. *
  283. * If user-defined session parameters are to be used, call
  284. * NvBufSurfTransformSetSessionParams() before calling this function.
  285. *
  286. * @param[in] src A pointer to input batched buffers to be transformed.
  287. * @param[out] dst A pointer to a caller-allocated location where
  288. * transformed output is to be stored.
  289. * @par When destination cropping is performed, memory outside
  290. * the crop location is not touched, and may contain stale
  291. * information. The caller must perform a memset before
  292. * calling this function if stale information must be
  293. * eliminated.
  294. * @param[in] transform_params
  295. * A pointer to an \ref NvBufSurfTransformParams structure
  296. * which specifies the type of transform to be performed. They
  297. * may include any combination of scaling, format conversion,
  298. * and cropping for both source and destination.
  299. * Flipping and rotation are supported on VIC.
  300. * @return An \ref NvBufSurfTransform_Error value indicating
  301. * success or failure.
  302. */
  303. NvBufSurfTransform_Error NvBufSurfTransform (NvBufSurface *src, NvBufSurface *dst,
  304. NvBufSurfTransformParams *transform_params);
  305. /**
  306. * \brief Composites batched input images.
  307. *
  308. * The compositer scales and stitches
  309. * batched buffers indicated by \a src into a single destination buffer, \a dst.
  310. *
  311. * If user-defined session parameters are to be used, call
  312. * NvBufSurfTransformSetSessionParams() before calling this function.
  313. *
  314. * @param[in] src A pointer to input batched buffers to be transformed.
  315. * @param[out] dst A pointer a caller-allocated location (a single buffer)
  316. * where composited output is to be stored.
  317. * @param[in] composite_params
  318. * A pointer to an \ref NvBufSurfTransformCompositeParams
  319. * structure which specifies the compositing operation to be
  320. * performed, e.g., the source and destination rectangles
  321. * in \a src and \a dst.
  322. * @return An \ref NvBufSurfTransform_Error value indicating success or failure.
  323. */
  324. NvBufSurfTransform_Error NvBufSurfTransformComposite (NvBufSurface *src,
  325. NvBufSurface *dst, NvBufSurfTransformCompositeParams *composite_params);
  326. /**
  327. * \brief An asynchronous (non-blocking) transformation on batched input images.
  328. *
  329. * If user-defined session parameters are to be used, call
  330. * NvBufSurfTransformSetSessionParams() before calling this function.
  331. *
  332. * @param[in] src A pointer to input batched buffers to be transformed.
  333. * @param[out] dst A pointer to a caller-allocated location where
  334. * transformed output is to be stored.
  335. * @par When destination cropping is performed, memory outside
  336. * the crop location is not touched, and may contain stale
  337. * information. The caller must perform a memset before
  338. * calling this function if stale information must be
  339. * eliminated.
  340. * @param[in] transform_params
  341. * A pointer to an \ref NvBufSurfTransformParams structure
  342. * which specifies the type of transform to be performed. They
  343. * may include any combination of scaling, format conversion,
  344. * and cropping for both source and destination.
  345. * Flipping and rotation are supported on VIC/GPU.
  346. * @param[out] sync_objs
  347. * A pointer to an \ref NvBufSurfTransformSyncObj structure
  348. * which holds synchronization information of the current
  349. * transform call. \ref NvBufSurfTransfromSyncObjWait() API to be
  350. * called on this object to wait for transformation to complete.
  351. * \ref NvBufSurfTransformSyncObjDestroy API should be called after
  352. * \ref NvBufSurfTransformSyncObjWait API to release the objects
  353. * If the parameter is NULL, the call would return only after
  354. * the transform is complete.
  355. * @return An \ref NvBufSurfTransform_Error value indicating
  356. * success or failure.
  357. */
  358. NvBufSurfTransform_Error NvBufSurfTransformAsync (NvBufSurface *src,
  359. NvBufSurface *dst, NvBufSurfTransformParams *transform_params,
  360. NvBufSurfTransformSyncObj_t *sync_obj);
  361. /**
  362. * \brief Composites batched input images Asynchronously (non-blocking).
  363. *
  364. * The compositer scales and stitches
  365. * batched buffers indicated by \a src into a single destination buffer, \a dst.
  366. *
  367. * If user-defined session parameters are to be used, call
  368. * NvBufSurfTransformSetSessionParams() before calling this function.
  369. *
  370. * @param[in] src A pointer to input batched buffers to be composited.
  371. * @param[out] dst A pointer a caller-allocated location (a single buffer)
  372. * where composited output is to be stored.
  373. * @param[in] composite_params
  374. * A pointer to an \ref NvBufSurfTransformCompositeParams
  375. * structure which specifies the compositing operation to be
  376. * performed, e.g., the source and destination rectangles
  377. * in \a src and \a dst.
  378. * @param[out] sync_objs
  379. * A pointer to an \ref NvBufSurfTransformSyncObj structure
  380. * which holds synchronization information of the current
  381. * composite call. ref\ NvBufSurfTransfromSyncObjWait() API to be
  382. * called on this object to wait for composition to complete.
  383. * \ref NvBufSurfTransformSyncObjDestroy API should be called after
  384. * \ref NvBufSurfTransformSyncObjWait API to release the objects
  385. * If the parameter is NULL, the call would return only after
  386. * the composite is complete.
  387. * @return An \ref NvBufSurfTransform_Error value indicating success or failure.
  388. */
  389. NvBufSurfTransform_Error NvBufSurfTransformCompositeAsync (NvBufSurface *src,
  390. NvBufSurface *dst, NvBufSurfTransformCompositeParams *composite_params,
  391. NvBufSurfTransformSyncObj_t *sync_obj);
  392. /**
  393. * \brief Composites/Blends batched input images
  394. *
  395. * The compositer scales and blends
  396. * batched buffers indicated by \a src0 with \a src1 into a batched
  397. * destination buffer \a dst using \a alpha as the blending weights.
  398. * A Linear interpolation operation is performed to get the final pix value
  399. * each of \a src0, \a src1, \a alpha and \a dst have one to one mapping
  400. * For each pixel the following linear interpolation is performed.
  401. * \a dst = ( \a src0* \a alpha + \a src1* (255.0 - \a alpha))/255.0
  402. * If user-defined session parameters are to be used, call
  403. * NvBufSurfTransformSetSessionParams() before calling this function.
  404. *
  405. * @param[in] src0 A pointer to input batched buffers to be blend.
  406. * @param[in] src1 A pointer to input batched buffers to be blend with.
  407. * @param[in] alpha A pointer to input batched buffers which has blending weights.
  408. * @param[out] dst A pointer to output batched buffers where blended composite
  409. * output is stored
  410. * @param[in] blend_params
  411. * A pointer to an \ref NvBufSurfTransformCompositeBlendParams
  412. * structure which specifies the compositing operation to be
  413. * performed
  414. * @return An \ref NvBufSurfTransform_Error value indicating success or failure.
  415. */
  416. NvBufSurfTransform_Error NvBufSurfTransformCompositeBlend(NvBufSurface *src0,
  417. NvBufSurface *src1, NvBufSurface *alpha, NvBufSurface *dst,
  418. NvBufSurfTransformCompositeBlendParams *blend_params);
  419. /**
  420. * Performs Composition and Blending on multiple input images(batch size=1) and provide
  421. * single output image(batch size=1)
  422. *
  423. * Composites and blends batched(batch size=1) input buffers pointed by src pointer.
  424. * Compositer scales, stitches and blends batched buffers pointed by src into single
  425. * dst buffer (batch size=1), the parameters for composition and blending is provided
  426. * by composite_blend_params.
  427. * Use NvBufSurfTransformSetSessionParams before each call, if user defined
  428. * session parameters are to be used.
  429. * It is different than the NvBufSurfTransformCompositeBlend API and It is currently
  430. * supported on Jetson only.
  431. *
  432. * @param[in] src pointer (multiple buffer) to input batched(batch size=1) buffers to be transformed.
  433. * @param[out] dst pointer (single buffer) where composited output would be stored.
  434. * @param[in] composite_blend_params pointer to NvBufSurfTransformCompositeBlendParamsEx structure.
  435. *
  436. * @return NvBufSurfTransform_Error indicating success or failure.
  437. */
  438. NvBufSurfTransform_Error NvBufSurfTransformMultiInputBufCompositeBlend (NvBufSurface **src,
  439. NvBufSurface *dst, NvBufSurfTransformCompositeBlendParamsEx *composite_blend_params);
  440. /**
  441. * Performs Composition and Blending on multiple input images(batch size=1) and provide
  442. * single output image(batch size=1) Asynchronously (non-blocking).
  443. *
  444. * Composites and blends batched(batch size=1) input buffers pointed by src pointer.
  445. * Compositer scales, stitches and blends batched buffers pointed by src into single
  446. * dst buffer (batch size=1), the parameters for composition and blending is provided
  447. * by composite_blend_params.
  448. * Use NvBufSurfTransformSetSessionParams before each call, if user defined
  449. * session parameters are to be used.
  450. * It is different than the NvBufSurfTransformCompositeBlend API and It is currently
  451. * supported on Jetson only.
  452. *
  453. * @param[in] src pointer (multiple buffer) to input batched(batch size=1) buffers to be transformed.
  454. * @param[out] dst pointer (single buffer) where composited output would be stored.
  455. * @param[in] composite_blend_params pointer to NvBufSurfTransformCompositeParams structure.
  456. * @param[out] sync_objs
  457. * A pointer to an \ref NvBufSurfTransformSyncObj structure
  458. * which holds synchronization information of the current
  459. * composite call. ref\ NvBufSurfTransfromSyncObjWait() API to be
  460. * called on this object to wait for composition to complete.
  461. * \ref NvBufSurfTransformSyncObjDestroy API should be called after
  462. * \ref NvBufSurfTransformSyncObjWait API to release the objects
  463. * If the parameter is NULL, the call would return only after
  464. * the composite is complete.
  465. *
  466. * @return NvBufSurfTransform_Error indicating success or failure.
  467. */
  468. NvBufSurfTransform_Error NvBufSurfTransformMultiInputBufCompositeBlendAsync (NvBufSurface **src,
  469. NvBufSurface *dst, NvBufSurfTransformCompositeBlendParamsEx *composite_blend_params,
  470. NvBufSurfTransformSyncObj_t *sync_obj);
  471. /**
  472. * \brief Wait on the synchroization object.
  473. *
  474. * The API waits on the synchronization object to finish the corresponding
  475. * processing of transform/composite calls or returns on time_out
  476. *
  477. *
  478. * @param[in] sync_obj A pointer to sync object on which the API should wait
  479. * @param[in] time_out Maximum time in ms API should wait before returning, only
  480. * Only applicable for VIC as of now.
  481. * @return An \ref NvBufSurfTransform_Error value indicating success or failure.
  482. */
  483. NvBufSurfTransform_Error NvBufSurfTransformSyncObjWait(
  484. NvBufSurfTransformSyncObj_t sync_obj, uint32_t time_out);
  485. /**
  486. * \brief Destroy the synchroization object.
  487. *
  488. * The API deletes the sync_obj which was used for previous transform/composite
  489. * Asynchronous calls
  490. *
  491. * @param[in] sync_obj A pointer sync_obj, which the API will delete
  492. * @return An \ref NvBufSurfTransform_Error value indicating success or failure.
  493. *
  494. */
  495. NvBufSurfTransform_Error NvBufSurfTransformSyncObjDestroy(
  496. NvBufSurfTransformSyncObj_t* sync_obj);
  497. /**
  498. * \brief Sets the default transform session as the current session for all upcoming transforms.
  499. *
  500. * @return An \ref NvBufSurfTransform_Error value indicating
  501. * success or failure.
  502. */
  503. NvBufSurfTransform_Error NvBufSurfTransformSetDefaultSession(void);
  504. /** @} */
  505. #ifdef __cplusplus
  506. }
  507. #endif
  508. #endif