This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kdenlive Git is broken

Tags: None
(comma "," separated)
lockheed
Registered Member
Posts
2
Karma
0

Kdenlive Git is broken

Thu Feb 20, 2014 8:16 pm
I think there is an error in the code of the git package that makes it not compile.

It is in the VDPAU section:
Code: Select all
if ( ( image_size = allocate_buffer( frame, codec_context, buffer, format, width, height ) ) )
    {
    // Workaround 1088 encodings missing cropping info.
    if ( *height == 1088 && mlt_profile_dar( mlt_service_profile( MLT_PRODUCER_SERVICE( producer ) ) ) == 16.0/9.0 )
        *height = 1080;
   
#ifdef VDPAU
    if ( self->vdpau && self->vdpau->buffer )
    {
        AVPicture picture;
        picture.data[0] = self->vdpau->buffer;
        picture.data[2] = self->vdpau->buffer + codec_context->width * codec_context->height;
        picture.data[1] = self->vdpau->buffer + codec_context->width * codec_context->height * 5 / 4;
        picture.linesize[0] = codec_context->width;
        picture.linesize[1] = codec_context->width / 2;
        picture.linesize[2] = codec_context->width / 2;
        int yuv_colorspace = convert_image( self, (AVFrame*) &picture, *buffer,
        PIX_FMT_YUV420P, format, *width, *height, &alpha );
        mlt_properties_set_int( frame_properties, "colorspace", yuv_colorspace );
    }
    else
#endif

    int yuv_colorspace = convert_image( self, self->video_frame, *buffer, codec_context->pix_fmt,
        format, *width, *height, &alpha );
    mlt_properties_set_int( frame_properties, "colorspace", yuv_colorspace );
    got_picture = 1;
}

As you can see there is an ifdef for VDPAU. If the ifdef'ed code is compiled, the yuv_colorspace line after the #endif will be part of the else-branch. As there are no braces for the else-branch though, the following lines won't compile as yuv_colorspace is defined inside the else-branch, the following lines are outside of it though.

Could someone fix that?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Kdenlive Git is broken

Sat Feb 22, 2014 12:27 am
If you have a patch which fixes the compilation of Kdenlive, you may wish to submit this on Reviewboard: https://reviewboard.kde.org/


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
lockheed
Registered Member
Posts
2
Karma
0

Re: Kdenlive Git is broken

Sat Feb 22, 2014 8:24 am
I'm afraid I am not sufficiently skilled in coding to fix that. I am just signalling the problem, and since I found no bug-tracker for kdenlive, I had to do it here.
User avatar
Steve Guilford
Registered Member
Posts
207
Karma
0

Re: Kdenlive Git is broken

Sun Feb 23, 2014 4:53 pm
lockheed wrote:I'm afraid I am not sufficiently skilled in coding to fix that. I am just signalling the problem, and since I found no bug-tracker for kdenlive, I had to do it here.

All you have to do is move the declaration of yuv_colorspace so that it outside of the #ifdef statment. The easy fix will have the code looking as such:

Code: Select all
   int yuv_colorspace;
    #ifdef VDPAU
    if ( self->vdpau && self->vdpau->buffer )
    {
        AVPicture picture;
        picture.data[0] = self->vdpau->buffer;
        picture.data[2] = self->vdpau->buffer + codec_context->width * codec_context->height;
        picture.data[1] = self->vdpau->buffer + codec_context->width * codec_context->height * 5 / 4;
        picture.linesize[0] = codec_context->width;
        picture.linesize[1] = codec_context->width / 2;
        picture.linesize[2] = codec_context->width / 2;
        int yuv_colorspace = convert_image( self, (AVFrame*) &picture, *buffer,
        PIX_FMT_YUV420P, format, *width, *height, &alpha );
        mlt_properties_set_int( frame_properties, "colorspace", yuv_colorspace );
    }
    else
#endif

   yuv_colorspace = convert_image( self, self->video_frame, *buffer, codec_context->pix_fmt,
        format, *width, *height, &alpha );
 
    mlt_properties_set_int( frame_properties, "colorspace", yuv_colorspace );
    got_picture = 1;
}
ddennedy
Registered Member
Posts
1315
Karma
1

Re: Kdenlive Git is broken

Mon Mar 31, 2014 1:10 am
That is not KDE code; it is MLT. I just fixed it.




Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], Sogou [Bot]