static int
remove_stride_padding_per_row (const gchar * format, int width)
{
- /* @TODO The actual list is much longer. fill them (read https://gstreamer.freedesktop.org/documentation/design/mediatype-video-raw.html ) */
+ /** @todo The actual list is much longer. fill them (read https://gstreamer.freedesktop.org/documentation/design/mediatype-video-raw.html ) */
if ((!g_strcmp0 (format, "RGB") || !g_strcmp0 (format, "BGR")
|| !g_strcmp0 (format, "I420")) && (width % 4))
return 1;
}
/* Emit Warning if RSTRIDE = RU4 (3BPP) && Width % 4 > 0 */
- /* @TODO: Add more conditions! */
+ /** @todo: Add more conditions! */
if (remove_stride_padding_per_row (format, dimension[1])) {
filter->removePadding = TRUE;
}
filter->tensorConfigured = TRUE;
- /* @TODO Support other types */
+ /** @todo Support other types */
filter->input_media_type = _NNS_VIDEO;
return TRUE;
}
g_assert (offset % 4);
- /* @TODO: We don't know if outbuf is already allocated at this point, yet! */
+ /** @todo: We don't know if outbuf is already allocated at this point, yet! */
g_assert (gst_buffer_get_size (outbuf) >=
(get_tensor_element_count (filter->dimension) *
tensor_element_size[filter->type]));
src_idx += offset;
}
}
- /* @TODO: Remove the clutter (reduce the size?) after memcpy. (Check if that's really helpful, first) */
+ /** @todo: Remove the clutter (reduce the size?) after memcpy. (Check if that's really helpful, first) */
gst_buffer_unmap (buf, &info);
err_print
bogusFilter.tensorConfigured = FALSE;
GstTensor_Converter *obj = GST_TENSOR_CONVERTER_CAST (trans);
- /* @TODO: Verify if direction == GST_PAD_SINK means caps is sink pad */
+ /** @todo: Verify if direction == GST_PAD_SINK means caps is sink pad */
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: Verify if this assumption is correct */
- /* @TODO CRITICAL: Handle when caps is in range, not fixed */
+ /** @todo CRITICAL: Handle when caps is in range, not fixed */
/* Construct bogusFilter from caps (sinkpad) */
ret = gst_tensor_converter_configure_tensor (caps, &bogusFilter);
/* 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 */
+ /** @todo: see if the error is from ranging width/height before entering here */
return tmp;
}
gchar *str;
/* Construct possible GstCap (sinkpad) with src_factory */
- /* @TODO This supports video only! */
+ /** @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 */
+ /** @todo Supports video only */
/* input caps */
if (!gst_video_info_from_caps (&in_info, incaps)) {
err_print ("Cannot set_caps\n");
filter->negotiated = gst_tensor_converter_configure_tensor (incaps, filter);
- /* @TODO Verity if outcaps and filter conf are compatible */
- /* @TODO THIS IS REQUIRED TO FILL IN: Return FALSE if filter is not compatible with outcaps */
+ /** @todo Verity if outcaps and filter conf are compatible */
+ /** @todo THIS IS REQUIRED TO FILL IN: Return FALSE if filter is not compatible with outcaps */
return TRUE;
}
media_type input_media_type; /**< Denotes the input media stream type */
union {
GstVideoInfo video; /**< video-info of the input media stream */
- /* @TODO: Add other media types */
+ /** @todo: Add other media types */
} in_info; /**< media input stream info union. will support audio/text later */
gboolean removePadding; /* If TRUE, zero-padding must be removed during transform */
gboolean disableInPlace; /* If TRUE, In place mode is disabled */
static int
add_stride_padding_per_row (const gchar * format, int width)
{
- /* @TODO The actual list is much longer. fill them (read https://gstreamer.freedesktop.org/documentation/design/mediatype-video-raw.html ) */
+ /** @todo The actual list is much longer. fill them (read https://gstreamer.freedesktop.org/documentation/design/mediatype-video-raw.html ) */
if ((!g_strcmp0 (format, "RGB") || !g_strcmp0 (format, "BGR")
|| !g_strcmp0 (format, "I420")) && (width % 4))
return 1;
structure = gst_caps_get_structure (caps, 0);
return_false_if_fail (gst_structure_get_int (structure, "dim1", &dim));
dimension[0] = (uint32_t) dim;
- /* @TODO Need to support orther media format (RGB, BRG, YUV,.. etc.). And should support Audio as well. */
+ /** @todo Need to support orther media format (RGB, BRG, YUV,.. etc.). And should support Audio as well. */
filter->output_media_type = _NNS_VIDEO;
if (dimension[0] == 3 || dimension[0] == 4) {
filter->format = dimension[0];
/* Emit Warning if RSTRIDE = RU4 (3BPP) && Width % 4 > 0 */
- /* @TODO: Add more conditions! */
+ /** @todo: Add more conditions! */
if (add_stride_padding_per_row (format, dimension[1])) {
g_print
(" Width(dim2) is not divisible with 4. The performance won't be good; one more memcpy is added.\n");
filter->Configured = TRUE;
- /* @TODO Need to specify of video mode */
+ /** @todo Need to specify of video mode */
filter->views = 1;
interlace = interlace_progressive;
if (!g_strcmp0 (interlace, "progressive")) {
return FALSE;
}
- /* @TODO Support other types */
+ /** @todo Support other types */
filter->output_media_type = _NNS_VIDEO;
return TRUE;
}
switch (filter->output_media_type) {
case _NNS_VIDEO:
if (filter->addPadding == TRUE) {
- /* @TODO Add Padding for x-raw */
+ /** @todo Add Padding for x-raw */
}
break;
/* NOT SUPPORTED */
g_free (str);
/* 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 */
+ /** @todo: see if the error is from ranging width/height before entering here */
return tmp;
}
debug_print (!obj->silent, "transform_caps SINK specific\n");
g_assert (bogusFilter.Configured == TRUE);
- /* @TODO Need to support other format */
+ /** @todo Need to support other format */
gchar color[1024], interlace[1024];
if (bogusFilter.format == 3)
g_sprintf (color, "%s", "RGB");
return tmp;
} else if (direction == GST_PAD_SRC) {
/* Construct possible GstCap (sinkpad) with src_factory */
- /* @TODO This supports video only! */
+ /** @todo This supports video only! */
GstStaticCaps staticcap = GST_STATIC_CAPS (GST_TENSOR_CAP_DEFAULT);
tmp = gst_static_caps_get (&staticcap);
ret = filter->prop.fw->funcname(filter, &filter->privateData, __VA_ARGS__); \
} while(0)
-/* @TODO Call this where appropriate */
+/** @todo Call this where appropriate */
#define gst_tensor_filter_close(filter) \
do { \
g_assert(filter->prop.fwClosed != TRUE); \
dimension[0], "dim2", G_TYPE_INT, dimension[1], "dim3", G_TYPE_INT,
dimension[2], "dim4", G_TYPE_INT, dimension[3], "framerate",
GST_TYPE_FRACTION, 0, 1, NULL);
- /* @TODO Framerate is not determined with the given info */
- /* @TODO: support other framerates! */
+ /** @todo Framerate is not determined with the given info */
+ /** @todo: support other framerates! */
} else if (configured == _TFC_DIMENSION) {
/* dimension is set. only the type is not configured (@TODO not sure if this is possible) */
rank = gst_tensor_filter_get_rank (dimension);
G_TYPE_INT, dimension[0], "dim2", G_TYPE_INT, dimension[1], "dim3",
G_TYPE_INT, dimension[2], "dim4", G_TYPE_INT, dimension[3], "framerate",
GST_TYPE_FRACTION, 0, 1, NULL);
- /* @TODO Framerate is not determined with the given info */
- /* @TODO: support other framerates! */
+ /** @todo Framerate is not determined with the given info */
+ /** @todo: support other framerates! */
} else if (configured == _TFC_TYPE) {
/* type is set. only the dim is not configured (@TODO not sure if this is possible) */
rank = gst_tensor_filter_get_rank (dimension);
tmp =
gst_caps_new_simple ("other/tensor", "framerate", GST_TYPE_FRACTION, 0,
1, "type", G_TYPE_STRING, tensor_element_typename[*type], NULL);
- /* @TODO Framerate is not determined with the given info */
- /* @TODO: support other framerates! */
+ /** @todo Framerate is not determined with the given info */
+ /** @todo: support other framerates! */
} else {
/* knows nothing. This happens.. */
tmp =
gst_caps_new_simple ("other/tensor", "framerate", GST_TYPE_FRACTION, 0,
1, NULL);
- /* @TODO Framerate is not determined with the given info */
- /* @TODO: support other framerates! */
+ /** @todo Framerate is not determined with the given info */
+ /** @todo: support other framerates! */
}
if (fromCaps) {
}
}
- /* @TODO 5. Verify with get_input/output_dimension callbacks! */
+ /** @todo 5. Verify with get_input/output_dimension callbacks! */
return resultCaps;
}
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",
static GstFlowReturn
gst_tensor_filter_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
{
- /* @TODO 0. Check all properties and inbuf size. */
- /* @TODO 0-1. This shouldn't reach here if in-place mode if OFF with the subplugin */
- /* @TODO 0-1. , which could be done at *_caps with gst_base_transform_set_in_place() */
- /* @TODO 1. Resize buf if output is larger than input */
- /* @TODO 2. Call the filter-subplugin callback, "invoke" */
- /* @TODO 3. Return result! */
+ /** @todo 0. Check all properties and inbuf size. */
+ /** @todo 0-1. This shouldn't reach here if in-place mode if OFF with the subplugin */
+ /** @todo 0-1. , which could be done at *_caps with gst_base_transform_set_in_place() */
+ /** @todo 1. Resize buf if output is larger than input */
+ /** @todo 2. Call the filter-subplugin callback, "invoke" */
+ /** @todo 3. Return result! */
g_assert (1 == 0);
return GST_FLOW_ERROR;
}
/* caps: sink pad. get src pad info */
obj->prop.outputCapNegotiated = TRUE;
- /* @TODO 1. Check caps w/ getInputDimension && saved input dimension */
- /* @TODO 2. Check returning-caps w/ getOutputDimension && saved output dimension */
+ /** @todo 1. Check caps w/ getInputDimension && saved input dimension */
+ /** @todo 2. Check returning-caps w/ getOutputDimension && saved output dimension */
return gst_tensor_filter_fix_caps (obj, TRUE, caps);
} else {
/* caps: src pad. get sink pad info */
obj->prop.inputCapNegotiated = TRUE;
- /* @TODO 1. Check caps w/ getOutputDimension && saved output dimension */
- /* @TODO 2. Check returning-caps w/ getInputDimension && saved input dimension */
+ /** @todo 1. Check caps w/ getOutputDimension && saved output dimension */
+ /** @todo 2. Check returning-caps w/ getInputDimension && saved input dimension */
return gst_tensor_filter_fix_caps (obj, FALSE, caps);
}
g_assert (check >= 0);
result = gst_tensor_filter_generate_dim_from_cap (incaps, dim, &type);
- /* @TODO Configure filter-dim from caps if filter-dim is not configured, yet */
+ /** @todo Configure filter-dim from caps if filter-dim is not configured, yet */
if ((filter->prop.inputConfigured & _TFC_ALL) != _TFC_ALL) {
/* we may set if result == TRUE */
g_assert (FALSE); /* NYI */
g_assert (result == TRUE);
}
- /* @TODO Check consistencyu between dim/type with filter->input* */
+ /** @todo Check consistencyu between dim/type with filter->input* */
result = gst_tensor_filter_generate_dim_from_cap (outcaps, dim, &type);
- /* @TODO Configure filter-dim from caps if filter-dim is not configured, yet */
+ /** @todo Configure filter-dim from caps if filter-dim is not configured, yet */
if ((filter->prop.outputConfigured & _TFC_ALL) != _TFC_ALL) {
/* we may set if result == TRUE */
g_assert (FALSE); /* NYI */
g_assert (result == TRUE);
}
- /* @TODO Check consistencyu between dim/type with filter->output* */
+ /** @todo Check consistencyu between dim/type with filter->output* */
return TRUE;
}
char *dlsym_error;
if (filter->privateData != NULL) {
- /* @TODO : Check the integrity of filter->data and filter->modelFilename, nnfw */
+ /** @todo : Check the integrity of filter->data and filter->modelFilename, nnfw */
return 1;
}
ptr->customFW_private_data = ptr->methods->initfunc (&(filter->prop));
/* After init func, (getInput XOR setInput) && (getOutput XOR setInput) must hold! */
- /* @TODO Double check if this check is really required and safe */
+ /** @todo Double check if this check is really required and safe */
g_assert (!ptr->methods->getInputDim != !ptr->methods->setInputDim &&
!ptr->methods->getOutputDim != !ptr->methods->setInputDim);
static int
tflite_loadModelFile (const GstTensor_Filter * filter, void **private_data)
{
- /* @TODO need to decide wheter make internal data structure or not
+ /** @todo need to decide wheter make internal data structure or not
* need to add skip logic when model file already loaded
* need to load tensorflow lite model file by FlatBufferModel::BuildFromFile
* after configuration of c->cpp api of tflite works done
*/
- /* @TODO call tflite core api "tflite_new" */
+ /** @todo call tflite core api "tflite_new" */
return 0;
}
tflite_invoke (const GstTensor_Filter * filter, void **private_data,
const uint8_t * inptr, uint8_t * outptr)
{
- /* @TODO fill in *outputDimension (uint32_t[MAX_RANK]), *type */
- /* @TODO call tflite core apis */
+ /** @todo fill in *outputDimension (uint32_t[MAX_RANK]), *type */
+ /** @todo call tflite core apis */
return outptr; /* NYI */
}
tflite_getInputDim (const GstTensor_Filter * filter, void **private_data,
tensor_dim inputDimension, tensor_type * type)
{
- /* @TODO fill in *inputDimension (uint32_t[MAX_RANK]), *type */
- /* @TODO call tflite core api "tflite_getInputDim" */
+ /** @todo fill in *inputDimension (uint32_t[MAX_RANK]), *type */
+ /** @todo call tflite core api "tflite_getInputDim" */
return 0; /* NYI */
}
tflite_getOutputDim (const GstTensor_Filter * filter, void **private_data,
tensor_dim outputDimension, tensor_type * type)
{
- /* @TODO fill in *outputDimension (uint32_t[MAX_RANK]), *type */
- /* @TODO call tflite core api "tflite_getOutputDim" */
+ /** @todo fill in *outputDimension (uint32_t[MAX_RANK]), *type */
+ /** @todo call tflite core api "tflite_getOutputDim" */
return 0; /* NYI */
}
const tensor_dim iDimension, const tensor_type iType,
tensor_dim oDimension, tensor_type * oType)
{
- /* @TODO call tflite core apis */
+ /** @todo call tflite core apis */
return 0; /* NYI */
}
tflite_close (const GstTensor_Filter * filter, void **private_data)
{
- /* @TODO call tflite core api "tflite_delete" */
+ /** @todo call tflite core api "tflite_delete" */
}
GstTensor_Filter_Framework NNS_support_tensorflow_lite = {