문제

해야합니다 버퍼 오프셋 u & v in의 가치 YUV444 형식 유형?

YV12 형식을 사용하는 경우 예를 들어 값은 다음과 같습니다.

ppdata.inputidmachannel.ubufoffset = iinputheight * iinputwidth + (iinputheight * iinputwidth)/4; ppdata.inputidmachannel.vbufoffset = iinputheight * iinputwidth;

iinputheight = 160 & iinputwidth = 112

ppdata는 다음 구조의 객체입니다.

    typedef struct ppConfigDataStruct
{
    //---------------------------------------------------------------
    // General controls
    //---------------------------------------------------------------
    UINT8         IntType;    
                  //    FIRSTMODULE_INTERRUPT: the interrupt will be 
                  //    rised once the first sub-module finished its job.
                  //    FRAME_INTERRUPT:   the interrput will be rised 
                  //    after all sub-modules finished their jobs.
    //---------------------------------------------------------------
    // Format controls
    //---------------------------------------------------------------

    // For input
    idmaChannel     inputIDMAChannel;

    BOOL            bCombineEnable;
    idmaChannel     inputcombIDMAChannel;
    UINT8           inputcombAlpha;
    UINT32          inputcombColorkey;

    icAlphaType     alphaType;

    // For output
    idmaChannel     outputIDMAChannel;
    CSCEQUATION  CSCEquation;    // Selects R2Y or Y2R CSC Equation
    icCSCCoeffs     CSCCoeffs;      // Selects R2Y or Y2R CSC Equation
    icFlipRot          FlipRot;        // Flip/Rotate controls for VF
    BOOL    allowNopPP;   // flag to indicate we need a NOP PP processing

}*pPpConfigData, ppConfigData;

Idmachannel 구조는 다음과 같습니다.

 typedef struct idmaChannelStruct
{
    icFormat       FrameFormat;  // YUV or RGB
    icFrameSize    FrameSize;  //  frame size
    UINT32         LineStride;//  stride in bytes
    icPixelFormat  PixelFormat;// Input frame RGB format, set NULL 
                                    // to use standard settings.
    icDataWidth    DataWidth;// Bits per pixel for RGB format
    UINT32    UBufOffset;// offset of U buffer from Y buffer start address
                            // ignored if non-planar image format
    UINT32    VBufOffset;// offset of U buffer from Y buffer start address
                            // ignored if non-planar image format    
} idmaChannel, *pIdmaChannel;

나는 공식을 원한다 ppdata.inputidmachannel.ubufoffset & ppdata.inputidmachannel.vbufoffset ~을 위한 YUV444

미리 감사드립니다

도움이 되었습니까?

해결책 2

yuv444는 픽셀 당 24 비트로 구성되므로

따라서 U & V 버퍼 오프셋이됩니다

ppData.inputIDMAChannel.UBufOffset = iInputHeight * iInputWidth;
ppData.inputIDMAChannel.VBufOffset = 2 * iInputHeight * iInputWidth;

다른 팁

YUV444가 구성 요소 당 8 비트를 사용한다는 점을 감안할 때, 공식은 간단해야한다고 생각합니다.

ppData.inputIDMAChannel.UBufOffset = 2 * iInputHeight * iInputWidth;
ppData.inputIDMAChannel.VBufOffset = iInputHeight * iInputWidth;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top