[FFmpeg-devel] [PATCH 1/4] Support reference picture defined by bitmask in MJPEG's SOS decoder
Anatoly Nenashev
nenashev_as
Thu Feb 17 16:45:59 CET 2011
On 17.02.2011 12:39, Tomas H?rdin wrote:
> Anatoly Nenashev skrev 2011-02-16 21:51:
> > From b2a9360bbab34f831eb9522fd6fcb91514b84bda Mon Sep 17 00:00:00 2001
> > From: anatoly <anatoly.nenashev at ovsoft.ru>
> > Date: Tue, 15 Feb 2011 01:39:32 +0300
> > Subject: [PATCH 1/4] Support reference picture defined by bitmask in
> MJPEG's SOS decoder
> >
>
> [...]
> >
> > for(mb_y = 0; mb_y < s->mb_height; mb_y++) {
> > for(mb_x = 0; mb_x < s->mb_width; mb_x++) {
> > + const int copy_mb = mb_bitmask &&
> !get_bits1(&mb_bitmask_gb);
> > + if (copy_mb && !reference)
> > + continue;
>
> Is having mb_bitmask != NULL and reference == NULL actually allowed?
> If not, maybe put a check in PATCH 4/4 for "if (s->got_mxm_bitmask &&
> !reference_ptr)"
Yes, it is actually allowed. Input stream may not start from full JPEG
image. In this situation the first frame consists of parts defined by
bitmask and thus reference_ptr=NULL.
>
> > +
> > if (s->restart_interval && !s->restart_count)
>
[...]> + const uint8_t *reference_data = reference ?
reference->data[c] : 0;
>
> Nit: NULL?
>
Of course. There are other places with this style nit. I'll fix it.
More information about the ffmpeg-devel
mailing list