示例#1
0
bool StreamFieldInput::ReadNextPicture(Picture& mypic)
{
    // FIXME: this method is BROKEN!

    //return value. Failure if one of the components can't be read,
    //success otherwise/.

    bool ret_val;

    bool is_field1 = ((mypic.GetPparams().PictureNum()%2) == 0);
    ret_val=ReadFieldComponent( is_field1, mypic.Data(Y_COMP), Y_COMP);
    ret_val&=ReadFieldComponent(is_field1, mypic.Data(U_COMP), U_COMP);
    ret_val&=ReadFieldComponent(is_field1, mypic.Data(V_COMP), V_COMP);

    int picture_size = m_sparams.Xl()*m_sparams.Yl() +
                    2*m_sparams.ChromaWidth()*m_sparams.ChromaHeight();
    if (is_field1)
    {
        //Seek back to the beginning of frame so that the next field
        //from the frame can be read
        m_ip_pic_ptr->seekg (-picture_size, std::ios::cur);
    }

    return ret_val;
}
示例#2
0
bool StreamFrameOutput::WriteToNextFrame( const Picture& myframe )
{
    bool ret_val;

    ret_val=WriteFrameComponent(myframe.Data(Y_COMP), Y_COMP );
    ret_val&=WriteFrameComponent( myframe.Data(U_COMP), U_COMP );
    ret_val&=WriteFrameComponent( myframe.Data(V_COMP), V_COMP );

    return ret_val;
}
示例#3
0
bool StreamFieldOutput::WriteToNextFrame( const Picture& myfield )
{
    bool ret_val;

    ret_val=WriteFieldComponent(myfield.Data(Y_COMP) , myfield.GetPparams().PictureNum(), Y_COMP );
    ret_val&=WriteFieldComponent(myfield.Data(U_COMP) , myfield.GetPparams().PictureNum(), U_COMP );
    ret_val&=WriteFieldComponent(myfield.Data(V_COMP) , myfield.GetPparams().PictureNum(), V_COMP );

    return ret_val;
}
示例#4
0
bool StreamFieldInput::ReadNextFrame(Picture& field1, Picture& field2)
{
    //return value. Failure if one of the components can't be read,
    //success otherwise/.

    bool ret_val = false;

    ret_val=ReadFieldComponent( field1.Data(Y_COMP), field2.Data(Y_COMP), Y_COMP);
    ret_val&=ReadFieldComponent(field1.Data(U_COMP), field2.Data(U_COMP), U_COMP);
    ret_val&=ReadFieldComponent(field1.Data(V_COMP), field2.Data(V_COMP), V_COMP);
    
    return ret_val;
}
示例#5
0
bool StreamFrameInput::ReadNextPicture(Picture& myframe)
{
    //return value. Failure if one of the components can't be read,
    //success otherwise/.

    bool ret_val;

    ret_val=ReadFrameComponent( myframe.Data(Y_COMP) , Y_COMP);
    ret_val&=ReadFrameComponent(myframe.Data(U_COMP) , U_COMP);
    ret_val&=ReadFrameComponent(myframe.Data(V_COMP) , V_COMP);

    return ret_val;
}
示例#6
0
void dirac::CWMFilter( Picture& picture, const int strength )
{
    CWMFilterComponent( picture.Data(Y_COMP), strength );
    CWMFilterComponent( picture.Data(U_COMP), strength );
    CWMFilterComponent( picture.Data(V_COMP), strength );
}