summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_context_tree.h
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2014-11-21 11:11:06 -0800
committerYunqing Wang <yunqingwang@google.com>2014-11-24 17:57:38 -0800
commitedbd61e1362978150b5681125d93cb2bffbb5c53 (patch)
treed9b9d651da0b22861bc326244ad4ba6826b5081b /vp9/encoder/vp9_context_tree.h
parent60ef6c073556b75fe46754a6ae5ca1008ffea8b4 (diff)
downloadlibvpx-edbd61e1362978150b5681125d93cb2bffbb5c53.tar
libvpx-edbd61e1362978150b5681125d93cb2bffbb5c53.tar.gz
libvpx-edbd61e1362978150b5681125d93cb2bffbb5c53.tar.bz2
libvpx-edbd61e1362978150b5681125d93cb2bffbb5c53.zip
vp9_ethread: modify VP9_COMP structure
This patch modified struct VP9_COMP. Created a struct ThreadData to include data that need to be copied for each thread. In multiple thread case, one thread processes one tile. all threads share one copy of VP9_COMP, (refer to VP9_COMP *cpi in the code) but each thread has its own copy of ThreadData, (refer to ThreadData *td in the code). Therefore, within the scope of encode_tiles(), both cpi and td need to be passed as function parameters. In single thread case, the FRAME_COUNTS pointer in ThreadData points to "counts" in VP9_COMMON. Change-Id: Ib37908b2d8e2c0f4f9c18f38017df5ce60e8b13e
Diffstat (limited to 'vp9/encoder/vp9_context_tree.h')
-rw-r--r--vp9/encoder/vp9_context_tree.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_context_tree.h b/vp9/encoder/vp9_context_tree.h
index 1710783e7..70bf032c3 100644
--- a/vp9/encoder/vp9_context_tree.h
+++ b/vp9/encoder/vp9_context_tree.h
@@ -15,6 +15,7 @@
struct VP9_COMP;
struct VP9Common;
+struct ThreadData;
// Structure to hold snapshot of coding context during the mode picking process
typedef struct {
@@ -79,7 +80,7 @@ typedef struct PC_TREE {
};
} PC_TREE;
-void vp9_setup_pc_tree(struct VP9Common *cm, struct VP9_COMP *cpi);
-void vp9_free_pc_tree(struct VP9_COMP *cpi);
+void vp9_setup_pc_tree(struct VP9Common *cm, struct ThreadData *td);
+void vp9_free_pc_tree(struct ThreadData *td);
#endif /* VP9_ENCODER_VP9_CONTEXT_TREE_H_ */