[FFmpeg-devel] [PATCH] FFplay : Copy all AVFrame fields from the refernce picture to the requested buffer.
Jai Menon
jmenon86
Sat Jul 3 23:21:03 CEST 2010
On Sun, Jul 4, 2010 at 2:42 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sun, Jul 04, 2010 at 02:02:05AM +0530, Jai Menon wrote:
>> On Sun, Jul 4, 2010 at 12:53 AM, Stefano Sabatini
>> <stefano.sabatini-lala at poste.it> wrote:
>> > On date Saturday 2010-07-03 23:48:56 +0530, Jai Menon encoded:
>> >> On Sat, Jul 3, 2010 at 11:21 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> >> > On Sat, Jul 03, 2010 at 11:01:47PM +0530, Jai Menon wrote:
>> >> >> Currently, the code assumes 3 planes and crashes whenever pixfmts requiring more planes are used.
>> >> >> ---
>> >> >> ?ffplay.c | ? ?2 +-
>> >> >> ?1 files changed, 1 insertions(+), 1 deletions(-)
>> >> >>
>> >> >> diff --git a/ffplay.c b/ffplay.c
>> >> >> index a43dbb1..d254296 100644
>> >> >> --- a/ffplay.c
>> >> >> +++ b/ffplay.c
>> >> >> @@ -1591,7 +1591,7 @@ static int input_get_buffer(AVCodecContext *codec, AVFrame *pic)
>> >> >>
>> >> >> ? ? ?ref->w = codec->width;
>> >> >> ? ? ?ref->h = codec->height;
>> >> >> - ? ?for(i = 0; i < 3; i ++) {
>> >> >> + ? ?for(i = 0; i < 4; i ++) {
>> >> >
>> >> >> ? ? ? ? ?unsigned hshift = i == 0 ? 0 : av_pix_fmt_descriptors[ref->pic->format].log2_chroma_w;
>> >> >> ? ? ? ? ?unsigned vshift = i == 0 ? 0 : av_pix_fmt_descriptors[ref->pic->format].log2_chroma_h;
>> >> >
>> >> > these dont look like they are correct for 4 planes
>> >>
>> >> i'm not sure i understand. the only pixfmt which requires this right
>> >> now is yuva420p and that seems have a av_pixfmt_descriptors entry with
>> >> correct values.
>> >
>> > hshift and vshift should be set to 0 for the alpha plane, chroma
>> > subsampling is only used for the plane 1 and 2.
>>
>> yeah, i misread the code and thought that those were set only for chroma :|
>> attached should be better.
>>
>> --
>> Jai Menon
>
>> ?ffplay.c | ? ?6 +++---
>> ?1 file changed, 3 insertions(+), 3 deletions(-)
>> 8c8b227fd773023afe3eb0ebcb7214f30524f0d6 ?ffplay-alpha-fix.diff
>
> ok
thanks, applied.
--
Jai Menon
More information about the ffmpeg-devel
mailing list