-@brief The structure is used to extract/insert Embedded audio to and from the HANC stream of Greed and Leon based cards.*/\r
-\r
-struct hanc_stream_info_struct\r
-{\r
- BLUE_INT32 AudioDBNArray[4]; /**< Contains the DBN values that should be used for each of the embedded audio groups*/\r
- BLUE_INT32 AudioChannelStatusBlock[4]; /**< channel status block information for each of the embedded audio group*/\r
- BLUE_UINT32 flag_valid_time_code; /**< flag which identifies the validity of the time code member in the #hanc_stream_info_struct*/\r
- BLUE_UINT64 time_code; /**< RP188 time code that was extracted from the HANC buffer or RP188 timecode which should be inserted \r
- into the HANC buffer*/\r
- BLUE_UINT32* hanc_data_ptr; /**< Hanc Buffer which should be used as the source or destination for either extraction or insertion */\r
- BLUE_UINT32 video_mode; /**< video mode which this hanc buffer which be used with. We need this information for do the required audio distribution \r
- especially NTSC */\r
- BLUE_UINT64 ltc_time_code;\r
- BLUE_UINT64 sd_vitc_time_code;\r
- BLUE_UINT64 rp188_ltc_time_code;\r
- BLUE_UINT32 pad[126];\r
-};\r
-\r
-#define AUDIO_INPUT_SOURCE_EMB 0\r
-#define AUDIO_INPUT_SOURCE_AES 1\r
-struct hanc_decode_struct\r
-{\r
- void* audio_pcm_data_ptr; // Buffer which would be used to store the extracted PCM\r
- // audio data. Must be filled in by app before calling function.\r
- BLUE_UINT32 audio_ch_required_mask; // which all audio channels should be extracted from the \r
- // audio frame .Must be filled in by app before calling function.\r
- BLUE_UINT32 type_of_sample_required;// type of destination audio channel\r
- //ie 16 bit ,24 bit or 32 bit PCM data .\r
- //Must be filled in by app before calling function.\r
- BLUE_UINT32 no_audio_samples; // this would contain how many audio samples has been decoded from\r
- // the hanc buffer.\r
- BLUE_UINT64 timecodes[7]; // Would extract the timecode information from the audio frame.\r
- void * raw_custom_anc_pkt_data_ptr; // This buffer would contain the raw ANC packets that was found in the orac hanc buffer.\r
- // this would contain any ANC packets that is not of type embedded audio and RP188 TC.\r
- //Must be filled in by app before calling function. can be NULL\r
- BLUE_UINT32 sizeof_custom_anc_pkt_data_ptr; // size of the ANC buffer array\r
- //Must be filled in by app before calling function. can be NULL\r
- BLUE_UINT32 avail_custom_anc_pkt_data_bytes;// how many custom ANC packets has been decoded into raw_hanc_pkt_data_ptr\r
- //Must be filled in by app before calling function. can be NULL\r
- BLUE_UINT32 audio_input_source; // Used to select the audio input source. \r
- // whether it is AES or Embedded.\r
- //Must be filled in by app before calling function.\r
- BLUE_UINT32 audio_temp_buffer[16]; // this is used to store split audio sample \r
- // which did not contain all its audio channels\r
- // in one audio frame\r
- //Must be initialised to zero by app before first instantiating the function. \r
- BLUE_UINT32 audio_split_buffer_mask; // The mask would be used to make a note of \r
- // split audio sample information for a frame.\r
- //Must be initialised to zero by app before first instantiating the function. \r
- BLUE_UINT32 max_expected_audio_sample_count; // specify the maximum number of audio samples \r
- // that the audio pcm buffer can contain.\r
- //Must be filled in by app before calling function.\r
- * Multiplied by qscale for each frame and added to scene_change_score.
- * - encoding: Set by user.
- * - decoding: unused
- */
- int scenechange_factor;
-
- /**
- *
- * Note: Value depends upon the compare function used for fullpel ME.
- * - encoding: Set by user.
- * - decoding: unused
- */
- int mv0_threshold;
-
- /**
- * Adjusts sensitivity of b_frame_strategy 1.
- * - encoding: Set by user.
- * - decoding: unused
- */
- int b_sensitivity;
-
- /**
- * - encoding: Set by user.
- * - decoding: unused
- */
- int compression_level;
-#define FF_COMPRESSION_DEFAULT -1
-
- /**
- * - encoding: Set by user.
- * - decoding: unused
- */
- int min_prediction_order;
-
- /**
- * - encoding: Set by user.
- * - decoding: unused
- */
- int max_prediction_order;
-
-#if FF_API_FLAC_GLOBAL_OPTS
- /**
- * @name FLAC options
- * @deprecated Use FLAC encoder private options instead.
- * @{
- */
-
- /**
- * LPC coefficient precision - used by FLAC encoder
- * - encoding: Set by user.
- * - decoding: unused
- */
- attribute_deprecated int lpc_coeff_precision;
-
- /**
- * search method for selecting prediction order
- * - encoding: Set by user.
- * - decoding: unused
- */
- attribute_deprecated int prediction_order_method;
-
- /**
- * - encoding: Set by user.
- * - decoding: unused
- */
- attribute_deprecated int min_partition_order;
-
- /**
- * - encoding: Set by user.
- * - decoding: unused
- */
- attribute_deprecated int max_partition_order;
- /**
- * @}
- */
-#endif
-
- /**
- * GOP timecode frame start number
- * - encoding: Set by user, in non drop frame format
- * - decoding: Set by libavcodec (timecode in the 25 bits format, -1 if unset)
- */
- int64_t timecode_frame_start;
-
-#if FF_API_REQUEST_CHANNELS
- /**
- * Decoder should decode to this many channels if it can (0 for default)
- * - encoding: unused
- * - decoding: Set by user.
- * @deprecated Deprecated in favor of request_channel_layout.
- */
- int request_channels;
-#endif
-
-#if FF_API_DRC_SCALE
- /**
- * Percentage of dynamic range compression to be applied by the decoder.
- * The default value is 1.0, corresponding to full compression.
- * - encoding: unused
- * - decoding: Set by user.
- * @deprecated use AC3 decoder private option instead.
- */
- attribute_deprecated float drc_scale;
-#endif
-
- /**
- * opaque 64bit number (generally a PTS) that will be reordered and
- * output in AVFrame.reordered_opaque
- * @deprecated in favor of pkt_pts
- * - encoding: unused
- * - decoding: Set by user.
- */
- int64_t reordered_opaque;
-
- /**
- * Bits per sample/pixel of internal libavcodec pixel/sample format.
- * - encoding: set by user.
- * - decoding: set by libavcodec.
- */
- int bits_per_raw_sample;
-
- /**
- * Audio channel layout.
- * - encoding: set by user.
- * - decoding: set by user, may be overwritten by libavcodec.
- */
- uint64_t channel_layout;
-
- /**
- * Request decoder to use this channel layout if it can (0 for default)
- * - encoding: unused
- * - decoding: Set by user.
- */
- uint64_t request_channel_layout;
-
- /**
- * Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow.
- * - encoding: Set by user.
- * - decoding: unused.
- */
- float rc_max_available_vbv_use;
-
- /**
- * Ratecontrol attempt to use, at least, <value> times the amount needed to prevent a vbv overflow.
- * - encoding: Set by user.
- * - decoding: unused.
- */
- float rc_min_vbv_overflow_use;
-
- /**
- * Hardware accelerator in use
- * - encoding: unused.
- * - decoding: Set by libavcodec
- */
- struct AVHWAccel *hwaccel;
-
- /**
- * For some codecs, the time base is closer to the field rate than the frame rate.
- * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
- * if no telecine is used ...
- *
- * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
- */
- int ticks_per_frame;
-
- /**
- * Hardware accelerator context.
- * For some hardware accelerators, a global context needs to be
- * provided by the user. In that case, this holds display-dependent
- * data FFmpeg cannot instantiate itself. Please refer to the
- * FFmpeg HW accelerator documentation to know how to fill this
- * is. e.g. for VA API, this is a struct vaapi_context.
- * - encoding: unused
- * - decoding: Set by user
- */
- void *hwaccel_context;
-
- /**
- * Chromaticity coordinates of the source primaries.
- * - encoding: Set by user
- * - decoding: Set by libavcodec
- */
- enum AVColorPrimaries color_primaries;
-
- /**
- * Color Transfer Characteristic.
- * - encoding: Set by user
- * - decoding: Set by libavcodec
- */
- enum AVColorTransferCharacteristic color_trc;
-
- /**
- * YUV colorspace type.
- * - encoding: Set by user
- * - decoding: Set by libavcodec
- */
- enum AVColorSpace colorspace;
-
- /**
- * MPEG vs JPEG YUV range.
- * - encoding: Set by user
- * - decoding: Set by libavcodec
- */
- enum AVColorRange color_range;
-
- /**
- * This defines the location of chroma samples.
- * - encoding: Set by user
- * - decoding: Set by libavcodec
- */
- enum AVChromaLocation chroma_sample_location;
-
- /**
- * The codec may call this to execute several independent things.
- * It will return only after finishing all tasks.
- * The user may replace this with some multithreaded implementation,
- * the default implementation will execute the parts serially.
- * Also see avcodec_thread_init and e.g. the --enable-pthread configure option.
- * @param c context passed also to func
- * @param count the number of things to execute
- * @param arg2 argument passed unchanged to func
- * @param ret return values of executed functions, must have space for "count" values. May be NULL.
- * @param func function that will be called count times, with jobnr from 0 to count-1.
- * threadnr will be in the range 0 to c->thread_count-1 < MAX_THREADS and so that no
- * two instances of func executing at the same time will have the same threadnr.
- * @return always 0 currently, but code should handle a future improvement where when any call to func
- * returns < 0 no further calls to func may be done and < 0 is returned.
- * - encoding: Set by libavcodec, user can override.
- * - decoding: Set by libavcodec, user can override.
- */
- int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
-#define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input.
-#define AVFMT_FLAG_IGNDTS 0x0008 ///< Ignore DTS on frames that contain both DTS & PTS
-#define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other values, just return what is stored in the container
-#define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled
-#if FF_API_FLAG_RTP_HINT
-#define AVFMT_FLAG_RTP_HINT 0x0040 ///< Deprecated, use the -movflags rtphint muxer specific AVOption instead
-#endif
-#define AVFMT_FLAG_CUSTOM_IO 0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it.
- PIX_FMT_BGR4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
- PIX_FMT_RGB4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
- PIX_FMT_NV12, ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)
- PIX_FMT_NV21, ///< as above, but U and V bytes are swapped
- PIX_FMT_YUV440P, ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
- PIX_FMT_YUVJ440P, ///< planar YUV 4:4:0 full scale (JPEG), deprecated in favor of PIX_FMT_YUV440P and setting color_range
- PIX_FMT_YUVA420P, ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
- PIX_FMT_VDPAU_H264,///< H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- PIX_FMT_VDPAU_MPEG1,///< MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- PIX_FMT_VDPAU_MPEG2,///< MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- PIX_FMT_VDPAU_WMV3,///< WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- PIX_FMT_VDPAU_VC1, ///< VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- PIX_FMT_RGB48BE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big-endian
- PIX_FMT_RGB48LE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as little-endian
- PIX_FMT_BGR555BE, ///< packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), big-endian, most significant bit to 1
- PIX_FMT_BGR555LE, ///< packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), little-endian, most significant bit to 1
-
- PIX_FMT_VAAPI_MOCO, ///< HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_render_state struct which contains macroblocks as well as various fields extracted from headers
- PIX_FMT_VAAPI_IDCT, ///< HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state struct which contains fields extracted from headers
- PIX_FMT_VAAPI_VLD, ///< HW decoding through VA API, Picture.data[3] contains a vaapi_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
-
- PIX_FMT_YUV420P16LE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
- PIX_FMT_YUV420P16BE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
- PIX_FMT_YUV422P16LE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
- PIX_FMT_YUV422P16BE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
- PIX_FMT_YUV444P16LE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
- PIX_FMT_YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
- PIX_FMT_VDPAU_MPEG4, ///< MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- PIX_FMT_DXVA2_VLD, ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer
-
- PIX_FMT_RGB444LE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), little-endian, most significant bits to 0
- PIX_FMT_RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0
- PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
- PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1
- PIX_FMT_GRAY8A, ///< 8bit gray, 8bit alpha
- PIX_FMT_BGR48BE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian
- PIX_FMT_BGR48LE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian
-
- //the following 10 formats have the disadvantage of needing 1 format for each bit depth, thus
- //If you want to support multiple bit depths, then using PIX_FMT_YUV420P16* with the bpp stored seperately
- //is better
- PIX_FMT_YUV420P9BE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
- PIX_FMT_YUV420P9LE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
- PIX_FMT_YUV420P10BE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
- PIX_FMT_YUV420P10LE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
- PIX_FMT_YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
- PIX_FMT_YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
- PIX_FMT_YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
- PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
- PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
- PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
- PIX_FMT_YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
- PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
- PIX_FMT_VDA_VLD, ///< hardware decoding through VDA
-
-#ifdef AV_PIX_FMT_ABI_GIT_MASTER
- PIX_FMT_RGBA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian
- PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian
- PIX_FMT_BGRA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian
- PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian
-#endif
- PIX_FMT_GBRP, ///< planar GBR 4:4:4 24bpp
- PIX_FMT_GBRP9BE, ///< planar GBR 4:4:4 27bpp, big endian
- PIX_FMT_GBRP9LE, ///< planar GBR 4:4:4 27bpp, little endian
- PIX_FMT_GBRP10BE, ///< planar GBR 4:4:4 30bpp, big endian
- PIX_FMT_GBRP10LE, ///< planar GBR 4:4:4 30bpp, little endian
- PIX_FMT_GBRP16BE, ///< planar GBR 4:4:4 48bpp, big endian
- PIX_FMT_GBRP16LE, ///< planar GBR 4:4:4 48bpp, little endian
-
-#ifndef AV_PIX_FMT_ABI_GIT_MASTER
- PIX_FMT_RGBA64BE=0x123, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian
- PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian
- PIX_FMT_BGRA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian
- PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian
- PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
-typedef int ( * PFNGLXBINDVIDEOIMAGENVPROC) (Display* dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);\r
-typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display* dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);\r
-typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display* dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);\r
-typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display* dpy, int screen, GLXVideoDeviceNV VideoDevice);\r
-typedef int ( * PFNGLXRELEASEVIDEOIMAGENVPROC) (Display* dpy, GLXPbuffer pbuf);\r
-typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display* dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);\r
-typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);\r
-typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);\r
-typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);\r
-typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);\r
-typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);\r
-typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);\r
-typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);\r
-typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);\r
-typedef struct { int type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; int event_type; int draw_type; unsigned int mask; int x, y; int width, height; int count; } GLXBufferClobberEventSGIX;\r
-\r
-typedef GLXPbuffer ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display* dpy, GLXFBConfig config, unsigned int width, unsigned int height, int *attrib_list);\r
- /// Generic function to convert an UTF-32 characters range\r
- /// to an ANSI characters range, using the given locale\r
- ///\r
- /// \param Begin : Iterator pointing to the beginning of the input sequence\r
- /// \param End : Iterator pointing to the end of the input sequence\r
- /// \param Output : Iterator pointing to the beginning of the output sequence\r
- /// \param Replacement : Replacement character for characters not convertible to output encoding ('?' by default -- use 0 to use no replacement character)\r
- /// \param Locale : Locale to use for conversion (uses the current one by default)\r
- ///\r
- /// \return Iterator to the end of the output sequence which has been written\r
- /// Generic function to convert an UTF-8 characters range\r
- /// to an UTF-16 characters range, using the given locale\r
- ///\r
- /// \param Begin : Iterator pointing to the beginning of the input sequence\r
- /// \param End : Iterator pointing to the end of the input sequence\r
- /// \param Output : Iterator pointing to the beginning of the output sequence\r
- /// \param Replacement : Replacement character for characters not convertible to output encoding ('?' by default -- use 0 to use no replacement character)\r
- ///\r
- /// \return Iterator to the end of the output sequence which has been written\r
- /// Generic function to convert an UTF-8 characters range\r
- /// to an UTF-32 characters range, using the given locale\r
- ///\r
- /// \param Begin : Iterator pointing to the beginning of the input sequence\r
- /// \param End : Iterator pointing to the end of the input sequence\r
- /// \param Output : Iterator pointing to the beginning of the output sequence\r
- /// \param Replacement : Replacement character for characters not convertible to output encoding ('?' by default -- use 0 to use no replacement character)\r
- ///\r
- /// \return Iterator to the end of the output sequence which has been written\r
- /// Generic function to convert an UTF-16 characters range\r
- /// to an UTF-8 characters range, using the given locale\r
- ///\r
- /// \param Begin : Iterator pointing to the beginning of the input sequence\r
- /// \param End : Iterator pointing to the end of the input sequence\r
- /// \param Output : Iterator pointing to the beginning of the output sequence\r
- /// \param Replacement : Replacement character for characters not convertible to output encoding ('?' by default -- use 0 to use no replacement character)\r
- ///\r
- /// \return Iterator to the end of the output sequence which has been written\r
- /// Generic function to convert an UTF-16 characters range\r
- /// to an UTF-32 characters range, using the given locale\r
- ///\r
- /// \param Begin : Iterator pointing to the beginning of the input sequence\r
- /// \param End : Iterator pointing to the end of the input sequence\r
- /// \param Output : Iterator pointing to the beginning of the output sequence\r
- /// \param Replacement : Replacement character for characters not convertible to output encoding ('?' by default -- use 0 to use no replacement character)\r
- ///\r
- /// \return Iterator to the end of the output sequence which has been written\r
- /// Generic function to convert an UTF-32 characters range\r
- /// to an UTF-8 characters range, using the given locale\r
- ///\r
- /// \param Begin : Iterator pointing to the beginning of the input sequence\r
- /// \param End : Iterator pointing to the end of the input sequence\r
- /// \param Output : Iterator pointing to the beginning of the output sequence\r
- /// \param Replacement : Replacement character for characters not convertible to output encoding ('?' by default -- use 0 to use no replacement character)\r
- ///\r
- /// \return Iterator to the end of the output sequence which has been written\r
- /// Generic function to convert an UTF-32 characters range\r
- /// to an UTF-16 characters range, using the given locale\r
- ///\r
- /// \param Begin : Iterator pointing to the beginning of the input sequence\r
- /// \param End : Iterator pointing to the end of the input sequence\r
- /// \param Output : Iterator pointing to the beginning of the output sequence\r
- /// \param Replacement : Replacement character for characters not convertible to output encoding ('?' by default -- use 0 to use no replacement character)\r
- ///\r
- /// \return Iterator to the end of the output sequence which has been written\r
- Copyright 2005-2011 Intel Corporation. All Rights Reserved.
-
- This file is part of Threading Building Blocks.
-
- Threading Building Blocks is free software; you can redistribute it
- and/or modify it under the terms of the GNU General Public License
- version 2 as published by the Free Software Foundation.
-
- Threading Building Blocks is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Threading Building Blocks; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
- As a special exception, you may use this file as part of a free software
- library without restriction. Specifically, if other files instantiate
- templates or use macros or inline functions from this file, or you compile
- this file and link it with other files to produce an executable, this
- file does not by itself cause the resulting executable to be covered by
- the GNU General Public License. This exception does not however
- invalidate any other reasons why the executable file might be covered by
- the GNU General Public License.
-*/
-
-#ifndef __TBB_tuple_H
-#define __TBB_tuple_H
-
-#if !TBB_PREVIEW_TUPLE
-#error Set TBB_PREVIEW_TUPLE to include compat/tuple
-#endif
-
-#include <utility>
-#include "../tbb_stddef.h"
-
-namespace tbb {
-namespace interface5 {
-namespace internal {
-struct null_type { };
-}
-using internal::null_type;
-
-// tuple forward declaration
-template <class T0=null_type, class T1=null_type, class T2=null_type, class T3=null_type, class T4=null_type, class T5=null_type, class T6=null_type, class T7=null_type, class T8=null_type, class T9=null_type>
- "[my_begin, my_midpoint) range should not be empty" );
- }
-
- } // internal
-//! @endcond
-
-//! Unordered map from Key to T.
-/** concurrent_hash_map is associative container with concurrent access.
-
-@par Compatibility
- The class meets all Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1).
-
-@par Exception Safety
- - Hash function is not permitted to throw an exception. User-defined types Key and T are forbidden from throwing an exception in destructors.
- - If exception happens during insert() operations, it has no effect (unless exception raised by HashCompare::hash() function during grow_segment).
- - If exception happens during operator=() operation, the container can have a part of source items, and methods size() and empty() can return wrong results.
-
-@par Changes since TBB 2.1
- - Replaced internal algorithm and data structure. Patent is pending.
- - Added buckets number argument for constructor
-
-@par Changes since TBB 2.0
- - Fixed exception-safety
- - Added template argument for allocator
- - Added allocator argument in constructors
- - Added constructor from a range of iterators
- - Added several new overloaded insert() methods
- - Added get_allocator()
- - Added swap()
- - Added count()
- - Added overloaded erase(accessor &) and erase(const_accessor&)
- - Added equal_range() [const]
- - Added [const_]pointer, [const_]reference, and allocator_type types
- - Added global functions: operator==(), operator!=(), and swap()
-/** concurrent_vector is a container having the following main properties:
- - It provides random indexed access to its elements. The index of the first element is 0.
- - It ensures safe concurrent growing its size (different threads can safely append new elements).
- - Adding new elements does not invalidate existing iterators and does not change indices of existing items.
-
-@par Compatibility
- The class meets all Container Requirements and Reversible Container Requirements from
- C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1). But it doesn't meet
- Sequence Requirements due to absence of insert() and erase() methods.
-
-@par Exception Safety
- Methods working with memory allocation and/or new elements construction can throw an
- exception if allocator fails to allocate memory or element's default constructor throws one.
- Concurrent vector's element of type T must conform to the following requirements:
- - Throwing an exception is forbidden for destructor of T.
- - Default constructor of T must not throw an exception OR its non-virtual destructor must safely work when its object memory is zero-initialized.
- .
- Otherwise, the program's behavior is undefined.
-@par
- If an exception happens inside growth or assignment operation, an instance of the vector becomes invalid unless it is stated otherwise in the method documentation.
- Invalid state means:
- - There are no guaranties that all items were initialized by a constructor. The rest of items is zero-filled, including item where exception happens.
- - An invalid vector instance cannot be repaired; it is unable to grow anymore.
- - Size and capacity reported by the vector are incorrect, and calculated as if the failed operation were successful.
- - Attempt to access not allocated elements using operator[] or iterators results in access violation or segmentation fault exception, and in case of using at() method a C++ exception is thrown.
- .
- If a concurrent grow operation successfully completes, all the elements it has added to the vector will remain valid and accessible even if one of subsequent grow operations fails.
-
-@par Fragmentation
- Unlike an STL vector, a concurrent_vector does not move existing elements if it needs
- to allocate more memory. The container is divided into a series of contiguous arrays of
- elements. The first reservation, growth, or assignment operation determines the size of
- the first array. Using small number of elements as initial size incurs fragmentation that
- may increase element access time. Internal layout can be optimized by method compact() that
- merges several smaller arrays into one solid.
-
-@par Changes since TBB 2.1
- - Fixed guarantees of concurrent_vector::size() and grow_to_at_least() methods to assure elements are allocated.
- - Methods end()/rbegin()/back() are partly thread-safe since they use size() to get the end of vector
- - Added resize() methods (not thread-safe)
- - Added cbegin/cend/crbegin/crend methods
- - Changed return type of methods grow* and push_back to iterator
-
-@par Changes since TBB 2.0
- - Implemented exception-safety guaranties
- - Added template argument for allocator
- - Added allocator argument in constructors
- - Faster index calculation
- - First growth call specifies a number of segments to be merged in the first allocation.
- - Fixed memory blow up for swarm of vector's instances of small size
- - Added grow_by(size_type n, const_reference t) growth using copying constructor to init new items.
- - Added STL-like constructors.
- - Added operators ==, < and derivatives
- - Added at() method, approved for using after an exception was thrown inside the vector
- - Added get_allocator() method.
- - Added assign() methods
- - Added compact() method to defragment first segments
- - Added swap() method
- - range() defaults on grainsize = 1 supporting auto grainsize algorithms.
-
- @ingroup containers */
-template<typename T, class A>
-class concurrent_vector: protected internal::allocator_base<T, A>,
- private internal::concurrent_vector_base {
-private:
- template<typename I>
- class generic_range_type: public blocked_range<I> {
- public:
- typedef T value_type;
- typedef T& reference;
- typedef const T& const_reference;
- typedef I iterator;
- typedef ptrdiff_t difference_type;
- generic_range_type( I begin_, I end_, size_t grainsize_ = 1) : blocked_range<I>(begin_,end_,grainsize_) {}
-class function_node<Input,Output,queueing,Allocator> : public graph_node, public internal::function_input<Input,Output,Allocator>, public internal::function_output<Output> {
- #error Current runtime does not support std::exception_ptr. Set TBB_USE_CAPTURED_EXCEPTION and make sure that your code is ready to catch tbb::captured_exception.
- #endif
-#endif /* defined TBB_USE_CAPTURED_EXCEPTION */
-
-/** Check whether the request to use GCC atomics can be satisfied **/