[FFmpeg-devel] [PATCH]Fix 2bpp and 4bpp rawvideo in mov
Paul B Mahol
onemda at gmail.com
Wed Jun 12 19:06:58 CEST 2013
On 6/12/13, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Wed, Jun 12, 2013 at 03:35:16PM +0000, Paul B Mahol wrote:
>> On 6/12/13, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > On Mon, May 06, 2013 at 01:51:58AM +0200, Carl Eugen Hoyos wrote:
>> >> Hi!
>> >> Attached patch fixes ticket #2536 for me.
>> >> Please comment, Carl Eugen
>> >> rawdec.c | 2 +-
>> >> 1 file changed, 1 insertion(+), 1 deletion(-)
>> >> 50ee1f5ea2e8873e0e767a63d5083e1b9fd09e46 patch2_4bppmov.diff
>> >> diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
>> >> index f45ff4c..ae920c5 100644
>> >> --- a/libavcodec/rawdec.c
>> >> +++ b/libavcodec/rawdec.c
>> >> @@ -133,7 +133,7 @@ static av_cold int raw_init_decoder(AVCodecContext
>> >> *avctx)
>> >> memset(context->palette->data, 0, AVPALETTE_SIZE);
>> >> }
>> >> - context->frame_size = avpicture_get_size(avctx->pix_fmt,
>> >> avctx->width,
>> >> + context->frame_size = avpicture_get_size(avctx->pix_fmt,
>> >> FFALIGN(avctx->width, 16),
>> >> avctx->height);
>> > if 16 is correct for all pixel formats then ok with a commit message
>> > mentioning that frame_size is fixed
>> Isn't it actually bug in avpicture_get_size ?
> Hmm, the doxy says
> "Always assume a linesize alignment of 1."
> so i dont know
Hmm i agree with you, this patch should be fine if it does not break
created with older (not one with this patch applied) ffmpegs.
I suspect that it may break stuff stuff as encoder currently writes
images with alignment of 1.
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> I am the wisest man alive, for I know one thing, and that is that I know
> nothing. -- Socrates
More information about the ffmpeg-devel