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

Side by Side Diff: source/libvpx/vp8/encoder/encodemb.c

Issue 1124333011: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: only update to last nights LKGR Created 5 years, 7 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
« no previous file with comments | « source/libvpx/vp8/encoder/encodeframe.c ('k') | source/libvpx/vp8/encoder/ethreading.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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 static void optimize_mb(MACROBLOCK *x) 499 static void optimize_mb(MACROBLOCK *x)
500 { 500 {
501 int b; 501 int b;
502 int type; 502 int type;
503 int has_2nd_order; 503 int has_2nd_order;
504 504
505 ENTROPY_CONTEXT_PLANES t_above, t_left; 505 ENTROPY_CONTEXT_PLANES t_above, t_left;
506 ENTROPY_CONTEXT *ta; 506 ENTROPY_CONTEXT *ta;
507 ENTROPY_CONTEXT *tl; 507 ENTROPY_CONTEXT *tl;
508 508
509 vpx_memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES)) ; 509 memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES));
510 vpx_memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES)); 510 memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES));
511 511
512 ta = (ENTROPY_CONTEXT *)&t_above; 512 ta = (ENTROPY_CONTEXT *)&t_above;
513 tl = (ENTROPY_CONTEXT *)&t_left; 513 tl = (ENTROPY_CONTEXT *)&t_left;
514 514
515 has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED 515 has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED
516 && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); 516 && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV);
517 type = has_2nd_order ? PLANE_TYPE_Y_NO_DC : PLANE_TYPE_Y_WITH_DC; 517 type = has_2nd_order ? PLANE_TYPE_Y_NO_DC : PLANE_TYPE_Y_WITH_DC;
518 518
519 for (b = 0; b < 16; b++) 519 for (b = 0; b < 16; b++)
520 { 520 {
(...skipping 27 matching lines...) Expand all
548 ENTROPY_CONTEXT_PLANES t_above, t_left; 548 ENTROPY_CONTEXT_PLANES t_above, t_left;
549 ENTROPY_CONTEXT *ta; 549 ENTROPY_CONTEXT *ta;
550 ENTROPY_CONTEXT *tl; 550 ENTROPY_CONTEXT *tl;
551 551
552 if (!x->e_mbd.above_context) 552 if (!x->e_mbd.above_context)
553 return; 553 return;
554 554
555 if (!x->e_mbd.left_context) 555 if (!x->e_mbd.left_context)
556 return; 556 return;
557 557
558 vpx_memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES)) ; 558 memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES));
559 vpx_memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES)); 559 memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES));
560 560
561 ta = (ENTROPY_CONTEXT *)&t_above; 561 ta = (ENTROPY_CONTEXT *)&t_above;
562 tl = (ENTROPY_CONTEXT *)&t_left; 562 tl = (ENTROPY_CONTEXT *)&t_left;
563 563
564 has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED 564 has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED
565 && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); 565 && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV);
566 type = has_2nd_order ? PLANE_TYPE_Y_NO_DC : PLANE_TYPE_Y_WITH_DC; 566 type = has_2nd_order ? PLANE_TYPE_Y_NO_DC : PLANE_TYPE_Y_WITH_DC;
567 567
568 for (b = 0; b < 16; b++) 568 for (b = 0; b < 16; b++)
569 { 569 {
(...skipping 18 matching lines...) Expand all
588 ENTROPY_CONTEXT_PLANES t_above, t_left; 588 ENTROPY_CONTEXT_PLANES t_above, t_left;
589 ENTROPY_CONTEXT *ta; 589 ENTROPY_CONTEXT *ta;
590 ENTROPY_CONTEXT *tl; 590 ENTROPY_CONTEXT *tl;
591 591
592 if (!x->e_mbd.above_context) 592 if (!x->e_mbd.above_context)
593 return; 593 return;
594 594
595 if (!x->e_mbd.left_context) 595 if (!x->e_mbd.left_context)
596 return; 596 return;
597 597
598 vpx_memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES)) ; 598 memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES));
599 vpx_memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES)); 599 memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES));
600 600
601 ta = (ENTROPY_CONTEXT *)&t_above; 601 ta = (ENTROPY_CONTEXT *)&t_above;
602 tl = (ENTROPY_CONTEXT *)&t_left; 602 tl = (ENTROPY_CONTEXT *)&t_left;
603 603
604 for (b = 16; b < 24; b++) 604 for (b = 16; b < 24; b++)
605 { 605 {
606 optimize_b(x, b, PLANE_TYPE_UV, 606 optimize_b(x, b, PLANE_TYPE_UV,
607 ta + vp8_block2above[b], tl + vp8_block2left[b]); 607 ta + vp8_block2above[b], tl + vp8_block2left[b]);
608 } 608 }
609 } 609 }
(...skipping 22 matching lines...) Expand all
632 632
633 vp8_subtract_mby(x->src_diff, *(b->base_src), 633 vp8_subtract_mby(x->src_diff, *(b->base_src),
634 b->src_stride, x->e_mbd.dst.y_buffer, x->e_mbd.dst.y_stride); 634 b->src_stride, x->e_mbd.dst.y_buffer, x->e_mbd.dst.y_stride);
635 635
636 transform_mby(x); 636 transform_mby(x);
637 637
638 vp8_quantize_mby(x); 638 vp8_quantize_mby(x);
639 639
640 vp8_inverse_transform_mby(&x->e_mbd); 640 vp8_inverse_transform_mby(&x->e_mbd);
641 } 641 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/encoder/encodeframe.c ('k') | source/libvpx/vp8/encoder/ethreading.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698