[FFmpeg-devel] [FFMPEG] [PATCH] cavs encoder

zhihang wang zhihang.wang
Fri Nov 13 18:43:07 CET 2009

Yes, you are right, Stefan.
This is one of the problem. I have written the code as you just suggested
before. But it will have to change the cavs decoder because the interfaces
of some functions should be changed. So I rewrite some similar functions. I
don't know whether these functions should be kept.
This attachment is a new version of the cavs encoder. I change the code
mainly according to* Diego's comments*. I rearrange the main part of the
patch, cavsenc.c, carefully and added the comments for almost every function
in detail in order to make the review easier.
I would like to answer any questions on this patch and welcome anyone to
review the code. I also like to make any change to let the patch be
Another note should be given: The cavs decoder in the ffmpeg project now
doesn't support the newest cavs version. So I think it should be updated.

On Tue, Nov 3, 2009 at 3:37 AM, Stefan Gehrer <stefan.gehrer at gmx.de> wrote:

> Hi Wang,
> thank you for working on this patch and providing it here.
> I hope I will find some time soon to review it in more detail.
> From a quick look, I think the biggest problem with the patch
> is the functional duplication between decoder and enoder.
> It seems you copied many variables from the AVSContext to
> the MpegEncContext and functions which already existed in
> the decoder are duplicated, but now using the variables
> from the MpegEncContext instead of the AVSContext.
> I think it should be possible to have all relevant variables
> in the AVSContext and use common functions in more places.
> Whenever some variable from the MpegEncContext is needed,
> for example options set by the user, one can use code
> like
> int foo(AVSContext *h) {
>        MpegEncContext *s = &h->s;
>        if(s->low_delay)
>                ...
> }
> to access those values.
> That would also decrease the size of the patch and make
> reviewing easier for others not so familiar with the code
> base.
> Best regards
> Stefan
> --
Best Regards
zhihang wang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cavs_enc_patch_1.1.gz
Type: application/x-gzip
Size: 33822 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091114/eed01659/attachment.bin>

More information about the ffmpeg-devel mailing list