diff options
author | John Koleszar <jkoleszar@google.com> | 2013-03-13 12:15:43 -0700 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2013-03-13 19:08:06 -0700 |
commit | b3c350a1a99ac89e81cff77d82a9a11c0a762600 (patch) | |
tree | bbe70fff7d73547d4e1937956e88d2d1026f5824 /vp9/encoder/vp9_onyx_if.c | |
parent | bd9cd9a1859aa464b3092f2023b3a4040166572d (diff) | |
download | libvpx-b3c350a1a99ac89e81cff77d82a9a11c0a762600.tar libvpx-b3c350a1a99ac89e81cff77d82a9a11c0a762600.tar.gz libvpx-b3c350a1a99ac89e81cff77d82a9a11c0a762600.tar.bz2 libvpx-b3c350a1a99ac89e81cff77d82a9a11c0a762600.zip |
Add VP9_GET_REFERENCE control
This is like VP8_COPY_REFERENCE, but returns a pointer to the reference
frame rather than a copy of it. This is useful when the application
doesn't know what the size of the reference is, as is the case when
scaling is in effect.
Change-Id: I63667109f65510364d0e397ebe56217140772085
Diffstat (limited to 'vp9/encoder/vp9_onyx_if.c')
-rw-r--r-- | vp9/encoder/vp9_onyx_if.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index c3353cee9..19456e44f 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -2103,8 +2103,8 @@ int vp9_update_reference(VP9_PTR ptr, int ref_frame_flags) { return 0; } -int vp9_get_reference_enc(VP9_PTR ptr, VP9_REFFRAME ref_frame_flag, - YV12_BUFFER_CONFIG *sd) { +int vp9_copy_reference_enc(VP9_PTR ptr, VP9_REFFRAME ref_frame_flag, + YV12_BUFFER_CONFIG *sd) { VP9_COMP *cpi = (VP9_COMP *)(ptr); VP9_COMMON *cm = &cpi->common; int ref_fb_idx; @@ -2123,6 +2123,17 @@ int vp9_get_reference_enc(VP9_PTR ptr, VP9_REFFRAME ref_frame_flag, return 0; } +int vp9_get_reference_enc(VP9_PTR ptr, int index, YV12_BUFFER_CONFIG **fb) { + VP9_COMP *cpi = (VP9_COMP *)(ptr); + VP9_COMMON *cm = &cpi->common; + + if (index < 0 || index >= NUM_REF_FRAMES) + return -1; + + *fb = &cm->yv12_fb[cm->ref_frame_map[index]]; + return 0; +} + int vp9_set_reference_enc(VP9_PTR ptr, VP9_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) { VP9_COMP *cpi = (VP9_COMP *)(ptr); |