-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquantizer_tester.c
More file actions
72 lines (61 loc) · 1.68 KB
/
quantizer_tester.c
File metadata and controls
72 lines (61 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#include <stdbool.h>
#include "include/globals.h"
//#include "camera_reader.h"
#include "include/downsampler.h"
#include "include/entropic_enc.h"
#include "include/quantizer.h"
//#include "streamer.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include "include/imgUtil.h"
#include "include/frame_encoder.h"
/*Función auxiliar para medir tiempos de ejecución*/
/*
double timeval_diff(struct timeval *a, struct timeval *b) {
return ((double)(a->tv_sec +(double)a->tv_usec/1000000)-(double)(b->tv_sec + (double)b->tv_usec/1000000));
}
*/
int main(int argc, char* argv[]) {
struct timeval t_ini, t_fin;
double secs;
DEBUG=true;
downsampler_initialized=false;
quantizer_initialized=false;
printf("hello world\n");
/*
gettimeofday(&t_ini, NULL);
pppx=2;
pppy=2;
framecoder_init(640, 480,pppx,pppy);
gettimeofday(&t_fin, NULL);
secs = timeval_diff(&t_fin, &t_ini);
printf("%.16g ms\n", secs * 1000.0);
*/
/*
gettimeofday(&t_ini, NULL);
int width=640/pppx;
int height=480/pppy;
int module=8;
int line=0;
for (int j=0;j<1;j++)
for (int i=0;i<height;i++)
{
quantize_scanline( orig_Y, line, width, hops_Y,result_Y);
line +=module;
line = line % height; //Actualmente recorre siemre el mismo bloque 0,8,16, etc...
//line = ((i+1) % (height/module) == 0) ? ((line % height)+1) : (line % height);// Esta linea hace que se recorran bien los slices
}
gettimeofday(&t_fin, NULL);
secs = timeval_diff(&t_fin, &t_ini);
secs=secs/1000;
printf("%.16g ms\n", secs * 1.0);
*/
printf ("encoding frame \n");
// debug=true;
DEBUG=false;
//for (int i = 0; i < 30; i++){
encode_frame_fromfile();
//}
printf("Creado fichero ");
}