From f1b30a32ddb2687a6bd8efbbc2dd01a07df8e823 Mon Sep 17 00:00:00 2001 From: Freek van Tienen Date: Mon, 23 Mar 2015 10:13:07 +0100 Subject: [PATCH] [vision] Fix some comments --- .../computer_vision/lib/encoding/rtp.c | 20 ++++++++++++++++++- .../computer_vision/lib/encoding/rtp.h | 11 ++-------- .../computer_vision/lib/vision/lucas_kanade.h | 2 +- .../opticflow/stabilization_opticflow.c | 2 +- .../opticflow/stabilization_opticflow.h | 2 +- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/sw/airborne/modules/computer_vision/lib/encoding/rtp.c b/sw/airborne/modules/computer_vision/lib/encoding/rtp.c index 047e574d52d..5be8bcd7136 100644 --- a/sw/airborne/modules/computer_vision/lib/encoding/rtp.c +++ b/sw/airborne/modules/computer_vision/lib/encoding/rtp.c @@ -62,6 +62,7 @@ uint8_t JpegScanDataCh2B[KJpegCh2ScanDataLen] = { /** * Send a test RTP frame + * @param[in] *udp The udp connection to send the test frame over */ void rtp_frame_test(struct udp_periph *udp) { @@ -86,6 +87,12 @@ void rtp_frame_test(struct udp_periph *udp) /** * Send an RTP frame + * @param[in] *udp The UDP connection to send the frame over + * @param[in] *img The image to send over the RTP connection + * @param[in] format_code 0 for YUV422 and 1 for YUV421 + * @param[in] quality_code The JPEG encoding quality + * @param[in] has_dri_header Whether we have an DRI header or not + * @param[in] delta_t Time between images (if set to 0 or less it is calculated) */ void rtp_frame_send(struct udp_periph *udp, struct image_t *img, uint8_t format_code, uint8_t quality_code, uint8_t has_dri_header, uint32_t delta_t) @@ -135,7 +142,18 @@ void rtp_frame_send(struct udp_periph *udp, struct image_t *img, uint8_t format_ * The RTP timestamp is in units of 90000Hz. The same timestamp MUST appear in each fragment of a given frame. The RTP marker bit MUST be set in the last packet of a frame. - * + * @param[in] *udp The UDP socket to send the RTP packet over + * @param[in] *Jpeg JPEG encoded image byte buffer + * @param[in] JpegLen The length of the byte buffer + * @param[in] m_SequenceNumber RTP sequence number + * @param[in] m_Timestamp Timestamp of the image + * @param[in] m_offset 3 byte fragmentation offset for fragmented images + * @param[in] marker_bit RTP marker bit + * @param[in] w The width of the JPEG image + * @param[in] h The height of the image + * @param[in] format_code 0 for YUV422 and 1 for YUV421 + * @param[in] quality_code The JPEG encoding quality + * @param[in] has_dri_header Whether we have an DRI header or not */ static void rtp_packet_send( struct udp_periph *udp, diff --git a/sw/airborne/modules/computer_vision/lib/encoding/rtp.h b/sw/airborne/modules/computer_vision/lib/encoding/rtp.h index d099d1a1d83..69f7f714c50 100644 --- a/sw/airborne/modules/computer_vision/lib/encoding/rtp.h +++ b/sw/airborne/modules/computer_vision/lib/encoding/rtp.h @@ -32,15 +32,8 @@ #include "lib/vision/image.h" #include "mcu_periph/udp.h" -void rtp_frame_send( - struct udp_periph *udp, // socket - struct image_t *img, // The image to send - uint8_t format_code, // 0=422, 1=421 - uint8_t quality_code, // 0-99 of 128 for custom (include - uint8_t has_dri_header, // Does Jpeg data include Header Info? - uint32_t delta_t // time step 90kHz -); - +void rtp_frame_send(struct udp_periph *udp, struct image_t *img, uint8_t format_code, uint8_t quality_code, + uint8_t has_dri_header, uint32_t delta_t); void rtp_frame_test(struct udp_periph *udp); #endif /* _CV_ENCODING_RTP_H */ diff --git a/sw/airborne/modules/computer_vision/lib/vision/lucas_kanade.h b/sw/airborne/modules/computer_vision/lib/vision/lucas_kanade.h index 2a71ebf48bd..dada79f7fdf 100644 --- a/sw/airborne/modules/computer_vision/lib/vision/lucas_kanade.h +++ b/sw/airborne/modules/computer_vision/lib/vision/lucas_kanade.h @@ -20,7 +20,7 @@ */ /** - * @file modules/computer_vision/lib/vision/lucas_kanade.c + * @file modules/computer_vision/lib/vision/lucas_kanade.h * @brief efficient fixed-point optical-flow calculation * * - Initial fixed-point C implementation by G. de Croon diff --git a/sw/airborne/modules/computer_vision/opticflow/stabilization_opticflow.c b/sw/airborne/modules/computer_vision/opticflow/stabilization_opticflow.c index fa150d8bb22..f4742a00c89 100644 --- a/sw/airborne/modules/computer_vision/opticflow/stabilization_opticflow.c +++ b/sw/airborne/modules/computer_vision/opticflow/stabilization_opticflow.c @@ -20,7 +20,7 @@ */ /** - * @file modules/computer_vision/opticflow/hover_stabilization.c + * @file modules/computer_vision/opticflow/stabilization_opticflow.c * @brief Optical-flow based control for Linux based systems * * Control loops for optic flow based hovering. diff --git a/sw/airborne/modules/computer_vision/opticflow/stabilization_opticflow.h b/sw/airborne/modules/computer_vision/opticflow/stabilization_opticflow.h index a6a9adefcb7..13eee913168 100644 --- a/sw/airborne/modules/computer_vision/opticflow/stabilization_opticflow.h +++ b/sw/airborne/modules/computer_vision/opticflow/stabilization_opticflow.h @@ -20,7 +20,7 @@ */ /** - * @file modules/computer_vision/opticflow/hover_stabilization.h + * @file modules/computer_vision/opticflow/stabilization_opticflow.h * @brief Optical-flow based control for Linux based systems * * Control loops for optic flow based hovering.