summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-07-05 11:12:38 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-07-05 11:12:38 +0200
commit175df5819e126a4eea30b9c05d38fb504c958252 (patch)
tree465244d6747433a7d0e991abc1f58fe6cb28f06e /src
parentbd3224828f527f05fa84eb0d5bfaa2529f64145b (diff)
downloadlibufodecode-175df5819e126a4eea30b9c05d38fb504c958252.tar.gz
libufodecode-175df5819e126a4eea30b9c05d38fb504c958252.tar.bz2
libufodecode-175df5819e126a4eea30b9c05d38fb504c958252.tar.xz
libufodecode-175df5819e126a4eea30b9c05d38fb504c958252.zip
Add verbosity flag to output frequency and frame
Diffstat (limited to 'src')
-rw-r--r--src/ufodecode-private.h11
-rw-r--r--src/ufodecode.c2
-rw-r--r--src/ufodecode.h48
3 files changed, 38 insertions, 23 deletions
diff --git a/src/ufodecode-private.h b/src/ufodecode-private.h
index 19746ce..4d0eb9b 100644
--- a/src/ufodecode-private.h
+++ b/src/ufodecode-private.h
@@ -4,11 +4,12 @@
#include <stdbool.h>
struct ufo_decoder_t {
- int32_t height;
- uint32_t width;
- uint32_t *raw;
- size_t num_bytes;
- uint32_t current_pos;
+ int32_t height;
+ uint32_t width;
+ uint32_t *raw;
+ size_t num_bytes;
+ uint32_t current_pos;
+ uint32_t old_time_stamp;
};
diff --git a/src/ufodecode.c b/src/ufodecode.c
index 7be41bc..a778bd5 100644
--- a/src/ufodecode.c
+++ b/src/ufodecode.c
@@ -81,6 +81,7 @@ ufo_decoder ufo_decoder_new(int32_t height, uint32_t width, uint32_t *raw, size_
decoder->width = width;
decoder->height = height;
+ decoder->old_time_stamp = 0;
ufo_decoder_set_raw_data(decoder, raw, num_bytes);
return decoder;
}
@@ -513,7 +514,6 @@ size_t ufo_decoder_decode_frame(ufo_decoder decoder, uint32_t *raw,
uint32_t *num_rows, uint32_t *frame_number, uint32_t *time_stamp,
uint16_t *cmask)
{
-
int err = 0;
size_t pos = 0;
size_t advance = 0;
diff --git a/src/ufodecode.h b/src/ufodecode.h
index 9e2cbc4..bce17ec 100644
--- a/src/ufodecode.h
+++ b/src/ufodecode.h
@@ -9,23 +9,37 @@ typedef struct ufo_decoder_t *ufo_decoder;
extern "C" {
#endif
-
-ufo_decoder ufo_decoder_new(int32_t height, uint32_t width, uint32_t *raw, size_t num_bytes);
-
-void ufo_decoder_free(ufo_decoder decoder);
-
-size_t ufo_decoder_decode_frame(ufo_decoder decoder,
- uint32_t *raw, size_t num_bytes, uint16_t *pixels,
- uint32_t *num_rows, uint32_t *frame_number, uint32_t *time_stamp, uint16_t *cmask);
-
-void ufo_decoder_set_raw_data(ufo_decoder decoder, uint32_t *raw, size_t num_bytes);
-
-int ufo_decoder_get_next_frame(ufo_decoder decoder, uint16_t **pixels,
- uint32_t *num_rows, uint32_t *frame_number, uint32_t *time_stamp, uint16_t *cmask);
-
-void ufo_deinterlace_interpolate(const uint16_t *frame_in, uint16_t *frame_out, int width, int height);
-void ufo_deinterlace_weave(const uint16_t *in1, const uint16_t *in2, uint16_t *out, int width, int height);
-
+ufo_decoder ufo_decoder_new (int32_t height,
+ uint32_t width,
+ uint32_t *raw,
+ size_t num_bytes);
+void ufo_decoder_free (ufo_decoder decoder);
+size_t ufo_decoder_decode_frame (ufo_decoder decoder,
+ uint32_t *raw,
+ size_t num_bytes,
+ uint16_t *pixels,
+ uint32_t *num_rows,
+ uint32_t *frame_number,
+ uint32_t *time_stamp,
+ uint16_t *cmask);
+void ufo_decoder_set_raw_data (ufo_decoder decoder,
+ uint32_t *raw,
+ size_t num_bytes);
+int ufo_decoder_get_next_frame (ufo_decoder decoder,
+ uint16_t **pixels,
+ uint32_t *num_rows,
+ uint32_t *frame_number,
+ uint32_t *time_stamp,
+ uint16_t *cmask);
+void ufo_deinterlace_interpolate (const uint16_t *frame_in,
+ uint16_t *frame_out,
+ int width,
+ int height);
+void ufo_deinterlace_weave (const uint16_t *in1,
+ const uint16_t *in2,
+ uint16_t *out,
+ int width,
+ int height);
#ifdef __cplusplus
}