| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include <assert.h> | 11 #include <assert.h> |
| 12 #include "vp9/common/vp9_blockd.h" | 12 #include "vp9/common/vp9_blockd.h" |
| 13 #include "vp9/common/vp9_seg_common.h" | 13 #include "vp9/common/vp9_seg_common.h" |
| 14 | 14 |
| 15 static const int segfeaturedata_signed[SEG_LVL_MAX] = { 1, 1, 0, 0, 0, 0 }; | 15 static const int segfeaturedata_signed[SEG_LVL_MAX] = { 1, 1, 0, 0, 0, 0 }; |
| 16 static const int seg_feature_data_max[SEG_LVL_MAX] = | 16 static const int seg_feature_data_max[SEG_LVL_MAX] = |
| 17 { MAXQ, 63, 0xf, MB_MODE_COUNT - 1, 255, TX_SIZE_MAX - 1}; | 17 { MAXQ, 63, 0xf, MB_MODE_COUNT - 1, 255, TX_SIZE_MAX_SB - 1}; |
| 18 | 18 |
| 19 // These functions provide access to new segment level features. | 19 // These functions provide access to new segment level features. |
| 20 // Eventually these function may be "optimized out" but for the moment, | 20 // Eventually these function may be "optimized out" but for the moment, |
| 21 // the coding mechanism is still subject to change so these provide a | 21 // the coding mechanism is still subject to change so these provide a |
| 22 // convenient single point of change. | 22 // convenient single point of change. |
| 23 | 23 |
| 24 int vp9_segfeature_active(const MACROBLOCKD *xd, | 24 int vp9_segfeature_active(const MACROBLOCKD *xd, |
| 25 int segment_id, | 25 int segment_id, |
| 26 SEG_LVL_FEATURES feature_id) { | 26 SEG_LVL_FEATURES feature_id) { |
| 27 // Return true if mask bit set and segmentation enabled. | 27 // Return true if mask bit set and segmentation enabled. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 ~(1 << INTRA_FRAME)) ? 1 : 0; | 103 ~(1 << INTRA_FRAME)) ? 1 : 0; |
| 104 } | 104 } |
| 105 | 105 |
| 106 int vp9_get_seg_tx_type(MACROBLOCKD *xd, int segment_id) { | 106 int vp9_get_seg_tx_type(MACROBLOCKD *xd, int segment_id) { |
| 107 if (vp9_segfeature_active(xd, segment_id, SEG_LVL_TRANSFORM)) | 107 if (vp9_segfeature_active(xd, segment_id, SEG_LVL_TRANSFORM)) |
| 108 return vp9_get_segdata(xd, segment_id, SEG_LVL_TRANSFORM); | 108 return vp9_get_segdata(xd, segment_id, SEG_LVL_TRANSFORM); |
| 109 else | 109 else |
| 110 return TX_4X4; | 110 return TX_4X4; |
| 111 } | 111 } |
| 112 // TBD? Functions to read and write segment data with range / validity checking | 112 // TBD? Functions to read and write segment data with range / validity checking |
| OLD | NEW |