| 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 |
| 11 #ifndef YV12_CONFIG_H | 11 #ifndef YV12_CONFIG_H |
| 12 #define YV12_CONFIG_H | 12 #define YV12_CONFIG_H |
| 13 | 13 |
| 14 #ifdef __cplusplus | 14 #ifdef __cplusplus |
| 15 extern "C" { | 15 extern "C" { |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 #include "vpx/vpx_external_frame_buffer.h" |
| 18 #include "vpx/vpx_integer.h" | 19 #include "vpx/vpx_integer.h" |
| 19 | 20 |
| 20 #define VP8BORDERINPIXELS 32 | 21 #define VP8BORDERINPIXELS 32 |
| 21 #define VP9INNERBORDERINPIXELS 96 | 22 #define VP9INNERBORDERINPIXELS 96 |
| 22 #define VP9BORDERINPIXELS 160 | 23 #define VP9BORDERINPIXELS 160 |
| 23 #define VP9_INTERP_EXTEND 4 | 24 #define VP9_INTERP_EXTEND 4 |
| 24 | 25 |
| 25 typedef struct yv12_buffer_config { | 26 typedef struct yv12_buffer_config { |
| 26 int y_width; | 27 int y_width; |
| 27 int y_height; | 28 int y_height; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 57 | 58 |
| 58 int vp8_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, | 59 int vp8_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, |
| 59 int width, int height, int border); | 60 int width, int height, int border); |
| 60 int vp8_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, | 61 int vp8_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, |
| 61 int width, int height, int border); | 62 int width, int height, int border); |
| 62 int vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf); | 63 int vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf); |
| 63 | 64 |
| 64 int vp9_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, | 65 int vp9_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, |
| 65 int width, int height, int ss_x, int ss_y, | 66 int width, int height, int ss_x, int ss_y, |
| 66 int border); | 67 int border); |
| 68 |
| 69 // Updates the yv12 buffer config with the frame buffer. If ext_fb is not |
| 70 // NULL then libvpx is using external frame buffers. The function will |
| 71 // check if the frame buffer is big enough to fit the decoded frame and |
| 72 // try to reallocate the frame buffer. If ext_fb is not NULL and the frame |
| 73 // buffer is not big enough libvpx will call cb with minimum size in bytes. |
| 74 // |
| 75 // Returns 0 on success. Returns < 0 on failure. |
| 67 int vp9_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, | 76 int vp9_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, |
| 68 int width, int height, int ss_x, int ss_y, | 77 int width, int height, int ss_x, int ss_y, |
| 69 int border); | 78 int border, |
| 79 vpx_codec_frame_buffer_t *ext_fb, |
| 80 vpx_realloc_frame_buffer_cb_fn_t cb, |
| 81 void *user_priv); |
| 70 int vp9_free_frame_buffer(YV12_BUFFER_CONFIG *ybf); | 82 int vp9_free_frame_buffer(YV12_BUFFER_CONFIG *ybf); |
| 71 | 83 |
| 72 #ifdef __cplusplus | 84 #ifdef __cplusplus |
| 73 } | 85 } |
| 74 #endif | 86 #endif |
| 75 | 87 |
| 76 #endif // YV12_CONFIG_H | 88 #endif // YV12_CONFIG_H |
| OLD | NEW |