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 |
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 if (!vp9_set_active_map(ctx->cpi, map->active_map, | 1253 if (!vp9_set_active_map(ctx->cpi, map->active_map, |
1254 (int)map->rows, (int)map->cols)) | 1254 (int)map->rows, (int)map->cols)) |
1255 return VPX_CODEC_OK; | 1255 return VPX_CODEC_OK; |
1256 else | 1256 else |
1257 return VPX_CODEC_INVALID_PARAM; | 1257 return VPX_CODEC_INVALID_PARAM; |
1258 } else { | 1258 } else { |
1259 return VPX_CODEC_INVALID_PARAM; | 1259 return VPX_CODEC_INVALID_PARAM; |
1260 } | 1260 } |
1261 } | 1261 } |
1262 | 1262 |
| 1263 static vpx_codec_err_t ctrl_get_active_map(vpx_codec_alg_priv_t *ctx, |
| 1264 va_list args) { |
| 1265 vpx_active_map_t *const map = va_arg(args, vpx_active_map_t *); |
| 1266 |
| 1267 if (map) { |
| 1268 if (!vp9_get_active_map(ctx->cpi, map->active_map, |
| 1269 (int)map->rows, (int)map->cols)) |
| 1270 return VPX_CODEC_OK; |
| 1271 else |
| 1272 return VPX_CODEC_INVALID_PARAM; |
| 1273 } else { |
| 1274 return VPX_CODEC_INVALID_PARAM; |
| 1275 } |
| 1276 } |
| 1277 |
1263 static vpx_codec_err_t ctrl_set_scale_mode(vpx_codec_alg_priv_t *ctx, | 1278 static vpx_codec_err_t ctrl_set_scale_mode(vpx_codec_alg_priv_t *ctx, |
1264 va_list args) { | 1279 va_list args) { |
1265 vpx_scaling_mode_t *const mode = va_arg(args, vpx_scaling_mode_t *); | 1280 vpx_scaling_mode_t *const mode = va_arg(args, vpx_scaling_mode_t *); |
1266 | 1281 |
1267 if (mode) { | 1282 if (mode) { |
1268 const int res = vp9_set_internal_size(ctx->cpi, | 1283 const int res = vp9_set_internal_size(ctx->cpi, |
1269 (VPX_SCALING)mode->h_scaling_mode, | 1284 (VPX_SCALING)mode->h_scaling_mode, |
1270 (VPX_SCALING)mode->v_scaling_mode); | 1285 (VPX_SCALING)mode->v_scaling_mode); |
1271 return (res == 0) ? VPX_CODEC_OK : VPX_CODEC_INVALID_PARAM; | 1286 return (res == 0) ? VPX_CODEC_OK : VPX_CODEC_INVALID_PARAM; |
1272 } else { | 1287 } else { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1410 {VP9E_SET_COLOR_SPACE, ctrl_set_color_space}, | 1425 {VP9E_SET_COLOR_SPACE, ctrl_set_color_space}, |
1411 {VP9E_SET_NOISE_SENSITIVITY, ctrl_set_noise_sensitivity}, | 1426 {VP9E_SET_NOISE_SENSITIVITY, ctrl_set_noise_sensitivity}, |
1412 | 1427 |
1413 // Getters | 1428 // Getters |
1414 {VP8E_GET_LAST_QUANTIZER, ctrl_get_quantizer}, | 1429 {VP8E_GET_LAST_QUANTIZER, ctrl_get_quantizer}, |
1415 {VP8E_GET_LAST_QUANTIZER_64, ctrl_get_quantizer64}, | 1430 {VP8E_GET_LAST_QUANTIZER_64, ctrl_get_quantizer64}, |
1416 {VP9_GET_REFERENCE, ctrl_get_reference}, | 1431 {VP9_GET_REFERENCE, ctrl_get_reference}, |
1417 #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION) | 1432 #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION) |
1418 {VP9E_GET_SVC_LAYER_ID, ctrl_get_svc_layer_id}, | 1433 {VP9E_GET_SVC_LAYER_ID, ctrl_get_svc_layer_id}, |
1419 #endif | 1434 #endif |
| 1435 {VP9E_GET_ACTIVEMAP, ctrl_get_active_map}, |
1420 | 1436 |
1421 { -1, NULL}, | 1437 { -1, NULL}, |
1422 }; | 1438 }; |
1423 | 1439 |
1424 static vpx_codec_enc_cfg_map_t encoder_usage_cfg_map[] = { | 1440 static vpx_codec_enc_cfg_map_t encoder_usage_cfg_map[] = { |
1425 { | 1441 { |
1426 0, | 1442 0, |
1427 { // NOLINT | 1443 { // NOLINT |
1428 0, // g_usage | 1444 0, // g_usage |
1429 8, // g_threads | 1445 8, // g_threads |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 1, // 1 cfg map | 1523 1, // 1 cfg map |
1508 encoder_usage_cfg_map, // vpx_codec_enc_cfg_map_t | 1524 encoder_usage_cfg_map, // vpx_codec_enc_cfg_map_t |
1509 encoder_encode, // vpx_codec_encode_fn_t | 1525 encoder_encode, // vpx_codec_encode_fn_t |
1510 encoder_get_cxdata, // vpx_codec_get_cx_data_fn_t | 1526 encoder_get_cxdata, // vpx_codec_get_cx_data_fn_t |
1511 encoder_set_config, // vpx_codec_enc_config_set_fn_t | 1527 encoder_set_config, // vpx_codec_enc_config_set_fn_t |
1512 NULL, // vpx_codec_get_global_headers_fn_t | 1528 NULL, // vpx_codec_get_global_headers_fn_t |
1513 encoder_get_preview, // vpx_codec_get_preview_frame_fn_t | 1529 encoder_get_preview, // vpx_codec_get_preview_frame_fn_t |
1514 NULL // vpx_codec_enc_mr_get_mem_loc_fn_t | 1530 NULL // vpx_codec_enc_mr_get_mem_loc_fn_t |
1515 } | 1531 } |
1516 }; | 1532 }; |
OLD | NEW |