On Sat, Mar 7, 2015 at 12:09 PM, Anton Khirnov <[email protected]> wrote:
> Quoting Vittorio Giovara (2015-03-07 10:03:10)
>> Signed-off-by: Vittorio Giovara <[email protected]>
>> ---
>> +typedef struct TDSCContext {
>> +    MJpegDecodeContext jctx;    // *needs* to be first for inheritance
>
> eeeeew

I am glad you appreciate it :)

> This smells like mpegvideo, can't this be fixed easily?

You mean fix mpevideo entirely? ;)
As far as I can tell this codec need a full blown jpeg decoder, that's
why I didn't got for a g2meet approach.

>> +    /* Restore context format and dimensions because of mjpeg overlap */
>> +    avctx->pix_fmt = ctx->refframe->format;
>> +    return ff_set_dimensions(avctx, width, height);
>
> Ugh, this is so ugly.
> Can't you do either of
> 1) refactor the jpeg decoder to make it properly embeddable
> 2) use a full separate internal AVCodecContext

I looked at refactoring mjpeg but it embeds the AVCodecContext itself
and sets its field within a huge switch block within a decoding loop
within a huge switch block (not a typo).
I'll try to move decoding on its own separate AVCodecContext but the
uglier parts (like setting orig_h) will probably have to remain.

Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to