[FFmpeg-devel] [PATCH] lavf/img2dec: add ppm pipe demuxer

Clément Bœsch u at pkh.me
Fri Jun 10 15:34:28 CEST 2016


On Fri, Jun 10, 2016 at 04:28:55AM +0200, Michael Niedermayer wrote:
> On Thu, Jun 09, 2016 at 04:35:02PM +0200, Clément Bœsch wrote:
> > On Thu, Jun 09, 2016 at 03:59:30PM +0200, Clément Bœsch wrote:
> > > On Thu, Jun 09, 2016 at 01:35:19PM +0000, Carl Eugen Hoyos wrote:
> > > > Clément Bœsch <u <at> pkh.me> writes:
> > > > 
> > > > > +            if (b[3] == '#')
> > > > > +                return AVPROBE_SCORE_EXTENSION + 1;
> > > > > +            if (b[3] >= '0' && b[3] <= '9')
> > > > > +                return AVPROBE_SCORE_MAX - 1;
> > > > 
> > > > Imo, this should be:
> > > > if (b[3] == '#' || (b[3] >= '0' && b[3] <= '9'))
> > > >   return AVPROBE_SCORE_EXTENSION + 2;
> > > > or similar
> > > > 
> > > > I count 37 and 34 bits which is only a little more than 
> > > > the usual 32 bit for EXTENSION + 1.
> > > > 
> > > 
> > > Sure. Changed locally, will push soon, thanks.
> > > 
> > 
> > For some reasons it makes seeking with pgm somehow working. The reference
> > test doesn't look that great IIUC, but seeking in these file with ffplay
> > is fine AFAICT.
> 
> it seems it messes with pgmyuv detection (which i think was filename extension based)
> 
> example:
> ./ffmpeg -i matrixbench_mpeg2.mpg -pix_fmt yuv420p16be -vframes 1 test.pgmyuv
> ./ffplay-ref test.pgmyuv
> Input #0, image2, from 'test.pgmyuv':B vq=    0KB sq=    0B f=0/0
>   Duration: 00:00:00.04, start: 0.000000, bitrate: 248835 kb/s
>     Stream #0:0: Video: pgmyuv, yuv420p16le, 720x576, 25 tbr, 25 tbn
> 
> ./ffplay test.pgmyuv
> Input #0, ppm_pipe, from 'test.pgmyuv':vq=    0KB sq=    0B f=0/0
>   Duration: N/A, bitrate: N/A
>     Stream #0:0: Video: ppm, gray16le, 720x864, 25 tbr, 25 tbn, 25 tbc
> 

Yes, this is a good thing (same thing happens if you s/pgmyuv/png/).

I now realize I forgot to attach the diff, so new patch attached.

So the question is: are the FATE changes that affect the "pipe" tests OK?

Playback and seeking in tests/data/lavf/{pbmpipe.pbm,ppmpipe.ppm,
pgmpipe.pgm} now looks OK but the seek ref tests looks odd to me.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-img2dec-add-ppm-pipe-demuxer.patch
Type: text/x-diff
Size: 12127 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160610/27173575/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160610/27173575/attachment.sig>


More information about the ffmpeg-devel mailing list