| 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 } | 677 } |
| 678 | 678 |
| 679 static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img, | 679 static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img, |
| 680 YV12_BUFFER_CONFIG *yv12) | 680 YV12_BUFFER_CONFIG *yv12) |
| 681 { | 681 { |
| 682 vpx_codec_err_t res = VPX_CODEC_OK; | 682 vpx_codec_err_t res = VPX_CODEC_OK; |
| 683 yv12->y_buffer = img->planes[VPX_PLANE_Y]; | 683 yv12->y_buffer = img->planes[VPX_PLANE_Y]; |
| 684 yv12->u_buffer = img->planes[VPX_PLANE_U]; | 684 yv12->u_buffer = img->planes[VPX_PLANE_U]; |
| 685 yv12->v_buffer = img->planes[VPX_PLANE_V]; | 685 yv12->v_buffer = img->planes[VPX_PLANE_V]; |
| 686 | 686 |
| 687 yv12->y_crop_width = img->d_w; |
| 688 yv12->y_crop_height = img->d_h; |
| 687 yv12->y_width = img->d_w; | 689 yv12->y_width = img->d_w; |
| 688 yv12->y_height = img->d_h; | 690 yv12->y_height = img->d_h; |
| 689 yv12->uv_width = (1 + yv12->y_width) / 2; | 691 yv12->uv_width = (1 + yv12->y_width) / 2; |
| 690 yv12->uv_height = (1 + yv12->y_height) / 2; | 692 yv12->uv_height = (1 + yv12->y_height) / 2; |
| 691 | 693 |
| 692 yv12->y_stride = img->stride[VPX_PLANE_Y]; | 694 yv12->y_stride = img->stride[VPX_PLANE_Y]; |
| 693 yv12->uv_stride = img->stride[VPX_PLANE_U]; | 695 yv12->uv_stride = img->stride[VPX_PLANE_U]; |
| 694 | 696 |
| 695 yv12->border = (img->stride[VPX_PLANE_Y] - img->w) / 2; | 697 yv12->border = (img->stride[VPX_PLANE_Y] - img->w) / 2; |
| 696 yv12->clrtype = (img->fmt == VPX_IMG_FMT_VPXI420 || img->fmt == VPX_IMG_FMT_
VPXYV12); | 698 yv12->clrtype = (img->fmt == VPX_IMG_FMT_VPXI420 || img->fmt == VPX_IMG_FMT_
VPXYV12); |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 { | 1312 { |
| 1311 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t peek_si; */ | 1313 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t peek_si; */ |
| 1312 vp8e_encode, /* vpx_codec_encode_fn_t encode; */ | 1314 vp8e_encode, /* vpx_codec_encode_fn_t encode; */ |
| 1313 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t frame_get; */ | 1315 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t frame_get; */ |
| 1314 vp8e_set_config, | 1316 vp8e_set_config, |
| 1315 NOT_IMPLEMENTED, | 1317 NOT_IMPLEMENTED, |
| 1316 vp8e_get_preview, | 1318 vp8e_get_preview, |
| 1317 vp8e_mr_alloc_mem, | 1319 vp8e_mr_alloc_mem, |
| 1318 } /* encoder functions */ | 1320 } /* encoder functions */ |
| 1319 }; | 1321 }; |
| OLD | NEW |