len = strlen (typestr);
if (typestr[0] == 'u' || typestr[0] == 'U') {
- /* Let's believe the developer and the following three letters are "int" (case insensitive) */
+ /**
+ * Let's believe the developer and the following three letters are "int"
+ * (case insensitive)
+ */
if (len == 6) { /* uint16, uint32 */
if (typestr[4] == '1' && typestr[5] == '6')
return _NNS_UINT16;
return _NNS_UINT8;
}
} else if (typestr[0] == 'i' || typestr[0] == 'I') {
- /* Let's believe the developer and the following two letters are "nt" (case insensitive) */
+ /**
+ * Let's believe the developer and the following two letters are "nt"
+ * (case insensitive)
+ */
if (len == 5) { /* int16, int32 */
if (typestr[3] == '1' && typestr[4] == '6')
return _NNS_INT16;
PROP_FORCE_MEMCPY,
};
-/* the capabilities of the inputs
+/**
+ * the capabilities of the inputs
*
* In v0.0.1, this is "bitmap" image stream
*/
return FALSE;
}
- /* Emit Warning if RSTRIDE = RU4 (3BPP) && Width % 4 > 0 */
- /** @todo: Add more conditions! */
+ /**
+ * Emit Warning if RSTRIDE = RU4 (3BPP) && Width % 4 > 0
+ * @todo: Add more conditions!
+ */
if (remove_stride_padding_per_row (format, dimension[1])) {
filter->removePadding = TRUE;
}
static gboolean
tensor_converter_init (GstPlugin * tensor_converter)
{
- /* debug category for fltering log messages
+ /**
+ * debug category for fltering log messages
*
* exchange the string 'Template tensor_converter' with your description
*/
#define PACKAGE "tensor_converter"
#endif
-/* gstreamer looks for this structure to register tensor_converters
+/**
+ * gstreamer looks for this structure to register tensor_converters
*
* exchange the string 'Template tensor_converter' with your tensor_converter description
*/
if (direction == GST_PAD_SINK) {
GstStructure *structure;
gchar *str;
- /* Skip verifying if caps is compatible: let's assume sink_factory will do that. */
- /** @todo: Verify if this assumption is correct */
-
- /** @todo CRITICAL: Handle when caps is in range, not fixed */
+ /**
+ * Skip verifying if caps is compatible: let's assume sink_factory will do that.
+ * @todo: Verify if this assumption is correct
+ * @todo CRITICAL: Handle when caps is in range, not fixed
+ */
/* Construct bogusFilter from caps (sinkpad) */
ret = gst_tensor_converter_configure_tensor (caps, &bogusFilter);
tmp = gst_caps_from_string (str2);
debug_print (!obj->silent, "Structure from caps to = %s\n", str2);
- /* If given caps are in range for width/height,
- we cannot configure tensor, however, we may return proper srcpad caps */
- /** @todo: see if the error is from ranging width/height before entering here */
+ /**
+ * If given caps are in range for width/height,
+ * we cannot configure tensor, however, we may return proper srcpad caps
+ * @todo: see if the error is from ranging width/height before entering here
+ */
return tmp;
}
GstStructure *structure;
gchar *str;
- /* Construct possible GstCap (sinkpad) with src_factory */
- /** @todo This supports video only! */
+ /**
+ * Construct possible GstCap (sinkpad) with src_factory
+ * @todo This supports video only!
+ */
GstStaticCaps staticcap =
GST_STATIC_CAPS
("video/x-raw, format = (string){RGB, BGRx}, views = (int)1, "
GST_DEBUG_OBJECT (trans, "converting from %" GST_PTR_FORMAT
" to %" GST_PTR_FORMAT, incaps, outcaps);
- /** @todo Supports video only */
- /* input caps */
+ /**
+ * @todo Supports video only
+ * input caps
+ */
if (!gst_video_info_from_caps (&in_info, incaps)) {
err_print ("Cannot set_caps\n");
return FALSE;
* We need both type and dimension to do this.
* This is supposed to be used by set_properties, restrting pad-caps before attaching input/output elements
*
- * @TODO Looks like this is buggy!!!
+ * @todo Looks like this is buggy!!!
*/
static GstCaps *
gst_tensor_filter_fix_caps (GstTensor_Filter * filter, gboolean isInput,
static gboolean
tensor_filter_init (GstPlugin * tensor_filter)
{
- /* debug category for fltering log messages
+ /**
+ * debug category for fltering log messages
*
* exchange the string 'Template tensor_filter' with your description
*/
GST_TYPE_TENSOR_FILTER);
}
-/* PACKAGE: this is usually set by autotools depending on some _INIT macro
+/**
+ * PACKAGE: this is usually set by autotools depending on some _INIT macro
* in configure.ac and then written into and defined in config.h, but we can
* just set it ourselves here in case someone doesn't use autotools to
* compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined.
outBufSize = tensor_element_size[filter->prop.outputType] *
get_tensor_element_count (filter->prop.outputDimension);
if (gst_buffer_get_size (outbuf) < outBufSize) {
- /* @TODO: write a routine to say aloud when this happens */
+ /** @todo: write a routine to say aloud when this happens */
gst_buffer_set_size (outbuf, outBufSize);
}
debug_print (!filter->prop.silent, "outbuf = %lu / expected = %lu\n",
gst_tensor_filter_call (filter, retoutptr, invoke_NN, inptr, NULL);
gst_buffer_unmap (inbuf, &inInfo);
- /* @TODO Performance: cache get_tensor_element_count * tensor_element_size */
+ /** @todo Performance: cache get_tensor_element_count * tensor_element_size */
mem = gst_memory_new_wrapped (0, retoutptr,
get_tensor_element_count (filter->prop.outputDimension) *
tensor_element_size[filter->prop.outputType],
}
/**
- * @TODO ARCH-Decision required; are we going to (and do we need to)
+ * @todo ARCH-Decision required; are we going to (and do we need to)
* support setOutputDimention (and get InputDim accordingly?)
*
* If not, we have done with it and emit error here if we still don't have
#define silent_debug(...) debug_print (!filter->silent, __VA_ARGS__)
-/* the capabilities of the inputs
+/**
+ * the capabilities of the inputs
*
* In v0.0.1, this is "bitmap" image stream
*/
static gboolean
tensor_transform_init (GstPlugin * tensor_transform)
{
- /* debug category for fltering log messages
+ /**
+ * debug category for fltering log messages
*
* exchange the string 'Template tensor_transform' with your description
*/
#define PACKAGE "tensor_transform"
#endif
-/* gstreamer looks for this structure to register tensor_transforms
+/**
+ * gstreamer looks for this structure to register tensor_transforms
*
* exchange the string 'Template tensor_transform' with your tensor_transform description
*/
gst_tensor_transform_dimchg (GstTensor_Transform * filter,
const uint8_t * inptr, uint8_t * outptr)
{
- /* @todo NYI */
+ /** @todo NYI */
uint32_t *fromDim = filter->fromDim;
uint32_t *toDim = filter->toDim;
int from = filter->data_dimchg.from;
if (from == to) {
- /* Useless memcpy. Do not call this or @todo do "IP" operation */
+ /** Useless memcpy. Do not call this or @todo do "IP" operation */
memcpy (outptr, inptr, get_tensor_element_count (filter->fromDim) *
tensor_element_size[filter->type]);
g_printerr
g_assert (fromDim[from] == toDim[to]);
if (from < to) {
- /* Smaller-loop-ed a to larger-loop-ed b */
- /* E.g., [N][H][W][c] (c:W:H:N) --> [N][c][H][W] (W:H:c:N) */
-
- /* @todo CRITICAL-TODO: Optimize the performance! */
+ /**
+ * Smaller-loop-ed a to larger-loop-ed b
+ * E.g., [N][H][W][c] (c:W:H:N) --> [N][c][H][W] (W:H:c:N)
+ *
+ * @todo CRITICAL-TODO: Optimize the performance!
+ */
for (i = NNS_TENSOR_RANK_LIMIT - 1; i > to; i--)
loopLimit *= toDim[i];
for (i = 0; i < to; i++)
}
}
} else {
- /* Larger-loop-ed a to smaller-loop-ed b */
- /* E.g., [N][c][H][W] (W:H:c:N) --> [N][H][W][c] (c:W:H:N) */
- /* @todo NYI */
+ /**
+ * Larger-loop-ed a to smaller-loop-ed b
+ * E.g., [N][c][H][W] (W:H:c:N) --> [N][H][W][c] (c:W:H:N)
+ * @todo NYI
+ */
g_assert (0);
}
gst_tensor_transform_transform_caps (GstBaseTransform * trans,
GstPadDirection direction, GstCaps * caps, GstCaps * filtercap)
{
- /* @todo NYI: framerate configuration! */
+ /** @todo NYI: framerate configuration! */
tensor_dim in, out;
tensor_type type;
gboolean ret;
gst_tensor_transform_fixate_caps (GstBaseTransform * trans,
GstPadDirection direction, GstCaps * caps, GstCaps * othercaps)
{
- /* @todo NYI: framerate configuration! */
+ /** @todo NYI: framerate configuration! */
GstCaps *othercaps_candidate =
gst_tensor_transform_transform_caps (trans, direction, caps, NULL);
GstCaps *filtered_candidate =
*othersize = size; /* size of input = size of output */
return TRUE;
- /* @todo add verificastion procedure */
+ /** @todo add verificastion procedure */
}
G_BEGIN_DECLS
-/* @TODO I'm not sure if the range is to be 1, 65535 or larger */
+/** @todo I'm not sure if the range is to be 1, 65535 or larger */
#define GST_TENSOR_CAP_DEFAULT \
"other/tensor, " \
"rank = (int) [ 1, 4 ], " \
"rank = (int) [ 1, 4 ], " \
"num_tensors = (int) [1, 65535], "\
"framerate = (fraction) [ 0/1, 2147483647/1 ]"
- /* type should be one of { float32, float64, int32, uint32, int16, uint16, int8, uint8 } */
- /* "types = (string) uint8, uint8, uint8" \ */
- /* Dimensions of Tensors for negotiation. It's comment out here,
- but when we call gst_structure_get_string, it actually is working well.*/
- /* "dimensions = (string) dim1:dim2:dim3:dim4, dim1:dim2:dim3:dim4" \ */
+ /**
+ * type should be one of
+ * { float32, float64, int32, uint32, int16, uint16, int8, uint8 }
+ * "types = (string) uint8, uint8, uint8"
+ * Dimensions of Tensors for negotiation. It's comment out here,
+ but when we call gst_structure_get_string, it actually is working well
+ * "dimensions = (string) dim1:dim2:dim3:dim4, dim1:dim2:dim3:dim4"
+ */
/**
* @brief Possible input stream types for other/tensor.
_TFC_FRAMERATE = 4,
- /* @TODO Add "consistency checked. don't check it again" and implement .c accordingly. */
+ /** @todo Add "consistency checked. don't check it again" and implement .c accordingly. */
} GstTensor_Filter_CheckStatus;
typedef uint32_t tensor_dim[NNS_TENSOR_RANK_LIMIT];