Need help to understand how/when VP8 updates reference frames

205 views
Skip to first unread message

minyi yang

unread,
Aug 1, 2012, 1:14:19 PM8/1/12
to webm-d...@webmproject.org
VP8 encoder uses force_update and no_update flags to specify whether or not to update the Golden and/or AltRef frames. 
Case 1: force_update = 0, no_update = 1; the specified ref frame will NOT be updated with the current frame.   
Case 2: force_update = 1, no_update = 0; the specified ref frame WILL be updated with the current frame.
Case 3: force_update = 1, no_update = 1; encoder reports “invalid parameter” and give error.
Case 4: force_update = 0; no_update = 0; how does the encoder handle this? Does the encoder make its own decision (so it may or may not update the ref frame) or always take one flag over the other?

Rajesh Pamula

unread,
Aug 1, 2012, 2:18:22 PM8/1/12
to webm-d...@webmproject.org
I am not in possession of the reference code, but my guess is that in such case GF and AltRef remain unchanged. As far as I can remember there is no adaptive frame buffer update logic in reference encoder implementation.

Also for the sake of completeness, I like to mention that the last decoded frame also forms one of the reference frames apart from  GF and Alt ref. (Last decoded not necessarily the last frame to be decoded in temporal order).


--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msg/webm-discuss/-/-WfrJkqp5mwJ.
To post to this group, send email to webm-d...@webmproject.org.
To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.



--
Rajesh Pamula
Post Graduate Student
Analogue and Digital Integrated Circuit Design
Imperial College London.
Residence Phone: +44-20-78522056

sanjeev verma

unread,
Aug 7, 2012, 1:25:12 PM8/7/12
to webm-d...@webmproject.org
Hi,
In VP8, Can Coeff and MV decoding happen completely in parallel
without any dependency?
Reg,
San

Rajesh Pamula

unread,
Aug 7, 2012, 1:31:19 PM8/7/12
to webm-d...@webmproject.org
As far as I remember, MVDs are part of control partition along with frame level and MB level information and MVP computation does not depend on coeffs either and hence the answer is yes. Parallel decoding should be possible.


--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To post to this group, send email to webm-d...@webmproject.org.
To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.

sanjeev verma

unread,
Aug 7, 2012, 1:36:23 PM8/7/12
to webm-d...@webmproject.org
thanks.
I mean does coeff decoding depend on the "MV partition decoding" in
any way(any dependency likeon MB modes etc). I want to decode the
coeff and the partition that contains MV in parallel using two
different processors on the same chip?

Rajesh Pamula

unread,
Aug 7, 2012, 1:42:59 PM8/7/12
to webm-d...@webmproject.org
Well, let me put it in a perhaps more clear way. By decode I mean, entropy decode (which some may prefer calling as mere parsing). In order to be able to apply inverse transform, the knowledge of the MB type is required and for inverse quantization Qp value of the MB is required.

So parsing or rather entropy decode can be made parallel, reconstruction is sequential.

John Koleszar

unread,
Aug 8, 2012, 12:48:59 PM8/8/12
to webm-d...@webmproject.org
Decoding the mode/mv partition ("partition 0") has no dependencies,
but decoding the residual partitions does depend on the mode/mv
partition. The number of coefficients to decode depends on the block
mode, for example.

Rajesh Pamula

unread,
Aug 8, 2012, 4:06:19 PM8/8/12
to webm-d...@webmproject.org
But I thought one could entropy decode all the tokens and keeps them in blocks and associate with respective MBs even at a later stage based on its MB_TYPE. Isnt it true?

John Koleszar

unread,
Aug 8, 2012, 4:35:39 PM8/8/12
to webm-d...@webmproject.org
No, the context model is dependent on which plane and band the token
being decoded belongs to, and whether there are 24 or 25 blocks per MB
depends on the block mode, which is in the other partition. I don't
see any way to decode them independently.

Rajesh Pamula

unread,
Aug 8, 2012, 4:45:02 PM8/8/12
to webm-d...@webmproject.org
Ah yes. You are absolutely right. I wasnt thinking about how I would get probabilities.

Thanks for correcting me.

sanjeev verma

unread,
Aug 9, 2012, 12:49:12 PM8/9/12
to webm-d...@webmproject.org
Hi,
Does anybody has an idea, if VP8 decoder is able go decode 1080p
content on dual core A9 devices, If yes, then what bitrate can be
comfortably decoded?
Thanks and Regards,
Sanjeev

sanjeev verma

unread,
Aug 23, 2012, 11:35:34 AM8/23/12
to webm-d...@webmproject.org
Hi,
In VP8, does loop filtering of the current MB depend upon neighbouring
MB's properties like neighbouring MB type or Motion vectors etc?
Regards,
Sanjeev

Rajesh Pamula

unread,
Aug 23, 2012, 1:26:26 PM8/23/12
to webm-d...@webmproject.org
A quick scan of the spec did not indicate anything like loop filtering being dependent on neighbor MB properties. To be honest, I am quite surprised by that given other contemporary standards take MVs and Qps into account while determining filter strength. Atleast I would have liked a Qp dependence, although it is possible even now by setting LF adjustments per segment ID, but that would leave the decision making to encoder, rather than being specified in the standard.

I have been erroneous and rusty off-late wrt VP8. I am hoping more experienced experts (John and others) would correct me, if I am wrong.

--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To post to this group, send email to webm-d...@webmproject.org.
To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.

sanjeev verma

unread,
Aug 23, 2012, 1:31:05 PM8/23/12
to webm-d...@webmproject.org
Thanks Rajesh.
Any other replies will also be appreciated.
Regards,
Sanjeev

Attila Nagy

unread,
Aug 24, 2012, 3:18:37 AM8/24/12
to webm-d...@webmproject.org
Filtering depends on the actual reconstructed pixel values of the
above and left MB. These neighboring pixels can also be altered by the
filtering process of the current macroblock.
But yes, the neighbors' mode, mv or such properties are not used.

Ben

unread,
Dec 30, 2012, 12:08:20 PM12/30/12
to webm-d...@webmproject.org
Hi Rajesh,

Need some help on VP8 partiton. My decoder pipeline is designed to operate on MacroBlock (MB) basis. So my question is 

1. With multiple partition, is it possible to decode the complete MB till Loop Filter ? 

What I understood from multiple partition is , for eg a frame with 4 MB rows, and partition is 2. In this case the bitstream is packed with even rows followed by odd rows. 

BitStream:  MBrow0-MBRow2-MBRow1-MBRow3

If this is how it is received at the input of decoder, then Intra Prediction and loop filter cannot start processing the MB Row2, because MBRow1 is still not decoded. 

How can MB based pipeline designs can work ?

-ben

Ronald Bultje

unread,
Dec 30, 2012, 2:25:00 PM12/30/12
to webm-d...@webmproject.org
Hi Ben,

you know the offsets of each data partition in advance. So although you have a bitstream as you stated, you know the offsets/positions of the data for MBrow0 and MBrow1 in advance. So really, you have two bitstreams:

bitstream1: MBRow0-MBrow2[-...]

and

bitstream2: MBrow1-MBrow3[-...]

to do a MB-based pipeline design, just use the two bitstreams interchangeably for each mbrow you're decoding. I.e. use bitstream1 for mbrow0, then bitstream2 for mbrow1, then bitstream1 again for mbrow2, and lastly bitstream2 for mbrow3. You can also make this multithreaded, by having two threads, where thread 1 decodes bitstream1 and thread2 decodes bitstream2 in parallel.

Ronald



-ben

--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.

pathi...@gmail.com

unread,
Feb 24, 2014, 2:56:40 AM2/24/14
to webm-d...@webmproject.org
Hi rajesh,
                   i am new to vp8. i have some doubts in vp8 filtering. 

1)algorithamic level both h264 and vp8 process the vertical edges first and than horiznatl edges .is this true?

i found below lines in vp8 spec.

Before taking up the filtering algorithms themselves, we should emphasize a point Even though the pixel segments associated to a macroblock are antecedent to the macroblock (that is, lie within the macroblock or in already-constructed macroblocks), a macroblock must not be filtered immediately after its "reconstruction" . Rather, the loop filter applies after all the macroblocks have been "reconstructed" (i.e.had their predictor summed with their residue); correct decoding is predicated on the fact that already-constructed portions of the current frame referenced via intra-prediction  are not yet filtered.

what exactly above lines conveying?

do we need wait until all MBs of given frames to be  reconstucted before  filtering process starts?(if this is case the performance can be droped significantly because we need to wait for all MBs)

Thanks,
pathi 



Rajesh Pamula

unread,
Feb 24, 2014, 3:22:58 PM2/24/14
to webm-d...@webmproject.org
Hi Pathi

As mentioned in 8.6 of H.264/AVC, deblocking filtering applies to the vertical edges followed by horizontal edges, with edge definitions shown in Figure 8-10. In VP8 vertical edges are filtered followed by horizontal edges, so yes, your understanding is correct.

As for your second question, it is not necessary to wait till whole of the picture is reconstructed before applying loop filter. It is possible to incorporate loop filter in MB pipeline, provided dependencies are properly taken care of. For example, intra prediction requires unfiltered samples and if somehow one is able to store the 'required' unfiltered samples for future use, you could apply loop filtering to most of the edges available without having to wait till the complete picture to be reconstructed.

All of the hardware implementations of any video codec that employes loop filtering, that I am aware of, do filtering in MB pipeline and does not wait till the complete picture is reconstructed.

Thanks and regards


--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.

To post to this group, send email to webm-d...@webmproject.org.
Reply all
Reply to author
Forward
0 new messages