118 #define MAX_HMM_NSTATE 5 200 #define hmm_context(h) ((hmm_t *)(h))->ctx 201 #define hmm_is_mpx(h) ((hmm_t *)(h))->mpx 202 #define hmm_state(h,st) ((hmm_t *)(h))->state[st] 204 #define hmm_in_score(h) hmm_state(h,0).score 205 #define hmm_score(h,st) hmm_state(h,st).score 206 #define hmm_out_score(h) ((hmm_t *)(h))->out.score 208 #define hmm_in_history(h) hmm_state(h,0).history.id 209 #define hmm_history(h,st) hmm_state(h,st).history.id 210 #define hmm_out_history(h) ((hmm_t *)(h))->out.history.id 212 #define hmm_in_histobj(h) hmm_state(h,0).history.ptr 213 #define hmm_histobj(h,st) hmm_state(h,st).history.ptr 214 #define hmm_out_histobj(h) ((hmm_t *)(h))->out.history.ptr 216 #define hmm_bestscore(h) ((hmm_t *)(h))->bestscore 217 #define hmm_frame(h) ((hmm_t *)(h))->frame 218 #define hmm_mpx_ssid(h,st) ((hmm_t *)(h))->s.mpx_ssid[st] 219 #define hmm_nonmpx_ssid(h) ((hmm_t *)(h))->s.ssid 220 #define hmm_ssid(h,st) (hmm_is_mpx((hmm_t *)(h)) \ 221 ? hmm_mpx_ssid(h,st) : ((hmm_t *)(h))->s.ssid) 222 #define hmm_senid(h,st) (hmm_ssid(h,st) == -1 \ 223 ? -1 : ((hmm_t *)(h))->ctx->sseq[hmm_ssid(h,st)][st]) 224 #define hmm_senscr(h,st) (hmm_ssid(h,st) == -1 \ 226 : ((hmm_t *)(h))->ctx->senscore[hmm_senid(h,st)]) 227 #define hmm_tmatid(h) ((hmm_t *)(h))->tmatid 228 #define hmm_tprob(h,i,j) ((hmm_t *)(h))->ctx->tp[hmm_tmatid(h)][i][j] 229 #define hmm_n_emit_state(h) (((hmm_t *)(h))->n_emit_state) 230 #define hmm_n_state(h) (((hmm_t *)(h))->n_emit_state + 1) 243 #define hmm_context_set_senscore(ctx, senscr) ((ctx)->senscore = (senscr)) 285 int32 histid, int32 frame);
291 void *histobj, int32 frame);
int32 hmm_dump_vit_eval(hmm_t *hmm, FILE *fp)
int32 ssid
Definition: hmm.h:190
void * udata
Definition: hmm.h:162
s3tmatid_t tmatid
Definition: hmm.h:193
int32 score
Definition: hmm.h:169
int16 s3frmid_t
Definition: s3types.h:172
void hmm_enter(hmm_t *h, int32 score, int32 histid, int32 frame)
An individual HMM among the HMM search space.
int32 * st_sen_scr
Definition: hmm.h:161
void hmm_init(hmm_context_t *ctx, hmm_t *hmm, int mpx, int32 ssid, s3tmatid_t tmatid)
void hmm_deinit(hmm_t *hmm)
const s3senid_t ** sseq
Definition: hmm.h:160
uint8 mpx
Definition: hmm.h:195
int32 hmm_vit_eval(hmm_t *hmm)
void hmm_normalize(hmm_t *h, int32 bestscr)
s3frmid_t frame
Definition: hmm.h:194
struct hmm_context_s hmm_context_t
int32 s3tmatid_t
Definition: s3types.h:130
const int32 * senscore
Definition: hmm.h:159
Size definition of semantically units. Common for both s3 and s3.X decoder.
int16 s3senid_t
Definition: s3types.h:178
int32 bestscore
Definition: hmm.h:192
Shared information between a set of HMMs.
A single state in the HMM.
Definition: hmm.h:168
void hmm_enter_obj(hmm_t *h, int32 score, void *histobj, int32 frame)
void * ptr
Definition: hmm.h:172
void hmm_dump(hmm_t *h, FILE *fp)
const int32 *** tp
Definition: hmm.h:158
hmm_context_t * ctx
Definition: hmm.h:185
void hmm_clear_scores(hmm_t *h)
hmm_context_t * hmm_context_init(int32 n_emit_state, int32 ***tp, int32 *senscore, s3senid_t **sseq)
void hmm_context_free(hmm_context_t *ctx)
int32 * mpx_ssid
Definition: hmm.h:189
uint8 n_emit_state
Definition: hmm.h:196
hmm_state_t out
Definition: hmm.h:187
int32 n_emit_state
Definition: hmm.h:157
long id
Definition: hmm.h:171
#define MAX_HMM_NSTATE
Definition: hmm.h:118