Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: source/libvpx/vp9/common/vp9_onyxc_int.h

Issue 1217053002: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/common/vp9_mvref_common.c ('k') | source/libvpx/vp9/common/vp9_quant_common.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/common/vp9_onyxc_int.h
diff --git a/source/libvpx/vp9/common/vp9_onyxc_int.h b/source/libvpx/vp9/common/vp9_onyxc_int.h
index 3af2a41bd28231899e65e93245f9c3b6aec8349a..1811d76dfd30d952a0cb078328a0f3fb608639d3 100644
--- a/source/libvpx/vp9/common/vp9_onyxc_int.h
+++ b/source/libvpx/vp9/common/vp9_onyxc_int.h
@@ -162,7 +162,8 @@ typedef struct VP9Common {
int show_existing_frame;
// Flag signaling that the frame is encoded using only INTRA modes.
- int intra_only;
+ uint8_t intra_only;
+ uint8_t last_intra_only;
int allow_high_precision_mv;
@@ -335,6 +336,18 @@ static INLINE int mi_cols_aligned_to_sb(int n_mis) {
return ALIGN_POWER_OF_TWO(n_mis, MI_BLOCK_SIZE_LOG2);
}
+static INLINE int frame_is_intra_only(const VP9_COMMON *const cm) {
+ return cm->frame_type == KEY_FRAME || cm->intra_only;
+}
+
+static INLINE void set_partition_probs(const VP9_COMMON *const cm,
+ MACROBLOCKD *const xd) {
+ xd->partition_probs =
+ frame_is_intra_only(cm) ?
+ &vp9_kf_partition_probs[0] :
+ (const vp9_prob (*)[PARTITION_TYPES - 1])cm->fc->partition_prob;
+}
+
static INLINE void init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd) {
int i;
@@ -355,16 +368,13 @@ static INLINE void init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd) {
xd->above_seg_context = cm->above_seg_context;
xd->mi_stride = cm->mi_stride;
xd->error_info = &cm->error;
-}
-static INLINE int frame_is_intra_only(const VP9_COMMON *const cm) {
- return cm->frame_type == KEY_FRAME || cm->intra_only;
+ set_partition_probs(cm, xd);
}
-static INLINE const vp9_prob* get_partition_probs(const VP9_COMMON *cm,
+static INLINE const vp9_prob* get_partition_probs(const MACROBLOCKD *xd,
int ctx) {
- return frame_is_intra_only(cm) ? vp9_kf_partition_probs[ctx]
- : cm->fc->partition_prob[ctx];
+ return xd->partition_probs[ctx];
}
static INLINE void set_skip_context(MACROBLOCKD *xd, int mi_row, int mi_col) {
« no previous file with comments | « source/libvpx/vp9/common/vp9_mvref_common.c ('k') | source/libvpx/vp9/common/vp9_quant_common.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698