[FFmpeg-devel] [PATCH] add fieldorder video filter

Stefano Sabatini stefano.sabatini-lala at poste.it
Wed Apr 6 00:32:21 CEST 2011


On date Tuesday 2011-04-05 22:52:01 +0100, Mark Himsley encoded:
> On 03/04/2011 22:21, Mark Himsley wrote:
> > On 03/04/2011 15:21, Stefano Sabatini wrote:
> >> On date Friday 2011-04-01 19:31:41 +0100, Mark Himsley encoded:
> >>> On 31/03/11 15:15, Stefano Sabatini wrote:
> >>>> On date Thursday 2011-03-31 08:47:38 +0100, Mark Himsley encoded:
> >>>>> Second version of this filter. Renamed and updated from the
> >>>>> suggestions given for the first version.
> 
> [...]
> 
> >>> +    /** discover the bytes per pixel for each plane */
> >>> +    if (is_packed) {
> >>> +        fieldorder->line_step[0] = av_get_bits_per_pixel(&av_pix_fmt_descriptors[inlink->format])>>3;
> >>> +    } else {
> 
> Sorry - I've also noticed that getting the bytes per pixel with
> av_get_bits_per_pixel(&av_pix_fmt_descriptors[inlink->format])>>3 is not
> accurate for the rgb444 or rgb555 formats. I'm just contemplating the
> best thing to do, which has delayed me a little. I'll be back with an
> updated patch soon.

As I suggested, av_image_fill_max_pixsteps() may help. And if we want
to be sure not to break the filters when some new format is added,
just enumerates the working filters in query_formats().
-- 
FFmpeg = Fancy and Freak Mournful Powerful EniGma


More information about the ffmpeg-devel mailing list