[FFmpeg-devel] [PATCH 1/3] avcodec/agm: add support for higher compression
Michael Niedermayer
michael at niedermayer.cc
Sun Apr 21 01:16:56 EEST 2019
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
Thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Whats the most studid thing your enemy could do ? Blow himself up
Whats the most studid thing you could do ? Give up your rights and
freedom because your enemy blew himself up.
-------------- 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/a8736b77/attachment.sig>
More information about the ffmpeg-devel
mailing list