Hi Jim,
I am to add VP9 support in my project with libvpx, can you help to answer the following questions:
- What example can I refer to for how to use the encoder and decoder?
- What is the difference between the vp9_lossless_encoder.c, vp9_spatial_svc_encoder.c and vex_temporal_svc_encoder.c under the examples directory? Does it means that there are three modes the encoder works: lossless, spatial sac and temporal svc, what is the use case for these modes respectively?
- Does it means that the client do not need to tell the decoder what mode the encoder work?
Your help will be really appreciated!
Regards,
Jim
Jim, thanks for your kindly help.
While in poor networks condition, the sreen becomes green. To improve the user experience, I think that we can let the screen freeze by using last successfully decoded frame to display, when the result of vpx_codec_decode() indicate that the current frame is corrupt.
So now my understand is :
step 1) Use vpx_codec_decode(vpx_codec_ctx_t *ctx,
const uint8_t *data,
unsigned int data_sz,
void *user_priv,
long deadline);
to decode rtp package data, and if the result is OK, and then get into step 2)
step 2) Use vpx_codec_get_frame(vpx_codec_ctx_t *ctx,
vpx_codec_iter_t *iter)
to get the decoded frame, here the application should maintain these frames(the return value for vpx_codec_get_frame() ) if we want to use them in the future, right ? Another question here, we call vpx_codec_decode() one time, does it means that we can get one image in step 2), or some time we get more than one image ?
And in the case of the current frame to be decoded is a corrupt frame, in step 1) we get a result of VPX_CODEC_CORRUPT_FRAME. We can use the image we maintain in last step 2) after last successfully decoded frame in last step 1) , right ?
I also confused with the the comment of vpx_codec_decode() :
*\param[in] data Pointer to this block of new coded data. If
* NULL, a VPX_CODEC_CB_PUT_FRAME event is posted
* for the previously decoded frame.
Does it mean that when the current frame being decoded is corrupt and then I can call the vpx_codec_decode() to tell the decoder to use last frame by setting the parameter data to NULL and data_sz to 0 ? Doese it mean that the applicaiton need not maintain the last successfully decoded frame by itself ?
Looking forwards to your help!Regards,Jim WeiOriginal MessageSender: Jim Bankoski<jimba...@google.com>Recipient: apps-devel<apps-...@webmproject.org>Cc: jim<j...@justek.us>Date: Friday, May 15, 2015 08:36Subject: Re: Question about vpx_codec_decode in libvpxI'm not sure exactly what you are looking for.This will get you one of 3 prior reference frames :VP8_COPY_REFERENCEYou can see an example of how to use it in the examples, specifically vp8cx_set_ref.cThere are also some examples for dealing with udp dropped packets in the udp_sample project. Clone from here:
https://chromium.googlesource.com/webm/udpsampleand the far more full featured webrtc code base, here:I hope that helps.Jim
On Thursday, May 14, 2015 at 2:32:16 AM UTC-7, jim wrote:Hi vp8 experts,
Second try. Can anyone help?
Thanks,
Jim
Original MessageSender: jim<j...@justek.us>Recipient: apps-...@webmproject.orgCc: wil...@justek.usDate: Tuesday, May 12, 2015 18:13Subject: Question about vpx_codec_decode in libvpxHi experts,
This is Jim and I am using libvpx for a voip project. Now I am confused with the method of
vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx,
const uint8_t *data,
unsigned int data_sz,
void *user_priv,
long deadline);
How can I to get the previously decoded frame when I found something wrong with the current frame? According to the comment of
*\param[in] data Pointer to this block of new coded data. If
* NULL, a VPX_CODEC_CB_PUT_FRAME event is posted
* for the previously decoded frame.
Can I just call vpx_codec_decode() to tell the decoder to use last frame by setting the data to NULL and the data_sz to 0?
Or the application should buffer the correct frame, and to implement a call back for event of VPX_CODEC_CB_PUT_FRAME? If so, how to get that?
Looking forwards to your answer! Your help will be appreciated!
Regards
Jim