[FFmpeg-devel] [PATCH] Increase ffmpeg video encoding buffer size to permit encoding of DPX images
Peter Ross
pross at xvid.org
Mon Mar 28 14:08:25 CEST 2011
The header generated by the DPX encoder is 0x680 bytes.
---
On Sat, Mar 26, 2011 at 08:54:11AM +0100, Reimar Döffinger wrote:
>
>
> On 26 Mar 2011, at 08:02, Peter Ross <pross at xvid.org> wrote:
>
> > The header generated by the DPX encoder is 0x680 bytes.
> > ---
> > ffmpeg.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/ffmpeg.c b/ffmpeg.c
> > index 6f74e61..f0f6f50 100644
> > --- a/ffmpeg.c
> > +++ b/ffmpeg.c
> > @@ -2243,7 +2243,7 @@ static int transcode(AVFormatContext **output_files,
> > }
> > if(codec->codec_type == AVMEDIA_TYPE_VIDEO){
> > int size= codec->width * codec->height;
> > - bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 200);
> > + bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 0x680);
>
> Should probably add a comment saying where the numbers come from.
Done.
ffmpeg.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 50cda1a..0687544 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2248,8 +2248,9 @@ static int transcode(AVFormatContext **output_files,
}
}
if(codec->codec_type == AVMEDIA_TYPE_VIDEO){
+ /* maximum video buffer size is 6-bytes per pixel, plus DPX header size */
int size= codec->width * codec->height;
- bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 200);
+ bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 0x680);
}
}
--
1.7.4.1
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110328/67152267/attachment.asc>
More information about the ffmpeg-devel
mailing list