matrix.c
资源名称:NETVIDEO.rar [点击查看]
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:1k
源码类别:
流媒体/Mpeg4/MP4
开发平台:
Visual C++
- #include "quicktime.h"
- int quicktime_matrix_init(quicktime_matrix_t *matrix)
- {
- int i;
- for(i = 0; i < 9; i++) matrix->values[i] = 0;
- matrix->values[0] = matrix->values[4] = 1;
- matrix->values[8] = 16384;
- }
- int quicktime_matrix_delete(quicktime_matrix_t *matrix)
- {
- }
- int quicktime_read_matrix(quicktime_t *file, quicktime_matrix_t *matrix)
- {
- int i = 0;
- for(i = 0; i < 9; i++)
- {
- matrix->values[i] = quicktime_read_fixed32(file);
- }
- }
- int quicktime_matrix_dump(quicktime_matrix_t *matrix)
- {
- int i;
- printf(" matrix");
- for(i = 0; i < 9; i++) printf(" %f", matrix->values[i]);
- printf("n");
- }
- int quicktime_write_matrix(quicktime_t *file, quicktime_matrix_t *matrix)
- {
- int i;
- for(i = 0; i < 9; i++)
- {
- quicktime_write_fixed32(file, matrix->values[i]);
- }
- }