| Index: source/libvpx/vp9/encoder/vp9_segmentation.c
|
| ===================================================================
|
| --- source/libvpx/vp9/encoder/vp9_segmentation.c (revision 254565)
|
| +++ source/libvpx/vp9/encoder/vp9_segmentation.c (working copy)
|
| @@ -10,29 +10,25 @@
|
|
|
|
|
| #include <limits.h>
|
| +
|
| #include "vpx_mem/vpx_mem.h"
|
| -#include "vp9/encoder/vp9_segmentation.h"
|
| +
|
| #include "vp9/common/vp9_pred_common.h"
|
| #include "vp9/common/vp9_tile_common.h"
|
|
|
| -void vp9_enable_segmentation(VP9_PTR ptr) {
|
| - VP9_COMP *cpi = (VP9_COMP *)ptr;
|
| - struct segmentation *const seg = &cpi->common.seg;
|
| +#include "vp9/encoder/vp9_segmentation.h"
|
|
|
| +void vp9_enable_segmentation(struct segmentation *seg) {
|
| seg->enabled = 1;
|
| seg->update_map = 1;
|
| seg->update_data = 1;
|
| }
|
|
|
| -void vp9_disable_segmentation(VP9_PTR ptr) {
|
| - VP9_COMP *cpi = (VP9_COMP *)ptr;
|
| - struct segmentation *const seg = &cpi->common.seg;
|
| +void vp9_disable_segmentation(struct segmentation *seg) {
|
| seg->enabled = 0;
|
| }
|
|
|
| -void vp9_set_segmentation_map(VP9_PTR ptr,
|
| - unsigned char *segmentation_map) {
|
| - VP9_COMP *cpi = (VP9_COMP *)ptr;
|
| +void vp9_set_segmentation_map(VP9_COMP *cpi, unsigned char *segmentation_map) {
|
| struct segmentation *const seg = &cpi->common.seg;
|
|
|
| // Copy in the new segmentation map
|
| @@ -44,12 +40,9 @@
|
| seg->update_data = 1;
|
| }
|
|
|
| -void vp9_set_segment_data(VP9_PTR ptr,
|
| +void vp9_set_segment_data(struct segmentation *seg,
|
| signed char *feature_data,
|
| unsigned char abs_delta) {
|
| - VP9_COMP *cpi = (VP9_COMP *)ptr;
|
| - struct segmentation *const seg = &cpi->common.seg;
|
| -
|
| seg->abs_delta = abs_delta;
|
|
|
| vpx_memcpy(seg->feature_data, feature_data, sizeof(seg->feature_data));
|
|
|