[FFmpeg-devel] [PATCH 1/3] avcodec/agm: add support for higher compression
Paul B Mahol
onemda at gmail.com
Sun Apr 21 09:50:04 EEST 2019
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.
More information about the ffmpeg-devel
mailing list