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 |
| #include <stdlib.h> | #include <theora/theora.h> | int main(int argc, char *argv[]) | { | theora_info i; | theora_info_init(&i); | | void* internal_encode = malloc(256); | void* internal_decode = malloc(256); | theora_state t = { | .i = &i, | .granulepos = 1LL, | .internal_encode = internal_encode, | .internal_decode = internal_decode}; | unsigned char y [] = { | 'A', | 'B', | 'C', | 'D', | '\0'}; | yuv_buffer yuv = { | .y_width = 16, | .y_height = 24, | .y_stride = 1, | .uv_width = 32, | .uv_height = 40, | .uv_stride = 1, | .y = y, | .u = y, | .v = y}; | theora_encode_YUVin(&t, &yuv); //target call | return 0; | } |
|