media/libvpx/vp8/common/swapyv12buffer.c

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libvpx/vp8/common/swapyv12buffer.c	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     1.4 +/*
     1.5 + *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
     1.6 + *
     1.7 + *  Use of this source code is governed by a BSD-style license
     1.8 + *  that can be found in the LICENSE file in the root of the source
     1.9 + *  tree. An additional intellectual property rights grant can be found
    1.10 + *  in the file PATENTS.  All contributing project authors may
    1.11 + *  be found in the AUTHORS file in the root of the source tree.
    1.12 + */
    1.13 +
    1.14 +
    1.15 +#include "swapyv12buffer.h"
    1.16 +
    1.17 +void vp8_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame, YV12_BUFFER_CONFIG *last_frame)
    1.18 +{
    1.19 +    unsigned char *temp;
    1.20 +
    1.21 +    temp = last_frame->buffer_alloc;
    1.22 +    last_frame->buffer_alloc = new_frame->buffer_alloc;
    1.23 +    new_frame->buffer_alloc = temp;
    1.24 +
    1.25 +    temp = last_frame->y_buffer;
    1.26 +    last_frame->y_buffer = new_frame->y_buffer;
    1.27 +    new_frame->y_buffer = temp;
    1.28 +
    1.29 +    temp = last_frame->u_buffer;
    1.30 +    last_frame->u_buffer = new_frame->u_buffer;
    1.31 +    new_frame->u_buffer = temp;
    1.32 +
    1.33 +    temp = last_frame->v_buffer;
    1.34 +    last_frame->v_buffer = new_frame->v_buffer;
    1.35 +    new_frame->v_buffer = temp;
    1.36 +
    1.37 +}

mercurial