Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(568)

Side by Side Diff: source/libvpx/vp8/vp8_cx_iface.c

Issue 478033002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp8/encoder/rdopt.c ('k') | source/libvpx/vp8/vp8_dx_iface.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 727
728 free(ctx->cx_data); 728 free(ctx->cx_data);
729 vp8_remove_compressor(&ctx->cpi); 729 vp8_remove_compressor(&ctx->cpi);
730 free(ctx); 730 free(ctx);
731 return VPX_CODEC_OK; 731 return VPX_CODEC_OK;
732 } 732 }
733 733
734 static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img, 734 static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img,
735 YV12_BUFFER_CONFIG *yv12) 735 YV12_BUFFER_CONFIG *yv12)
736 { 736 {
737 const int y_w = img->d_w;
738 const int y_h = img->d_h;
739 const int uv_w = (img->d_w + 1) / 2;
740 const int uv_h = (img->d_h + 1) / 2;
737 vpx_codec_err_t res = VPX_CODEC_OK; 741 vpx_codec_err_t res = VPX_CODEC_OK;
738 yv12->y_buffer = img->planes[VPX_PLANE_Y]; 742 yv12->y_buffer = img->planes[VPX_PLANE_Y];
739 yv12->u_buffer = img->planes[VPX_PLANE_U]; 743 yv12->u_buffer = img->planes[VPX_PLANE_U];
740 yv12->v_buffer = img->planes[VPX_PLANE_V]; 744 yv12->v_buffer = img->planes[VPX_PLANE_V];
741 745
742 yv12->y_crop_width = img->d_w; 746 yv12->y_crop_width = y_w;
743 yv12->y_crop_height = img->d_h; 747 yv12->y_crop_height = y_h;
744 yv12->y_width = img->d_w; 748 yv12->y_width = y_w;
745 yv12->y_height = img->d_h; 749 yv12->y_height = y_h;
746 yv12->uv_width = (1 + yv12->y_width) / 2; 750 yv12->uv_crop_width = uv_w;
747 yv12->uv_height = (1 + yv12->y_height) / 2; 751 yv12->uv_crop_height = uv_h;
752 yv12->uv_width = uv_w;
753 yv12->uv_height = uv_h;
748 754
749 yv12->y_stride = img->stride[VPX_PLANE_Y]; 755 yv12->y_stride = img->stride[VPX_PLANE_Y];
750 yv12->uv_stride = img->stride[VPX_PLANE_U]; 756 yv12->uv_stride = img->stride[VPX_PLANE_U];
751 757
752 yv12->border = (img->stride[VPX_PLANE_Y] - img->w) / 2; 758 yv12->border = (img->stride[VPX_PLANE_Y] - img->w) / 2;
753 return res; 759 return res;
754 } 760 }
755 761
756 static void pick_quickcompress_mode(vpx_codec_alg_priv_t *ctx, 762 static void pick_quickcompress_mode(vpx_codec_alg_priv_t *ctx,
757 unsigned long duration, 763 unsigned long duration,
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 1315
1310 /* keyframing settings (kf) */ 1316 /* keyframing settings (kf) */
1311 VPX_KF_AUTO, /* g_kfmode*/ 1317 VPX_KF_AUTO, /* g_kfmode*/
1312 0, /* kf_min_dist */ 1318 0, /* kf_min_dist */
1313 128, /* kf_max_dist */ 1319 128, /* kf_max_dist */
1314 1320
1315 #if VPX_ENCODER_ABI_VERSION == (1 + VPX_CODEC_ABI_VERSION) 1321 #if VPX_ENCODER_ABI_VERSION == (1 + VPX_CODEC_ABI_VERSION)
1316 "vp8.fpf" /* first pass filename */ 1322 "vp8.fpf" /* first pass filename */
1317 #endif 1323 #endif
1318 VPX_SS_DEFAULT_LAYERS, /* ss_number_layers */ 1324 VPX_SS_DEFAULT_LAYERS, /* ss_number_layers */
1319 #if CONFIG_SPATIAL_SVC
1320 {0}, 1325 {0},
1321 #endif
1322 {0}, /* ss_target_bitrate */ 1326 {0}, /* ss_target_bitrate */
1323 1, /* ts_number_layers */ 1327 1, /* ts_number_layers */
1324 {0}, /* ts_target_bitrate */ 1328 {0}, /* ts_target_bitrate */
1325 {0}, /* ts_rate_decimator */ 1329 {0}, /* ts_rate_decimator */
1326 0, /* ts_periodicity */ 1330 0, /* ts_periodicity */
1327 {0}, /* ts_layer_id */ 1331 {0}, /* ts_layer_id */
1328 }}, 1332 }},
1329 { -1, {NOT_IMPLEMENTED}}
1330 }; 1333 };
1331 1334
1332 1335
1333 #ifndef VERSION_STRING 1336 #ifndef VERSION_STRING
1334 #define VERSION_STRING 1337 #define VERSION_STRING
1335 #endif 1338 #endif
1336 CODEC_INTERFACE(vpx_codec_vp8_cx) = 1339 CODEC_INTERFACE(vpx_codec_vp8_cx) =
1337 { 1340 {
1338 "WebM Project VP8 Encoder" VERSION_STRING, 1341 "WebM Project VP8 Encoder" VERSION_STRING,
1339 VPX_CODEC_INTERNAL_ABI_VERSION, 1342 VPX_CODEC_INTERNAL_ABI_VERSION,
1340 VPX_CODEC_CAP_ENCODER | VPX_CODEC_CAP_PSNR | 1343 VPX_CODEC_CAP_ENCODER | VPX_CODEC_CAP_PSNR |
1341 VPX_CODEC_CAP_OUTPUT_PARTITION, 1344 VPX_CODEC_CAP_OUTPUT_PARTITION,
1342 /* vpx_codec_caps_t caps; */ 1345 /* vpx_codec_caps_t caps; */
1343 vp8e_init, /* vpx_codec_init_fn_t init; */ 1346 vp8e_init, /* vpx_codec_init_fn_t init; */
1344 vp8e_destroy, /* vpx_codec_destroy_fn_t destroy; */ 1347 vp8e_destroy, /* vpx_codec_destroy_fn_t destroy; */
1345 vp8e_ctf_maps, /* vpx_codec_ctrl_fn_map_t *ctrl_maps; */ 1348 vp8e_ctf_maps, /* vpx_codec_ctrl_fn_map_t *ctrl_maps; */
1346 NOT_IMPLEMENTED, /* vpx_codec_get_mmap_fn_t get_mmap; */
1347 NOT_IMPLEMENTED, /* vpx_codec_set_mmap_fn_t set_mmap; */
1348 { 1349 {
1349 NOT_IMPLEMENTED, /* vpx_codec_peek_si_fn_t peek_si; */ 1350 NOT_IMPLEMENTED, /* vpx_codec_peek_si_fn_t peek_si; */
1350 NOT_IMPLEMENTED, /* vpx_codec_get_si_fn_t get_si; */ 1351 NOT_IMPLEMENTED, /* vpx_codec_get_si_fn_t get_si; */
1351 NOT_IMPLEMENTED, /* vpx_codec_decode_fn_t decode; */ 1352 NOT_IMPLEMENTED, /* vpx_codec_decode_fn_t decode; */
1352 NOT_IMPLEMENTED, /* vpx_codec_frame_get_fn_t frame_get; */ 1353 NOT_IMPLEMENTED, /* vpx_codec_frame_get_fn_t frame_get; */
1353 }, 1354 },
1354 { 1355 {
1356 1, /* 1 cfg map */
1355 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t peek_si; */ 1357 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t peek_si; */
1356 vp8e_encode, /* vpx_codec_encode_fn_t encode; */ 1358 vp8e_encode, /* vpx_codec_encode_fn_t encode; */
1357 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t frame_get; */ 1359 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t frame_get; */
1358 vp8e_set_config, 1360 vp8e_set_config,
1359 NOT_IMPLEMENTED, 1361 NOT_IMPLEMENTED,
1360 vp8e_get_preview, 1362 vp8e_get_preview,
1361 vp8e_mr_alloc_mem, 1363 vp8e_mr_alloc_mem,
1362 } /* encoder functions */ 1364 } /* encoder functions */
1363 }; 1365 };
OLDNEW
« no previous file with comments | « source/libvpx/vp8/encoder/rdopt.c ('k') | source/libvpx/vp8/vp8_dx_iface.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698