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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 { | 643 { |
644 priv = calloc(1, sizeof(struct vpx_codec_alg_priv)); | 644 priv = calloc(1, sizeof(struct vpx_codec_alg_priv)); |
645 | 645 |
646 if (!priv) | 646 if (!priv) |
647 { | 647 { |
648 return VPX_CODEC_MEM_ERROR; | 648 return VPX_CODEC_MEM_ERROR; |
649 } | 649 } |
650 | 650 |
651 ctx->priv = &priv->base; | 651 ctx->priv = &priv->base; |
652 ctx->priv->sz = sizeof(*ctx->priv); | 652 ctx->priv->sz = sizeof(*ctx->priv); |
653 ctx->priv->iface = ctx->iface; | |
654 ctx->priv->alg_priv = priv; | 653 ctx->priv->alg_priv = priv; |
655 ctx->priv->init_flags = ctx->init_flags; | 654 ctx->priv->init_flags = ctx->init_flags; |
656 | 655 |
657 if (ctx->config.enc) | 656 if (ctx->config.enc) |
658 { | 657 { |
659 /* Update the reference to the config structure to an | 658 /* Update the reference to the config structure to an |
660 * internal copy. | 659 * internal copy. |
661 */ | 660 */ |
662 ctx->priv->alg_priv->cfg = *ctx->config.enc; | 661 ctx->priv->alg_priv->cfg = *ctx->config.enc; |
663 ctx->config.enc = &ctx->priv->alg_priv->cfg; | 662 ctx->config.enc = &ctx->priv->alg_priv->cfg; |
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 1, /* 1 cfg map */ | 1355 1, /* 1 cfg map */ |
1357 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t peek_si; */ | 1356 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t peek_si; */ |
1358 vp8e_encode, /* vpx_codec_encode_fn_t encode; */ | 1357 vp8e_encode, /* vpx_codec_encode_fn_t encode; */ |
1359 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t frame_get; */ | 1358 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t frame_get; */ |
1360 vp8e_set_config, | 1359 vp8e_set_config, |
1361 NOT_IMPLEMENTED, | 1360 NOT_IMPLEMENTED, |
1362 vp8e_get_preview, | 1361 vp8e_get_preview, |
1363 vp8e_mr_alloc_mem, | 1362 vp8e_mr_alloc_mem, |
1364 } /* encoder functions */ | 1363 } /* encoder functions */ |
1365 }; | 1364 }; |
OLD | NEW |