[FFmpeg-devel] [PATCH 3/7] vp9: move some entries out of VP9Block into VP9Context.

Clément Bœsch u at pkh.me
Tue Nov 26 10:24:59 CET 2013


On Mon, Nov 25, 2013 at 09:44:46PM -0500, Ronald S. Bultje wrote:
> They aren't really block-related variables in the sense that they are
> not block-coded, rather they are state trackers.
> ---
>  libavcodec/vp9.c | 118 +++++++++++++++++++++++++++----------------------------
>  1 file changed, 59 insertions(+), 59 deletions(-)
> 
> diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
> index 91f4eeb..83f4a57 100644
> --- a/libavcodec/vp9.c
> +++ b/libavcodec/vp9.c
[...]
> @@ -2605,10 +2605,10 @@ static int decode_b(AVCodecContext *ctx, int row, int col,
>      int res, y, w4 = bwh_tab[1][bs][0], h4 = bwh_tab[1][bs][1], lvl;
>      int emu[2];
>  
> -    b->row = row;
> -    b->row7 = row & 7;
> -    b->col = col;
> -    b->col7 = col & 7;
> +    s->row = row;
> +    s->row7 = row & 7;
> +    s->col = col;
> +    s->col7 = col & 7;

If that really belongs to the context instead of the block, why not set
the context once in the sb caller instead of each block, and make the
decode_b() pick local row/col/... from there?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131126/37a9c8ba/attachment.asc>


More information about the ffmpeg-devel mailing list