[FFmpeg-devel] [PATCH 1/3] avcodec/agm: add support for higher compression

Michael Niedermayer michael at niedermayer.cc
Sun Apr 21 11:37:58 EEST 2019


On Sun, Apr 21, 2019 at 08:50:04AM +0200, Paul B Mahol wrote:
> On 4/21/19, Michael Niedermayer <michael at niedermayer.cc> wrote:
> > On Wed, Apr 10, 2019 at 01:45:51PM +0200, Paul B Mahol wrote:
> >> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> >> ---
> >>  libavcodec/agm.c   | 404 +++++++++++++++++++++++++++++++++++++++++++--
> >>  libavformat/riff.c |   4 +
> >>  2 files changed, 392 insertions(+), 16 deletions(-)
> > [...]
> >> @@ -509,6 +861,7 @@ static int decode_frame(AVCodecContext *avctx, void
> >> *data,
> >>      GetByteContext *gbyte = &s->gbyte;
> >>      AVFrame *frame = data;
> >>      int w, h, width, height, header;
> >> +    unsigned compressed_size;
> >>      int ret;
> >>
> >>      if (!avpkt->size)
> >> @@ -524,13 +877,19 @@ static int decode_frame(AVCodecContext *avctx, void
> >> *data,
> >>      if (avpkt->size < s->bitstream_size + 8)
> >>          return AVERROR_INVALIDDATA;
> >>
> >> -    s->key_frame = s->fflags & 0x1;
> >> +    s->key_frame = avpkt->flags & AV_PKT_FLAG_KEY;
> >>      frame->key_frame = s->key_frame;
> >>      frame->pict_type = s->key_frame ? AV_PICTURE_TYPE_I :
> >> AV_PICTURE_TYPE_P;
> >>
> >>      if (header) {
> >> -        av_log(avctx, AV_LOG_ERROR, "header: %X\n", header);
> >> -        return AVERROR_PATCHWELCOME;
> >> +        if (avctx->codec_tag == MKTAG('A', 'G', 'M', '0') ||
> >> +            avctx->codec_tag == MKTAG('A', 'G', 'M', '1'))
> >> +            return AVERROR_PATCHWELCOME;
> >> +        else
> >
> >> +            ret = decode_huffman2(avctx, header, (avpkt->size -
> >> s->bitstream_size) - 8);
> >
> > where can i find samples for this ?
> > i need to fix some bugs in this as it produces crashes but i have
> > no samples to test to ensure a fix doesnt break anything
> 
> Just post patches, I will take care of rest.

will do, but it still would be usefull to have samples to test
i only have sg6-.agm / sg6o.agm which dont trigger this path

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Does the universe only have a finite lifespan? No, its going to go on
forever, its just that you wont like living in it. -- Hiranya Peiri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190421/714b467d/attachment.sig>


More information about the ffmpeg-devel mailing list