oneVPL++
C++ API Prototype for oneVPL
extension_buffer.hpp
1 /*############################################################################
2  # Copyright Intel Corporation
3  #
4  # SPDX-License-Identifier: MIT
5  ############################################################################*/
6 
7 #pragma once
8 
9 #include <algorithm>
10 #include <exception>
11 #include <initializer_list>
12 #include <string>
13 #include <vector>
14 
15 #include "vpl/mfxstructures.h"
16 
17 #include "vpl/preview/payload.hpp"
18 
19 namespace oneapi {
20 namespace vpl {
21 
26 public:
29 
32  extension_buffer_base(const extension_buffer_base& other) = default;
33 
37  extension_buffer_base& operator=(const extension_buffer_base& other) = default;
38 
41 
44  virtual uint32_t get_ID() const = 0;
45 
48  virtual mfxExtBuffer* get_ptr() = 0;
49 };
50 
55 template <typename T, uint32_t ID>
57 protected:
60  private:
61  typedef char Yes;
62  typedef int No;
63 
64  template <typename C>
65  static Yes& check(decltype(&C::Header));
66  template <typename C>
67  static No& check(...);
68 
69  public:
71  enum { value = sizeof(check<T>(0)) == sizeof(Yes) };
72  };
73 
74 public:
76  template <
77  typename check = typename std::enable_if<is_extension_buffer::value, mfxExtBuffer>::type>
78  extension_buffer() : buffer_() {
79  buffer_.Header.BufferSz = sizeof(T);
80  buffer_.Header.BufferId = ID;
81  }
82 
85  extension_buffer(const extension_buffer& other) = default;
86 
90  extension_buffer& operator=(const extension_buffer& other) = default;
91  virtual ~extension_buffer() {}
92 
93 public:
96  uint32_t get_ID() const {
97  return buffer_.Header.BufferId;
98  }
99 
102  uint32_t get_size() const {
103  return buffer_.Header.BufferSz;
104  }
105 
108  virtual T& get_ref() {
109  return buffer_;
110  }
111 
114  T get() const {
115  return buffer_;
116  }
117 
120  mfxExtBuffer* get_ptr() {
121  return reinterpret_cast<mfxExtBuffer*>(&buffer_);
122  }
123 
124 protected:
127 };
128 
133 template <typename T, uint32_t ID>
135 public:
138 
141  extension_buffer_trival(const extension_buffer_trival& other) = default;
142 
147 };
148 
153 template <typename T, uint32_t ID>
155 public:
158 
162 
167 
168 protected:
171  virtual T& get_ref() {
172  return extension_buffer<T, ID>::get_ref(); // this is dangerouse for pointers!
173  }
174 };
175 
176 #define REGISTER_TRIVIAL_EXT_BUFFER(className, extBuffer, bufferID) \
177  \
178  class className : public extension_buffer_trival<extBuffer, bufferID> { \
179  public: \
180  \
181  className() : extension_buffer_trival() {} \
182  };
183 
184 REGISTER_TRIVIAL_EXT_BUFFER(ExtCodingOption, mfxExtCodingOption, MFX_EXTBUFF_CODING_OPTION)
185 REGISTER_TRIVIAL_EXT_BUFFER(ExtCodingOption2, mfxExtCodingOption2, MFX_EXTBUFF_CODING_OPTION2)
186 REGISTER_TRIVIAL_EXT_BUFFER(ExtCodingOption3, mfxExtCodingOption3, MFX_EXTBUFF_CODING_OPTION3)
187 
188 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPDenoise, mfxExtVPPDenoise, MFX_EXTBUFF_VPP_DENOISE)
189 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPDetail, mfxExtVPPDetail, MFX_EXTBUFF_VPP_DETAIL)
190 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPProcAmp, mfxExtVPPProcAmp, MFX_EXTBUFF_VPP_PROCAMP)
191 
193 class ExtVppAuxData : public extension_buffer_trival<mfxExtVppAuxData, MFX_EXTBUFF_VPP_AUXDATA> {
194 public:
195  explicit ExtVppAuxData(pic_struct picStruct) : extension_buffer_trival() {
196  this->buffer_.PicStruct = (uint16_t)picStruct;
197  }
198 };
199 
200 // I would assign special status for mfxEncodeCtrl structure for now
201 REGISTER_TRIVIAL_EXT_BUFFER(ExtVideoSignalInfo,
203  MFX_EXTBUFF_VIDEO_SIGNAL_INFO)
204 REGISTER_TRIVIAL_EXT_BUFFER(ExtAVCRefListCtrl, mfxExtAVCRefListCtrl, MFX_EXTBUFF_AVC_REFLIST_CTRL)
205 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPFrameRateConversion,
206  mfxExtVPPFrameRateConversion,
207  MFX_EXTBUFF_VPP_FRAME_RATE_CONVERSION)
208 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPImageStab,
209  mfxExtVPPImageStab,
210  MFX_EXTBUFF_VPP_IMAGE_STABILIZATION)
211 REGISTER_TRIVIAL_EXT_BUFFER(ExtMasteringDisplayColourVolume,
212  mfxExtMasteringDisplayColourVolume,
213  MFX_EXTBUFF_MASTERING_DISPLAY_COLOUR_VOLUME)
214 REGISTER_TRIVIAL_EXT_BUFFER(ExtContentLightLevelInfo,
216  MFX_EXTBUFF_CONTENT_LIGHT_LEVEL_INFO)
217 REGISTER_TRIVIAL_EXT_BUFFER(ExtPictureTimingSEI,
219  MFX_EXTBUFF_PICTURE_TIMING_SEI)
220 REGISTER_TRIVIAL_EXT_BUFFER(ExtAvcTemporalLayers,
222  MFX_EXTBUFF_AVC_TEMPORAL_LAYERS)
223 REGISTER_TRIVIAL_EXT_BUFFER(ExtEncoderCapability,
225  MFX_EXTBUFF_ENCODER_CAPABILITY)
226 REGISTER_TRIVIAL_EXT_BUFFER(ExtEncoderResetOption,
228  MFX_EXTBUFF_ENCODER_RESET_OPTION)
229 REGISTER_TRIVIAL_EXT_BUFFER(ExtAVCEncodedFrameInfo,
230  mfxExtAVCEncodedFrameInfo,
231  MFX_EXTBUFF_ENCODED_FRAME_INFO)
232 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPVideoSignalInfo,
233  mfxExtVPPVideoSignalInfo,
234  MFX_EXTBUFF_VPP_VIDEO_SIGNAL_INFO)
235 REGISTER_TRIVIAL_EXT_BUFFER(ExtEncoderROI, mfxExtEncoderROI, MFX_EXTBUFF_ENCODER_ROI)
236 REGISTER_TRIVIAL_EXT_BUFFER(ExtAVCRefLists, mfxExtAVCRefLists, MFX_EXTBUFF_AVC_REFLISTS)
237 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPDeinterlacing,
238  mfxExtVPPDeinterlacing,
239  MFX_EXTBUFF_VPP_DEINTERLACING)
240 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPFieldProcessing,
241  mfxExtVPPFieldProcessing,
242  MFX_EXTBUFF_VPP_FIELD_PROCESSING)
243 REGISTER_TRIVIAL_EXT_BUFFER(ExtDecVideoProcessing,
245  MFX_EXTBUFF_DEC_VIDEO_PROCESSING)
246 REGISTER_TRIVIAL_EXT_BUFFER(ExtChromaLocInfo, mfxExtChromaLocInfo, MFX_EXTBUFF_CHROMA_LOC_INFO)
247 REGISTER_TRIVIAL_EXT_BUFFER(ExtInsertHeaders, mfxExtInsertHeaders, MFX_EXTBUFF_INSERT_HEADERS)
248 REGISTER_TRIVIAL_EXT_BUFFER(ExtHEVCTiles, mfxExtHEVCTiles, MFX_EXTBUFF_HEVC_TILES)
249 REGISTER_TRIVIAL_EXT_BUFFER(ExtHEVCParam, mfxExtHEVCParam, MFX_EXTBUFF_HEVC_PARAM)
250 REGISTER_TRIVIAL_EXT_BUFFER(ExtDecodeErrorReport,
251  mfxExtDecodeErrorReport,
252  MFX_EXTBUFF_DECODE_ERROR_REPORT)
253 
256  : public extension_buffer_trival<mfxExtDecodedFrameInfo, MFX_EXTBUFF_DECODED_FRAME_INFO> {
257 public:
260 
261  explicit ExtDecodedFrameInfo(frame_type frameType) : extension_buffer_trival() {
262  this->buffer_.FrameType = (uint16_t)frameType;
263  }
264 };
265 
266 REGISTER_TRIVIAL_EXT_BUFFER(ExtTimeCode, mfxExtTimeCode, MFX_EXTBUFF_TIME_CODE)
267 REGISTER_TRIVIAL_EXT_BUFFER(ExtHEVCRegion, mfxExtHEVCRegion, MFX_EXTBUFF_HEVC_REGION)
268 REGISTER_TRIVIAL_EXT_BUFFER(ExtPredWeightTable,
270  MFX_EXTBUFF_PRED_WEIGHT_TABLE)
271 REGISTER_TRIVIAL_EXT_BUFFER(ExtAVCRoundingOffset,
273  MFX_EXTBUFF_AVC_ROUNDING_OFFSET)
274 REGISTER_TRIVIAL_EXT_BUFFER(ExtDirtyRect, mfxExtDirtyRect, MFX_EXTBUFF_DIRTY_RECTANGLES)
275 REGISTER_TRIVIAL_EXT_BUFFER(ExtMoveRect, mfxExtMoveRect, MFX_EXTBUFF_MOVING_RECTANGLES)
276 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPRotation, mfxExtVPPRotation, MFX_EXTBUFF_VPP_ROTATION)
277 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPScaling, mfxExtVPPScaling, MFX_EXTBUFF_VPP_SCALING)
278 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPMirroring, mfxExtVPPMirroring, MFX_EXTBUFF_VPP_MIRRORING)
279 REGISTER_TRIVIAL_EXT_BUFFER(ExtMVOverPicBoundaries,
281  MFX_EXTBUFF_MV_OVER_PIC_BOUNDARIES)
282 REGISTER_TRIVIAL_EXT_BUFFER(ExtVPPColorFill, mfxExtVPPColorFill, MFX_EXTBUFF_VPP_COLORFILL)
283 REGISTER_TRIVIAL_EXT_BUFFER(ExtColorConversion,
284  mfxExtColorConversion,
285  MFX_EXTBUFF_VPP_COLOR_CONVERSION)
286 REGISTER_TRIVIAL_EXT_BUFFER(ExtVP9TemporalLayers,
288  MFX_EXTBUFF_VP9_TEMPORAL_LAYERS)
289 REGISTER_TRIVIAL_EXT_BUFFER(ExtVP9Param, mfxExtVP9Param, MFX_EXTBUFF_VP9_PARAM)
290 REGISTER_TRIVIAL_EXT_BUFFER(ExtVppMctf, mfxExtVppMctf, MFX_EXTBUFF_VPP_MCTF)
291 REGISTER_TRIVIAL_EXT_BUFFER(ExtPartialBitstreamParam,
292  mfxExtPartialBitstreamParam,
293  MFX_EXTBUFF_PARTIAL_BITSTREAM_PARAM)
294 
295 // extension buffers with pointers below
296 
297 #define SCALAR_SETTER(type, name) \
298  \
299  \
300  void set_##name(type name) { \
301  this->buffer_.name = name; \
302  }
303 
304 #define ARRAY_SETTER(type, name, len) \
305  \
306  \
307  void set_##name(const type name[len]) { \
308  std::copy(name, name + len, this->buffer_.name); \
309  }
310 
311 #define REGISTER_SINGLE_POINTER_EXT_BUFFER_BEGIN(className, \
312  extBuffer, \
313  bufferID, \
314  ptr, \
315  ptrType, \
316  numElems) \
317  \
318  class className : public extension_buffer_with_ptrs<extBuffer, bufferID> { \
319  public: \
320  \
321  \
322  explicit className(const std::vector<ptrType>& ptr) : extension_buffer_with_ptrs() { \
323  if (ptr.size()) { \
324  buffer_.numElems = (decltype(buffer_.numElems))ptr.size(); \
325  buffer_.ptr = new ptrType[buffer_.numElems]; \
326  std::copy(ptr.begin(), ptr.end(), buffer_.ptr); \
327  } \
328  else { \
329  buffer_.numElems = 0; \
330  buffer_.ptr = NULL; \
331  } \
332  } \
333  \
334  \
335  \
336  className(const className& other) { \
337  this->buffer_ = other.buffer_; \
338  if (other.buffer_.numElems) { \
339  this->buffer_.numElems = other.buffer_.numElems; \
340  this->buffer_.ptr = new ptrType[buffer_.numElems]; \
341  std::copy(other.buffer_.ptr, \
342  other.buffer_.ptr + other.buffer_.numElems, \
343  this->buffer_.ptr); \
344  } \
345  } \
346  \
347  \
348  ~className() { \
349  delete[] buffer_.ptr; \
350  buffer_.numElems = 0; \
351  } \
352  \
353  \
354  \
355  virtual className& operator=(const className& other) { \
356  if (&other == this) \
357  return *this; \
358  \
359  if (this->buffer_.ptr) \
360  delete[] this->buffer_.ptr; \
361  this->buffer_ = other.buffer_; \
362  \
363  if (other.buffer_.numElems) { \
364  this->buffer_.numElems = other.buffer_.numElems; \
365  this->buffer_.ptr = new ptrType[buffer_.numElems]; \
366  std::copy(other.buffer_.ptr, \
367  other.buffer_.ptr + other.buffer_.numElems, \
368  this->buffer_.ptr); \
369  } \
370  else { \
371  buffer_.numElems = 0; \
372  buffer_.ptr = NULL; \
373  } \
374  \
375  return *this; \
376  }
377 
378 #define REGISTER_SINGLE_POINTER_EXT_BUFFER_END \
379  } \
380  ;
381 
382 REGISTER_SINGLE_POINTER_EXT_BUFFER_BEGIN(ExtCodingOptionVPS,
383  mfxExtCodingOptionVPS,
384  MFX_EXTBUFF_CODING_OPTION_VPS,
385  VPSBuffer,
386  uint8_t,
387  VPSBufSize)
388 SCALAR_SETTER(uint16_t, VPSId)
389 REGISTER_SINGLE_POINTER_EXT_BUFFER_END
390 
391 REGISTER_SINGLE_POINTER_EXT_BUFFER_BEGIN(ExtVPPComposite,
392  mfxExtVPPComposite,
393  MFX_EXTBUFF_CODING_OPTION_VPS,
394  InputStream,
396  NumInputStream)
397 SCALAR_SETTER(uint16_t, Y)
398 SCALAR_SETTER(uint16_t, R)
399 SCALAR_SETTER(uint16_t, U)
400 SCALAR_SETTER(uint16_t, G)
401 SCALAR_SETTER(uint16_t, V)
402 SCALAR_SETTER(uint16_t, B)
403 SCALAR_SETTER(uint16_t, NumTiles)
404 REGISTER_SINGLE_POINTER_EXT_BUFFER_END
405 
406 REGISTER_SINGLE_POINTER_EXT_BUFFER_BEGIN(ExtEncoderIPCMArea,
407  mfxExtEncoderIPCMArea,
408  MFX_EXTBUFF_ENCODER_IPCM_AREA,
409  Areas,
410  mfxExtEncoderIPCMArea::area,
411  NumArea);
412 REGISTER_SINGLE_POINTER_EXT_BUFFER_END
413 
414 REGISTER_SINGLE_POINTER_EXT_BUFFER_BEGIN(ExtMBForceIntra,
415  mfxExtMBForceIntra,
416  MFX_EXTBUFF_MB_FORCE_INTRA,
417  Map,
418  uint8_t,
419  MapSize)
420 REGISTER_SINGLE_POINTER_EXT_BUFFER_END
421 
422 REGISTER_SINGLE_POINTER_EXT_BUFFER_BEGIN(ExtMBDisableSkipMap,
423  mfxExtMBDisableSkipMap,
424  MFX_EXTBUFF_MB_DISABLE_SKIP_MAP,
425  Map,
426  uint8_t,
427  MapSize)
428 REGISTER_SINGLE_POINTER_EXT_BUFFER_END
429 
430 REGISTER_SINGLE_POINTER_EXT_BUFFER_BEGIN(ExtEncodedSlicesInfo,
431  mfxExtEncodedSlicesInfo,
432  MFX_EXTBUFF_ENCODED_SLICES_INFO,
433  SliceSize,
434  uint16_t,
435  NumSliceSizeAlloc)
436 SCALAR_SETTER(uint16_t, SliceSizeOverflow)
437 SCALAR_SETTER(uint16_t, NumSliceNonCopliant)
438 SCALAR_SETTER(uint16_t, NumEncodedSlice)
439 REGISTER_SINGLE_POINTER_EXT_BUFFER_END
440 
441 REGISTER_SINGLE_POINTER_EXT_BUFFER_BEGIN(ExtVP9Segmentation,
442  mfxExtVP9Segmentation,
443  MFX_EXTBUFF_VP9_SEGMENTATION,
444  SegmentId,
445  uint8_t,
446  NumSegmentIdAlloc)
447 SCALAR_SETTER(uint16_t, NumSegments)
448 SCALAR_SETTER(uint16_t, SegmentIdBlockSize)
449 ARRAY_SETTER(mfxVP9SegmentParam, Segment, 8)
450 REGISTER_SINGLE_POINTER_EXT_BUFFER_END
451 
452 REGISTER_SINGLE_POINTER_EXT_BUFFER_BEGIN(ExtEncodedUnitsInfo,
453  mfxExtEncodedUnitsInfo,
454  MFX_EXTBUFF_ENCODED_UNITS_INFO,
455  UnitInfo,
457  NumUnitsAlloc)
458 SCALAR_SETTER(uint16_t, NumUnitsEncoded)
459 REGISTER_SINGLE_POINTER_EXT_BUFFER_END
460 
461 // Complex extensions with more than 1 pointer
462 
465  : public extension_buffer_with_ptrs<mfxExtVPPDoNotUse, MFX_EXTBUFF_VPP_DONOTUSE> {
466 public:
469  ExtVPPDoNotUse(const std::initializer_list<uint32_t>& algos) : extension_buffer_with_ptrs() {
470  buffer_.NumAlg = static_cast<uint32_t>(algos.size());
471  buffer_.AlgList = new uint32_t[buffer_.NumAlg];
472 
473  std::copy(std::begin(algos), std::end(algos), this->buffer_.AlgList);
474  }
475 
478  explicit ExtVPPDoNotUse(const std::vector<uint32_t>& algos) : extension_buffer_with_ptrs() {
479  buffer_.NumAlg = static_cast<uint32_t>(algos.size());
480  buffer_.AlgList = new uint32_t[buffer_.NumAlg];
481 
482  std::copy(std::begin(algos), std::end(algos), this->buffer_.AlgList);
483  }
484 
487  explicit ExtVPPDoNotUse(const ExtVPPDoNotUse& other) {
488  this->buffer_.NumAlg = other.buffer_.NumAlg;
489  this->buffer_.AlgList = new uint32_t[other.buffer_.NumAlg];
490 
491  std::copy(other.buffer_.AlgList,
492  other.buffer_.AlgList + other.buffer_.NumAlg,
493  this->buffer_.AlgList);
494  }
495 
498  delete[] buffer_.AlgList;
499  buffer_.NumAlg = 0;
500  }
501 
505  virtual ExtVPPDoNotUse& operator=(const ExtVPPDoNotUse& other) {
506  if (&other == this)
507  return *this;
508 
509  if (this->buffer_.AlgList)
510  delete[] this->buffer_.AlgList;
511 
512  this->buffer_.NumAlg = other.buffer_.NumAlg;
513  this->buffer_.AlgList = new uint32_t[other.buffer_.NumAlg];
514 
515  std::copy(other.buffer_.AlgList,
516  other.buffer_.AlgList + other.buffer_.NumAlg,
517  this->buffer_.AlgList);
518  return *this;
519  }
520 };
521 
523 class ExtVPPDoUse : public extension_buffer_with_ptrs<mfxExtVPPDoUse, MFX_EXTBUFF_VPP_DOUSE> {
524 public:
527  ExtVPPDoUse(const std::initializer_list<uint32_t>& algos) : extension_buffer_with_ptrs() {
528  buffer_.NumAlg = static_cast<uint32_t>(algos.size());
529  buffer_.AlgList = new uint32_t[buffer_.NumAlg];
530 
531  std::copy(std::begin(algos), std::end(algos), this->buffer_.AlgList);
532  }
533 
536  explicit ExtVPPDoUse(const std::vector<uint32_t>& algos) : extension_buffer_with_ptrs() {
537  buffer_.NumAlg = static_cast<uint32_t>(algos.size());
538  buffer_.AlgList = new uint32_t[buffer_.NumAlg];
539 
540  std::copy(std::begin(algos), std::end(algos), this->buffer_.AlgList);
541  }
542 
545  explicit ExtVPPDoUse(const ExtVPPDoUse& other) {
546  this->buffer_.NumAlg = other.buffer_.NumAlg;
547  this->buffer_.AlgList = new uint32_t[other.buffer_.NumAlg];
548 
549  std::copy(other.buffer_.AlgList,
550  other.buffer_.AlgList + other.buffer_.NumAlg,
551  this->buffer_.AlgList);
552  }
553 
556  delete[] buffer_.AlgList;
557  buffer_.NumAlg = 0;
558  }
559 
563  virtual ExtVPPDoUse& operator=(const ExtVPPDoUse& other) {
564  if (&other == this)
565  return *this;
566 
567  if (this->buffer_.AlgList)
568  delete[] this->buffer_.AlgList;
569 
570  this->buffer_.NumAlg = other.buffer_.NumAlg;
571  this->buffer_.AlgList = new uint32_t[other.buffer_.NumAlg];
572 
573  std::copy(other.buffer_.AlgList,
574  other.buffer_.AlgList + other.buffer_.NumAlg,
575  this->buffer_.AlgList);
576  return *this;
577  }
578 };
579 
581 class ExtCodingOptionSPSPPS : public extension_buffer_with_ptrs<mfxExtCodingOptionSPSPPS,
582  MFX_EXTBUFF_CODING_OPTION_SPSPPS> {
583 public:
587  ExtCodingOptionSPSPPS(const std::vector<uint8_t>& SPS, const std::vector<uint8_t>& PPS)
589  // make a copy for now. Behaviour TBD later.
590  if (SPS.size()) {
591  buffer_.SPSBufSize = (uint16_t)SPS.size();
592  buffer_.SPSBuffer = new uint8_t[buffer_.SPSBufSize];
593  std::copy(SPS.begin(), SPS.end(), buffer_.SPSBuffer);
594  }
595  else {
596  buffer_.SPSBufSize = 0;
597  buffer_.SPSBuffer = NULL;
598  }
599 
600  if (PPS.size()) {
601  buffer_.PPSBufSize = (uint16_t)PPS.size();
602  buffer_.PPSBuffer = new uint8_t[buffer_.PPSBufSize];
603  std::copy(PPS.begin(), PPS.end(), buffer_.PPSBuffer);
604  }
605  else {
606  buffer_.PPSBufSize = 0;
607  buffer_.PPSBuffer = NULL;
608  }
609  }
610 
614  if (other.buffer_.SPSBufSize) {
615  this->buffer_.SPSBufSize = other.buffer_.SPSBufSize;
616  this->buffer_.SPSBuffer = new uint8_t[buffer_.SPSBufSize];
617  std::copy(other.buffer_.SPSBuffer,
618  other.buffer_.SPSBuffer + other.buffer_.SPSBufSize,
619  this->buffer_.SPSBuffer);
620  }
621 
622  if (other.buffer_.PPSBufSize) {
623  this->buffer_.PPSBufSize = other.buffer_.PPSBufSize;
624  this->buffer_.PPSBuffer = new uint8_t[buffer_.PPSBufSize];
625  std::copy(other.buffer_.PPSBuffer,
626  other.buffer_.PPSBuffer + other.buffer_.PPSBufSize,
627  this->buffer_.PPSBuffer);
628  }
629 
630  this->buffer_.SPSId = other.buffer_.SPSId;
631  this->buffer_.PPSId = other.buffer_.PPSId;
632  }
633 
636  delete[] buffer_.SPSBuffer;
637  buffer_.SPSBufSize = 0;
638  delete[] buffer_.PPSBuffer;
639  buffer_.PPSBufSize = 0;
640  }
641 
646  if (&other == this)
647  return *this;
648 
649  if (this->buffer_.SPSBuffer)
650  delete[] this->buffer_.SPSBuffer;
651  if (this->buffer_.PPSBuffer)
652  delete[] this->buffer_.PPSBuffer;
653 
654  if (other.buffer_.SPSBufSize) {
655  this->buffer_.SPSBufSize = other.buffer_.SPSBufSize;
656  this->buffer_.SPSBuffer = new uint8_t[buffer_.SPSBufSize];
657  std::copy(other.buffer_.SPSBuffer,
658  other.buffer_.SPSBuffer + other.buffer_.SPSBufSize,
659  this->buffer_.SPSBuffer);
660  }
661  else {
662  buffer_.SPSBufSize = 0;
663  buffer_.SPSBuffer = NULL;
664  }
665 
666  if (other.buffer_.PPSBufSize) {
667  this->buffer_.PPSBufSize = other.buffer_.PPSBufSize;
668  this->buffer_.PPSBuffer = new uint8_t[buffer_.PPSBufSize];
669  std::copy(other.buffer_.PPSBuffer,
670  other.buffer_.PPSBuffer + other.buffer_.PPSBufSize,
671  this->buffer_.PPSBuffer);
672  }
673  else {
674  buffer_.PPSBufSize = 0;
675  buffer_.PPSBuffer = NULL;
676  }
677 
678  this->buffer_.SPSId = other.buffer_.SPSId;
679  this->buffer_.PPSId = other.buffer_.PPSId;
680 
681  return *this;
682  }
683  SCALAR_SETTER(uint16_t, SPSId)
684  SCALAR_SETTER(uint16_t, PPSId)
685 };
686 
688 class ExtMBQP : public extension_buffer_with_ptrs<mfxExtMBQP, MFX_EXTBUFF_MBQP> {
689 public:
692  explicit ExtMBQP(const std::vector<uint8_t>& Qp) : extension_buffer_with_ptrs() {
693  // make a copy for now. Behaviour TBD later.
694  buffer_.Mode = MFX_MBQP_MODE_QP_VALUE;
695  if (Qp.size()) {
696  buffer_.NumQPAlloc = static_cast<uint32_t>(Qp.size());
697  buffer_.QP = new uint8_t[buffer_.NumQPAlloc];
698  std::copy(Qp.begin(), Qp.end(), buffer_.QP);
699  }
700  else {
701  buffer_.NumQPAlloc = 0;
702  buffer_.QP = NULL;
703  }
704  }
705 
708  explicit ExtMBQP(const std::vector<int8_t>& DeltaQP) : extension_buffer_with_ptrs() {
709  // make a copy for now. Behaviour TBD later.
710  buffer_.Mode = MFX_MBQP_MODE_QP_DELTA;
711  if (DeltaQP.size()) {
712  buffer_.NumQPAlloc = static_cast<uint32_t>(DeltaQP.size());
713  buffer_.DeltaQP = new mfxI8[buffer_.NumQPAlloc];
714  std::copy(DeltaQP.begin(), DeltaQP.end(), buffer_.DeltaQP);
715  }
716  else {
717  buffer_.NumQPAlloc = 0;
718  buffer_.DeltaQP = NULL;
719  }
720  }
721 
724  explicit ExtMBQP(const std::vector<mfxQPandMode>& QPmode) : extension_buffer_with_ptrs() {
725  // make a copy for now. Behaviour TBD later.
726  buffer_.Mode = MFX_MBQP_MODE_QP_ADAPTIVE;
727  if (QPmode.size()) {
728  buffer_.NumQPAlloc = static_cast<uint32_t>(QPmode.size());
729  buffer_.QPmode = new mfxQPandMode[buffer_.NumQPAlloc];
730  std::copy(QPmode.begin(), QPmode.end(), buffer_.QPmode);
731  }
732  else {
733  buffer_.NumQPAlloc = 0;
734  buffer_.QPmode = NULL;
735  }
736  }
737 
740  explicit ExtMBQP(const ExtMBQP& other) {
741  buffer_.Mode = other.buffer_.Mode;
742 
743  if (other.buffer_.NumQPAlloc) {
744  this->buffer_.NumQPAlloc = other.buffer_.NumQPAlloc;
745  if (buffer_.Mode == MFX_MBQP_MODE_QP_VALUE) {
746  this->buffer_.QP = new uint8_t[buffer_.NumQPAlloc];
747  std::copy(other.buffer_.QP,
748  other.buffer_.QP + other.buffer_.NumQPAlloc,
749  this->buffer_.QP);
750  }
751  else if (buffer_.Mode == MFX_MBQP_MODE_QP_DELTA) {
752  this->buffer_.DeltaQP = new mfxI8[buffer_.NumQPAlloc];
753  std::copy(other.buffer_.DeltaQP,
754  other.buffer_.DeltaQP + other.buffer_.NumQPAlloc,
755  this->buffer_.DeltaQP);
756  }
757  else if (buffer_.Mode == MFX_MBQP_MODE_QP_ADAPTIVE) {
758  this->buffer_.QPmode = new mfxQPandMode[buffer_.NumQPAlloc];
759  std::copy(other.buffer_.QPmode,
760  other.buffer_.QPmode + other.buffer_.NumQPAlloc,
761  this->buffer_.QPmode);
762  }
763  else {
764  this->buffer_.QPmode = NULL;
765  }
766  }
767 
768  this->buffer_.BlockSize = other.buffer_.BlockSize;
769  }
770 
773  if (this->buffer_.Mode == MFX_MBQP_MODE_QP_VALUE)
774  delete[] this->buffer_.QP;
775  if (this->buffer_.Mode == MFX_MBQP_MODE_QP_DELTA)
776  delete[] this->buffer_.DeltaQP;
777  if (this->buffer_.Mode == MFX_MBQP_MODE_QP_ADAPTIVE)
778  delete[] this->buffer_.QPmode;
779  buffer_.NumQPAlloc = 0;
780  }
781 
785  virtual ExtMBQP& operator=(const ExtMBQP& other) {
786  if (&other == this)
787  return *this;
788 
789  if (this->buffer_.NumQPAlloc) {
790  if (this->buffer_.Mode == MFX_MBQP_MODE_QP_VALUE)
791  delete[] this->buffer_.QP;
792  if (this->buffer_.Mode == MFX_MBQP_MODE_QP_DELTA)
793  delete[] this->buffer_.DeltaQP;
794  if (this->buffer_.Mode == MFX_MBQP_MODE_QP_ADAPTIVE)
795  delete[] this->buffer_.QPmode;
796  }
797 
798  buffer_.Mode = other.buffer_.Mode;
799 
800  if (other.buffer_.NumQPAlloc) {
801  this->buffer_.NumQPAlloc = other.buffer_.NumQPAlloc;
802  if (buffer_.Mode == MFX_MBQP_MODE_QP_VALUE) {
803  this->buffer_.QP = new uint8_t[buffer_.NumQPAlloc];
804  std::copy(other.buffer_.QP,
805  other.buffer_.QP + other.buffer_.NumQPAlloc,
806  this->buffer_.QP);
807  }
808  else if (buffer_.Mode == MFX_MBQP_MODE_QP_DELTA) {
809  this->buffer_.DeltaQP = new mfxI8[buffer_.NumQPAlloc];
810  std::copy(other.buffer_.DeltaQP,
811  other.buffer_.DeltaQP + other.buffer_.NumQPAlloc,
812  this->buffer_.DeltaQP);
813  }
814  else if (buffer_.Mode == MFX_MBQP_MODE_QP_ADAPTIVE) {
815  this->buffer_.QPmode = new mfxQPandMode[buffer_.NumQPAlloc];
816  std::copy(other.buffer_.QPmode,
817  other.buffer_.QPmode + other.buffer_.NumQPAlloc,
818  this->buffer_.QPmode);
819  }
820  else {
821  this->buffer_.QPmode = NULL;
822  }
823  }
824 
825  this->buffer_.BlockSize = other.buffer_.BlockSize;
826 
827  return *this;
828  }
829  SCALAR_SETTER(uint16_t, BlockSize)
830 };
831 
833 class ExtDeviceAffinityMask : public extension_buffer_with_ptrs<mfxExtDeviceAffinityMask,
834  MFX_EXTBUFF_DEVICE_AFFINITY_MASK> {
835 public:
840  ExtDeviceAffinityMask(const std::string deviceID,
841  uint32_t numSubDevices,
842  const std::vector<uint8_t>& mask)
844  mask_len_(0) {
845  mask_len_ = buffer_.NumSubDevices = numSubDevices;
846  buffer_.Mask = new uint8_t[mask.size()];
847 
848  std::copy(mask.begin(), mask.end(), this->buffer_.Mask);
849  std::copy_n(std::begin(deviceID),
850  (std::min)(deviceID.size(), (size_t)MFX_STRFIELD_LEN),
851  this->buffer_.DeviceID);
852  }
853 
857  this->mask_len_ = other.mask_len_;
858  this->buffer_.NumSubDevices = other.buffer_.NumSubDevices;
859  buffer_.Mask = new uint8_t[mask_len_];
860 
861  std::copy(other.buffer_.Mask, other.buffer_.Mask + this->mask_len_, this->buffer_.Mask);
862  std::copy_n(std::begin(other.buffer_.DeviceID), MFX_STRFIELD_LEN, this->buffer_.DeviceID);
863  }
864 
867  delete[] buffer_.Mask;
868  buffer_.NumSubDevices = 0;
869  mask_len_ = 0;
870  buffer_.DeviceID[0] = '\0';
871  }
872 
877  if (&other == this)
878  return *this;
879 
880  if (this->buffer_.Mask)
881  delete[] this->buffer_.Mask;
882 
883  this->mask_len_ = other.mask_len_;
884  this->buffer_.NumSubDevices = other.buffer_.NumSubDevices;
885  this->buffer_.Mask = new uint8_t[this->mask_len_];
886 
887  std::copy(other.buffer_.Mask, other.buffer_.Mask + this->mask_len_, this->buffer_.Mask);
888  std::copy_n(std::begin(other.buffer_.DeviceID), MFX_STRFIELD_LEN, this->buffer_.DeviceID);
889  return *this;
890  }
891 
892 protected:
894  uint32_t mask_len_;
895 };
896 
898 class EncodeCtrl : public extension_buffer_with_ptrs<mfxEncodeCtrl, 0> {
899 public:
902  explicit EncodeCtrl(const std::vector<payload> &userPayload)
904  payload_(userPayload) {
905  set_payload();
906  }
907 
911  explicit EncodeCtrl(frame_type frameType, std::vector<payload> userPayload = {})
913  payload_(userPayload) {
914  this->buffer_.FrameType = (uint16_t)frameType;
915  set_payload();
916  }
917 
923  explicit EncodeCtrl(frame_type frameType,
924  uint16_t SkipFrame,
925  uint16_t QP,
926  std::vector<payload> userPayload = {})
928  payload_(userPayload) {
929  this->buffer_.FrameType = (uint16_t)frameType;
930  this->buffer_.SkipFrame = SkipFrame;
931  this->buffer_.QP = QP;
932  set_payload();
933  }
934 
941  explicit EncodeCtrl(uint16_t MfxNalUnitType,
942  frame_type frameType,
943  uint16_t SkipFrame,
944  uint16_t QP,
945  std::vector<payload> payload = {})
947  payload_(payload) {
948  this->buffer_.MfxNalUnitType = MfxNalUnitType;
949  this->buffer_.FrameType = (uint16_t)frameType;
950  this->buffer_.SkipFrame = SkipFrame;
951  this->buffer_.QP = QP;
952  set_payload();
953  }
954 
957  EncodeCtrl(const EncodeCtrl& other) {
958  this->buffer_.MfxNalUnitType = other.buffer_.MfxNalUnitType;
959  this->buffer_.FrameType = other.buffer_.FrameType;
960  this->buffer_.SkipFrame = other.buffer_.SkipFrame;
961  this->buffer_.QP = other.buffer_.QP;
962  this->payload_ = other.payload_;
963 
964  set_payload();
965  }
966 
969  delete[] buffer_.Payload;
970  buffer_.Payload = 0;
971  }
972 
976  virtual EncodeCtrl& operator=(const EncodeCtrl& other) {
977  if (&other == this)
978  return *this;
979 
980  if (this->buffer_.Payload)
981  delete[] this->buffer_.Payload;
982 
983  this->buffer_.MfxNalUnitType = other.buffer_.MfxNalUnitType;
984  this->buffer_.FrameType = other.buffer_.FrameType;
985  this->buffer_.SkipFrame = other.buffer_.SkipFrame;
986  this->buffer_.QP = other.buffer_.QP;
987  this->payload_ = other.payload_;
988 
989  set_payload();
990  return *this;
991  }
992 
993 protected:
995  void set_payload() {
996  this->buffer_.NumPayload = static_cast<uint16_t>(payload_.size());
997  if (this->buffer_.NumPayload) {
998  int i = 0;
999  this->buffer_.Payload = new mfxPayload*[this->buffer_.NumPayload];
1000  for (auto& p : payload_) {
1001  this->buffer_.Payload[i] = p.get_raw_ptr();
1002  i++;
1003  }
1004  }
1005  }
1006  std::vector<payload> payload_;
1007 };
1008 
1009 } // namespace vpl
1010 } // namespace oneapi
Definition: mfxstructures.h:3684
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:281
Definition: mfxstructures.h:4035
ExtMBQP(const std::vector< int8_t > &DeltaQP)
Constructs object with array of QP deltas.
Definition: extension_buffer.hpp:708
Definition: mfxstructures.h:3714
mfxU8 * PPSBuffer
Definition: mfxstructures.h:2552
Definition: mfxstructures.h:3300
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:228
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:207
~ExtCodingOptionSPSPPS()
Dtor.
Definition: extension_buffer.hpp:635
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:236
Manages SPS and PPS buffers.
Definition: extension_buffer.hpp:581
Definition: mfxstructures.h:3846
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:249
mfxU32 * AlgList
Definition: mfxstructures.h:2083
Represents user&#39;s payload data. For encoding, these payloads can be inserted into the bitstream...
Definition: payload.hpp:23
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:396
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:270
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:193
ExtMBQP(const std::vector< uint8_t > &Qp)
Constructs object with QP array.
Definition: extension_buffer.hpp:692
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:457
uint32_t get_size() const
Returns size of the extension buffer in bytes.
Definition: extension_buffer.hpp:102
EncodeCtrl(uint16_t MfxNalUnitType, frame_type frameType, uint16_t SkipFrame, uint16_t QP, std::vector< payload > payload={})
Constructs object with the user payload.
Definition: extension_buffer.hpp:941
Definition: mfxstructures.h:3657
Definition: mfxstructures.h:4059
Manages Encode controller.
Definition: extension_buffer.hpp:898
mfxU16 PPSId
Definition: mfxstructures.h:2557
extension_buffer_base & operator=(const extension_buffer_base &other)=default
Default copy operator.
virtual mfxExtBuffer * get_ptr()=0
Interface to retieve raw pointer to the C header of C sructure.
Manages VPP algorithms exclude list.
Definition: extension_buffer.hpp:523
Utilitary intermediate class to keep extension buffers with pointers. For such classes copy ctor and ...
Definition: extension_buffer.hpp:154
Definition: mfxstructures.h:2871
Utilitary intermediate class to keep extension buffers without pointers. For such classes default cop...
Definition: extension_buffer.hpp:134
ExtMBQP(const ExtMBQP &other)
Copy ctor.
Definition: extension_buffer.hpp:740
Definition: mfxstructures.h:2289
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:210
T buffer_
Underlying C structure.
Definition: extension_buffer.hpp:126
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:190
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:231
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:239
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:213
virtual ExtVPPDoUse & operator=(const ExtVPPDoUse &other)
Copy operator.
Definition: extension_buffer.hpp:563
mfxU16 SPSId
Definition: mfxstructures.h:2556
Definition: mfxstructures.h:3865
mfxExtBuffer * get_ptr()
Returns raw pointer to underlying C structure with the extension buffer.
Definition: extension_buffer.hpp:120
void set_payload()
Set payload.
Definition: extension_buffer.hpp:995
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:222
Definition: mfxstructures.h:2925
extension_buffer_with_ptrs()
Default ctor.
Definition: extension_buffer.hpp:157
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:219
ExtDecodedFrameInfo()
Default ctor.
Definition: extension_buffer.hpp:259
represents class to manage VPP algorithms exclude list
Definition: extension_buffer.hpp:464
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:234
ExtVPPDoUse(const std::initializer_list< uint32_t > &algos)
Constructs object with the list of VPP algorithms to include into the processing. ...
Definition: extension_buffer.hpp:527
virtual T & get_ref()
Prohibited method for structure with pointers.
Definition: extension_buffer.hpp:171
ExtVPPDoNotUse(const std::initializer_list< uint32_t > &algos)
Constructs object with the list of VPP algorithms to exclude from the processing. ...
Definition: extension_buffer.hpp:469
Definition: mfxstructures.h:3636
~ExtDeviceAffinityMask()
Dtor.
Definition: extension_buffer.hpp:866
EncodeCtrl(const EncodeCtrl &other)
Copy ctor.
Definition: extension_buffer.hpp:957
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:276
mfxU32 NumAlg
Definition: mfxstructures.h:2082
Definition: mfxstructures.h:3421
extension_buffer_trival()
Default ctor.
Definition: extension_buffer.hpp:137
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:427
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:435
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:411
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:242
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:278
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:275
ExtVPPDoNotUse(const std::vector< uint32_t > &algos)
Constructs object with the list of VPP algorithms to exclude from the processing. ...
Definition: extension_buffer.hpp:478
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:225
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:285
extension_buffer_base()
Default ctor.
Definition: extension_buffer.hpp:28
Interface definition for extension buffers. Extension buffers are used to provide additional data for...
Definition: extension_buffer.hpp:25
Definition: mfxstructures.h:4104
Definition: mfxstructures.h:2651
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:419
Definition: mfxstructures.h:4163
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:186
virtual EncodeCtrl & operator=(const EncodeCtrl &other)
Copy operator.
Definition: extension_buffer.hpp:976
Definition: mfxstructures.h:2789
virtual T & get_ref()
Returns reference to underlying C structure with the extension buffer.
Definition: extension_buffer.hpp:108
ExtDeviceAffinityMask(const ExtDeviceAffinityMask &other)
Copy ctor.
Definition: extension_buffer.hpp:856
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:204
mfxU16 PPSBufSize
Definition: mfxstructures.h:2555
virtual ExtDeviceAffinityMask & operator=(const ExtDeviceAffinityMask &other)
Copy operator.
Definition: extension_buffer.hpp:876
Manages DeviceAffinityMask.
Definition: extension_buffer.hpp:833
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:290
EncodeCtrl(const std::vector< payload > &userPayload)
Constructs object with the user payload.
Definition: extension_buffer.hpp:902
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:245
Utilitary meta class to verify that T type is real C type of extension buffers.
Definition: extension_buffer.hpp:59
Definition: mfxstructures.h:3240
~ExtVPPDoUse()
Dtor.
Definition: extension_buffer.hpp:555
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:189
~ExtVPPDoNotUse()
Dtor.
Definition: extension_buffer.hpp:497
Definition: mfxstructures.h:2599
ExtDeviceAffinityMask(const std::string deviceID, uint32_t numSubDevices, const std::vector< uint8_t > &mask)
Constructs object with the list of VPP algorithms to inlclude into the processing.
Definition: extension_buffer.hpp:840
Definition: mfxstructures.h:3575
virtual ExtCodingOptionSPSPPS & operator=(const ExtCodingOptionSPSPPS &other)
Copy operator.
Definition: extension_buffer.hpp:645
~ExtMBQP()
Dtor.
Definition: extension_buffer.hpp:772
Definition: mfxstructures.h:2092
virtual ~extension_buffer_base()
Dtor.
Definition: extension_buffer.hpp:40
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:252
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:247
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:274
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:273
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:255
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:387
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:184
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:216
uint32_t mask_len_
Data buffer length in bytes.
Definition: extension_buffer.hpp:894
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:288
Definition: bitstream.hpp:21
Definition: mfxstructures.h:3476
Definition: mfxstructures.h:2815
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:277
virtual ExtVPPDoNotUse & operator=(const ExtVPPDoNotUse &other)
Copy operator.
Definition: extension_buffer.hpp:505
ExtVPPDoUse(const ExtVPPDoUse &other)
Copy ctor.
Definition: extension_buffer.hpp:545
Definition: mfxstructures.h:3339
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:282
extension_buffer()
Default ctor.
Definition: extension_buffer.hpp:78
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:248
ExtMBQP(const std::vector< mfxQPandMode > &QPmode)
Constructs object with QP mode values: QP or Delta QP.
Definition: extension_buffer.hpp:724
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:293
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:446
Manages per macro-block QP use strategies.
Definition: extension_buffer.hpp:688
virtual ExtMBQP & operator=(const ExtMBQP &other)
Copy operator.
Definition: extension_buffer.hpp:785
~EncodeCtrl()
Dtor.
Definition: extension_buffer.hpp:968
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:266
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:289
mfxU16 SPSBufSize
Definition: mfxstructures.h:2554
Definition: mfxstructures.h:2990
ExtVPPDoNotUse(const ExtVPPDoNotUse &other)
Copy ctor.
Definition: extension_buffer.hpp:487
uint32_t get_ID() const
Returns ID of the extension buffer in a form of FourCC code.
Definition: extension_buffer.hpp:96
virtual uint32_t get_ID() const =0
Interface to retieve extension buffer ID in a form of FourCC code.
Definition: mfxstructures.h:2360
ExtCodingOptionSPSPPS(const ExtCodingOptionSPSPPS &other)
Copy ctor.
Definition: extension_buffer.hpp:613
Definition: mfxstructures.h:2080
Utilitary intermediate class to typify extension buffer interface with assotiated ID and C structure...
Definition: extension_buffer.hpp:56
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:203
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:267
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:185
Definition: mfxstructures.h:2849
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:246
EncodeCtrl(frame_type frameType, std::vector< payload > userPayload={})
Constructs object with the user payload.
Definition: extension_buffer.hpp:911
EncodeCtrl(frame_type frameType, uint16_t SkipFrame, uint16_t QP, std::vector< payload > userPayload={})
Constructs object with the user payload.
Definition: extension_buffer.hpp:923
Definition: mfxstructures.h:2221
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:235
Definition: mfxstructures.h:3589
Instantiation of the extension_buffer template class for given C structure and ID.
Definition: extension_buffer.hpp:188
mfxU8 * SPSBuffer
Definition: mfxstructures.h:2550
ExtCodingOptionSPSPPS(const std::vector< uint8_t > &SPS, const std::vector< uint8_t > &PPS)
Constructs object with SPS and PPB vectors.
Definition: extension_buffer.hpp:587
ExtVPPDoUse(const std::vector< uint32_t > &algos)
Constructs object with the list of VPP algorithms to include into the processing. ...
Definition: extension_buffer.hpp:536