Parent Directory | Revision Log
Revision 1.1 - (view) (download)
1 : | syskin | 1.1 | /***************************************************************************** |
2 : | * | ||
3 : | * XVID MPEG-4 VIDEO CODEC | ||
4 : | * - multithreaded Motion Estimation header - | ||
5 : | * | ||
6 : | * Copyright(C) 2005 Radoslaw Czyz <xvid@syskin.cjb.net> | ||
7 : | * | ||
8 : | * significant portions derived from x264 project, | ||
9 : | * original authors: Trax, Gianluigi Tiesi, Eric Petit | ||
10 : | * | ||
11 : | * This program is free software ; you can redistribute it and/or modify | ||
12 : | * it under the terms of the GNU General Public License as published by | ||
13 : | * the Free Software Foundation ; either version 2 of the License, or | ||
14 : | * (at your option) any later version. | ||
15 : | * | ||
16 : | * This program is distributed in the hope that it will be useful, | ||
17 : | * but WITHOUT ANY WARRANTY ; without even the implied warranty of | ||
18 : | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 : | * GNU General Public License for more details. | ||
20 : | * | ||
21 : | * You should have received a copy of the GNU General Public License | ||
22 : | * along with this program ; if not, write to the Free Software | ||
23 : | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
24 : | * | ||
25 : | * $Id: motion_inlines.h,v 1.4 2004/12/08 12:43:48 syskin Exp $ | ||
26 : | * | ||
27 : | ****************************************************************************/ | ||
28 : | |||
29 : | #ifndef SMP_MOTION_H | ||
30 : | #define SMP_MOTION_H | ||
31 : | |||
32 : | #ifdef WIN32 | ||
33 : | #include <windows.h> | ||
34 : | #define pthread_t HANDLE | ||
35 : | #define pthread_create(t,u,f,d) *(t)=CreateThread(NULL,0,f,d,0,NULL) | ||
36 : | #define pthread_join(t,s) { WaitForSingleObject(t,INFINITE); \ | ||
37 : | CloseHandle(t); } | ||
38 : | #define sched_yield() Sleep(0) | ||
39 : | #define HAVE_PTHREAD 1 | ||
40 : | |||
41 : | #elif defined(SYS_BEOS) | ||
42 : | #include <kernel/OS.h> | ||
43 : | #define pthread_t thread_id | ||
44 : | #define pthread_create(t,u,f,d) { *(t)=spawn_thread(f,"",10,d); \ | ||
45 : | resume_thread(*(t)); } | ||
46 : | #define pthread_join(t,s) wait_for_thread(t,(long*)s) | ||
47 : | #define sched_yield() snooze(0) /* is this correct? */ | ||
48 : | #define HAVE_PTHREAD 1 | ||
49 : | |||
50 : | #elif HAVE_PTHREAD | ||
51 : | #include <pthread.h> | ||
52 : | #endif | ||
53 : | |||
54 : | |||
55 : | #define THREADS 3 | ||
56 : | |||
57 : | typedef struct | ||
58 : | { | ||
59 : | pthread_t handle; /* thread's handle */ | ||
60 : | const MBParam * pParam; | ||
61 : | const FRAMEINFO * current; | ||
62 : | const FRAMEINFO * reference; | ||
63 : | const IMAGE * pRefH; | ||
64 : | const IMAGE * pRefV; | ||
65 : | const IMAGE * pRefHV; | ||
66 : | const IMAGE * pGMC; | ||
67 : | uint8_t * RefQ; | ||
68 : | int y_step; | ||
69 : | int start_y; | ||
70 : | int * complete_count_self; | ||
71 : | int * complete_count_above; | ||
72 : | |||
73 : | /* bvop stuff */ | ||
74 : | int time_bp, time_pp; | ||
75 : | const MACROBLOCK * f_mbs; | ||
76 : | const IMAGE * pRef; | ||
77 : | const IMAGE * fRef; | ||
78 : | const IMAGE * fRefH; | ||
79 : | const IMAGE * fRefV; | ||
80 : | const IMAGE * fRefHV; | ||
81 : | |||
82 : | int MVmax, mvSum, mvCount; /* out */ | ||
83 : | } SMPmotionData; | ||
84 : | |||
85 : | |||
86 : | void MotionEstimateSMP(SMPmotionData * h); | ||
87 : | void SMPMotionEstimationBVOP(SMPmotionData * h); | ||
88 : | |||
89 : | #endif /* SMP_MOTION_H */ |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |