diff options
author | angiebird <angiebird@google.com> | 2019-11-11 12:32:10 -0800 |
---|---|---|
committer | angiebird <angiebird@google.com> | 2019-11-18 11:37:24 -0800 |
commit | 6956e393c710fab99833500a57062862e97096b6 (patch) | |
tree | c899c9fe8ebb5d74e9b2e812007e1c88b4ba006e /vp9/vp9_cx_iface.c | |
parent | f975d02d6dc095c97c6950a2b8c3768f29644fe5 (diff) | |
download | libvpx-6956e393c710fab99833500a57062862e97096b6.tar libvpx-6956e393c710fab99833500a57062862e97096b6.tar.gz libvpx-6956e393c710fab99833500a57062862e97096b6.tar.bz2 libvpx-6956e393c710fab99833500a57062862e97096b6.zip |
Add frame_type and show_idx to EncodeFrameResult
Let vp9_get_compressed_data update ENCODE_FRAME_RESULT, a C
version of EncodeFrameResult.
Let unit test to test frame_type and show_idx properly.
Change-Id: Id810c26c826254fd82249f19ab855ea3b440d99c
Diffstat (limited to 'vp9/vp9_cx_iface.c')
-rw-r--r-- | vp9/vp9_cx_iface.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index a019b976c..3f5170859 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -1249,11 +1249,12 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, // compute first pass stats if (img) { int ret; + ENCODE_FRAME_RESULT encode_frame_result; vpx_codec_cx_pkt_t fps_pkt; // TODO(angiebird): Call vp9_first_pass directly - ret = - vp9_get_compressed_data(cpi, &lib_flags, &size, cx_data, - &dst_time_stamp, &dst_end_time_stamp, !img); + ret = vp9_get_compressed_data(cpi, &lib_flags, &size, cx_data, + &dst_time_stamp, &dst_end_time_stamp, + !img, &encode_frame_result); assert(size == 0); // There is no compressed data in the first pass (void)ret; assert(ret == 0); @@ -1271,10 +1272,11 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, assert(0); #endif // !CONFIG_REALTIME_ONLY } else { + ENCODE_FRAME_RESULT encode_frame_result; while (cx_data_sz >= ctx->cx_data_sz / 2 && -1 != vp9_get_compressed_data(cpi, &lib_flags, &size, cx_data, &dst_time_stamp, &dst_end_time_stamp, - !img)) { + !img, &encode_frame_result)) { // Pack psnr pkt if (size > 0 && !cpi->use_svc) { // TODO(angiebird): Figure out while we don't need psnr pkt when |