summaryrefslogtreecommitdiffstats
path: root/libhb/common.h
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-12-05 17:15:57 +0000
committerjstebbins <[email protected]>2009-12-05 17:15:57 +0000
commitc6caa91a4ff436198e22d518d6b5e6882921576b (patch)
tree8831fdf29ffffe86c30fc008e20d848254a37046 /libhb/common.h
parent8209d6c285d54482da16aa5eb7b5dfe96c2b3264 (diff)
Reduce the amount of buffering used and eliminate hb_snooze in the encoding pipeline
For HD sources on an 8 core system with hyperthreading, we were using 1.5GB of ram. Add to that the 600MB x264 uses for rc-lookahead, pushes it north of 2GB. To reduce our memory usage, the fifo depths have been reduced are are no longer a multiple of cpu count. Use of hb_snooze has been eliminated in the encoding pipeline so that performance doesn't fall as a result of the reduced fifo depths. In sync, each audio and video were given separate threads so that each can wait on it's respective input fifo without blocking the others. In muxcommon, each stream being muxed was given a separate thread so that each can wait on it's respective fifo. This allows the removal of hb_snooze in the sync and muxer work loops. In both sync and muxer, there is common data that is shared by all threads, so special init routines allocate this shared data and initialize the threads. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3007 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.h')
-rw-r--r--libhb/common.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libhb/common.h b/libhb/common.h
index a85beda01..d76022238 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -287,7 +287,6 @@ struct hb_job_s
hb_fifo_t * fifo_mpeg4; /* MPEG-4 video ES */
hb_thread_t * reader;
- hb_thread_t * muxer;
hb_list_t * list_work;
@@ -680,7 +679,8 @@ struct hb_work_object_s
#endif
};
-extern hb_work_object_t hb_sync;
+extern hb_work_object_t hb_sync_video;
+extern hb_work_object_t hb_sync_audio;
extern hb_work_object_t hb_decmpeg2;
extern hb_work_object_t hb_decvobsub;
extern hb_work_object_t hb_encvobsub;
@@ -700,6 +700,7 @@ extern hb_work_object_t hb_declpcm;
extern hb_work_object_t hb_encfaac;
extern hb_work_object_t hb_enclame;
extern hb_work_object_t hb_encvorbis;
+extern hb_work_object_t hb_muxer;
extern hb_work_object_t hb_encca_aac;
#define FILTER_OK 0