struttura DXVAHDDDI_STREAM_DATA (d3dumddi.h)
La struttura DXVAHDDDI_STREAM_DATA descrive un flusso di input elaborato.
Sintassi
typedef struct _DXVAHDDDI_STREAM_DATA {
[in] BOOL Enable;
[in] UINT OutputIndex;
[in] UINT InputFrameOrField;
[in] UINT PastFrames;
[in] UINT FutureFrames;
[in] DXVAHDDDI_SURFACE *pPastSurfaces;
[in] DXVAHDDDI_SURFACE InputSurface;
[in] DXVAHDDDI_SURFACE *pFutureSurfaces;
} DXVAHDDDI_STREAM_DATA;
Membri
[in] Enable
Valore booleano che specifica se il flusso di input è abilitato. Il numero di flussi di input che il runtime abilita non deve essere maggiore del numero impostato dal driver nel MaxStreamStates membro della struttura DXVAHDDDI_VPDEVCAPS.
[in] OutputIndex
Numero di indice dei fotogrammi ciclici in base zero dei fotogrammi di output composti.
[in] InputFrameOrField
Numero di fotogrammi in base zero dei fotogrammi di input o dei campi elaborati.
[in] PastFrames
Numero di frame di riferimento precedenti. Questo numero non deve essere maggiore del numero impostato dal driver nel PastFrames membro della struttura DXVAHDDDI_VPCAPS.
[in] FutureFrames
Numero di frame di riferimento futuri. Questo numero non deve essere maggiore del numero impostato dal driver nel FutureFrames membro della struttura DXVAHDDDI_VPCAPS.
[in] pPastSurfaces
Matrice di strutture DXVAHDDDI_SURFACE che descrivono le superfici di riferimento precedenti.
[in] InputSurface
Struttura DXVAHDDDI_SURFACE che descrive la superficie di input.
[in] pFutureSurfaces
Matrice di strutture DXVAHDDDI_SURFACE che descrivono le superfici di riferimento future.
Osservazioni
Il driver deve allocare le superfici pPastSurfaces, InputSurfacee membri di pFutureSurfaces specificati nel tipo di pool, che il driver imposta nel membro InputPool della struttura DXVAHDDDI_VPDEVCAPS e con uno dei tipi di superficie seguenti; in caso contrario, la funzione VideoProcessBltHD del driver restituisce un errore.
- Superficie video creata con il tipo DXVAHD_SURFACE_TYPE_VIDEO_INPUT o DXVAHD_SURFACE_TYPE_VIDEO_INPUT_PRIVATE.
- Superficie di destinazione di rendering decodifica creata con il tipo di DXVA2_VideoDecodeRenderTarget.
- Superficie normale fuori schermo.
-
Formato progressivo a velocità normale e mezza:
OutputIndex = 0, 0,...
-
Formato progressivo a 2/1 frequenza personalizzata (conversione a frequenza doppia dei fotogrammi, OutputFrames=2):
OutputIndex = 0, 1, 0, 1,...
-
Formato interlacciato a velocità normale:
OutputIndex = 0, 1, 0, 1,... (0: primo campo, 1: secondo campo)
-
Formato interlacciato a metà velocità:
OutputIndex = 0, 0,... (ad esempio, i campi primo e secondo vengono mescolati a un frame)
-
Interlacciato a 4/5 velocità personalizzata (3:2 telecine inversa, OutputFrames=4):
OutputIndex = 0, 1, 2, 3, 0, 1, 2, 3,... (0:A, 1:B, 2:C, 3:D film frame)
-
Formato progressivo e formato interlacciato a velocità normale:
InputFrameOrField = 0, 1, 2,...
-
Formato progressivo e formato interlacciato a metà velocità:
InputFrameOrField = 0, 2, 4,...
-
Formato interlacciato a 4/5 velocità personalizzata (3:2 telecine inversa, OutputFrames=4 e InputFrameOrField=10):
InputFrameOrField = 0, 0, 0, 0, 10, 10, 10, 10, 10, 20, 20, 20,...
-
Formato interlacciato a velocità personalizzata 4/15 (telecine inversa 8:7, OutputFrames=2 e InputFrameOrField=15):
InputFrameOrField = 0, 0, 15, 15, 30, 30,...
Tuttavia, se il driver passa tra la frequenza normale e la metà (valori dell'enumerazione DXVAHDDDI_OUTPUT_RATE), il driver non deve richiedere la reimpostazione.
Se entrambi i membri OutputIndex e InputFrameOrField rimangono invariati al successivo processo, il driver determina che il fotogramma è invariato (ad esempio, sospeso) nell'elaborazione del flusso. Pertanto, il driver può ottimizzare il frame usando i dati memorizzati nella cache.
Il driver deve eseguire il fallback a un metodo di elaborazione video meno intensivo, perché vengono forniti meno fotogrammi di riferimento. Il driver deve eseguire il fallback a Bob de-interlacciamento quando non vengono forniti esempi di riferimento.
Un'applicazione può fornire meno frame di riferimento passati e futuri rispetto ai frame di riferimento che il driver richiede. Ad esempio, un'applicazione può fornire meno frame di riferimento nelle condizioni seguenti:
- All'inizio o alla fine della sequenza di fotogrammi.
- Transizione tra progressivo e interlacciato.
- Flusso progressivo normale o mezzo.
- Flussi video secondari che non richiedono l'interlacciamento di alta qualità.
- Durante la limitazione dei fotogrammi di riferimento per il ripristino dalle cadute dei fotogrammi e per mantenere la frequenza dei fotogrammi.
- Fotogramma che rilascia dall'input (ad esempio, il fotogramma scende nel decodificatore).
pPastSurfaces [] = {..., T-3, T-2, T-1}
InputSurface = T
pFutureSurfaces [] = {T+1, T+2, T+3,...}
I fotogrammi di input e riferimento cambiano la posizione dalla posizione futura alla posizione precedente attraverso la posizione corrente come OutputIndex e InputFrameOrField membri incrementano. Ad esempio, la superficie di input cambia come OutputIndex e InputFrameOrField incremento quando il driver esegue l'elaborazione video seguente:
-
Formato progressivo a velocità normale:
OutputIndex = 0, 0, 0,...
InputFrameOrField = 0, 1, 2,...
InputSurface = T, T+1, T+2,...
-
Formato interlacciato a velocità normale:
OutputIndex = 0, 1, 0, 1, 0, 1,...
InputFrameOrField = 0, 1, 2, 3, 4, 5,...
InputSurface = T, T, T+1, T+1, T+2, T+2,...
-
Formato interlacciato a metà velocità:
OutputIndex = 0, 0, 0,...
InputFrameOrField = 0, 2, 4,...
InputSurface = T, T+1, T+2,...
-
Formato interlacciato a 4/5 velocità personalizzata (3:2 telecine inversa, OutputFrames=4 e InputFrameOrField=10):
OutputIndex = 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,...
InputFrameOrField = 0, 0, 0, 0, 10, 10, 10, 10, 10, 20, 20, 20,...
InputSurface = T, T, T, T, T+5, T+5, T+5, T+5, T+10, T+10, T+10, T+10,...
-
Formato interlacciato a velocità personalizzata 4/15 (telecine inversa 8:7, OutputFrames=2 e InputFrameOrField=15):
OutputIndex = 0, 1, 0, 1, 0, 1,...
InputFrameOrField = 0, 0, 15, 15, 30, 30,...
InputSurface = T, T, T+7, T+7, T+15, T+15,... (si noti che T+7 frame contiene 15° campo)
-[60i -> 60p]
DRV: VPGuid[0] requests 1 past and 2 future reference frames.
APP: Creates VPGuid[0] video processor and set output rate to normal.
APP: Decodes frame 0(A0:A1), 1(A0:B1), 2(B0:C1), 3(C0:C1), 4(D0:D1), ...
:
-APP: VPBltHD(frame x, 0, 1, 2), InputFrameOrField=0, OutputIndex=0
DRV: Bob [0(A0)+0(A1)] = A'
-APP: VPBltHD(frame x, 0, 1, 2), InputFrameOrField=1, OutputIndex=1
DRV: Weave [0(A1)+1(A0)] = A
-APP: VPBltHD(frame 0, 1, 2, 3), InputFrameOrField=2, OutputIndex=0
DRV: Weave [1(A0)+0(A1)] = A
-APP: VPBltHD(frame 0, 1, 2, 3), InputFrameOrField=3, OutputIndex=1
DRV: Weave [1(B1)+2(B0)] = B
-APP: VPBltHD(frame 1, 2, 3, 4), InputFrameOrField=4, OutputIndex=0
DRV: Weave [2(B0)+1(B1)] = B
-APP: VPBltHD(frame 1, 2, 3, 4), InputFrameOrField=5, OutputIndex=1
DRV: Weave [2(C1)+3(C0)] = C
-APP: VPBltHD(frame 2, 3, 4, 5), InputFrameOrField=6, OutputIndex=0
DRV: Weave [3(C0)+3(C1)] = C
-APP: VPBltHD(frame 2, 3, 4, 5), InputFrameOrField=7, OutputIndex=1
DRV: Weave [3(C1)+3(C0)] = C
-APP: VPBltHD(frame 3, 4, 5, 6), InputFrameOrField=8, OutputIndex=0
DRV: Weave [4(D0)+4(D1)] = D
-APP: VPBltHD(frame 3, 4, 5, 6), InputFrameOrField=9, OutputIndex=1
DRV: Weave [4(D1)+4(D0)] = D
:
-[60i -> 24p]
DRV: VPGuid[1] requests 4 future reference frames.
DRV: Exports CustomRate=4/5, OutputFrames=4, InputInterlaced=TRUE, InputFramesOrFields=10.
APP: Creates VPGuid[1] video processor and set output rate to 4/5 custom rate.
-APP: VPBltHD(frame 0, 1, 2, 3, 4), InputFrameOrField=0, OutputIndex=0
DRV: Bob [0(A0)+0(A1)] = A' (playback or speed mode) or Weave [0(A0)+0(A1)] = A (quality mode)
-APP: VPBltHD(frame 0, 1, 2, 3, 4), InputFrameOrField=0, OutputIndex=1
DRV: Weave [1(B1)+2(B0)] = B
-APP: VPBltHD(frame 0, 1, 2, 3, 4), InputFrameOrField=0, OutputIndex=2
DRV: Weave [3(C0)+3(C1)] = C
-APP: VPBltHD(frame 0, 1, 2, 3, 4), InputFrameOrField=0, OutputIndex=3
DRV: Weave [4(D0)+4(D1)] = D
-APP: VPBltHD(frame 5, 6, 7, 8, 9), InputFrameOrField=10, OutputIndex=0
DRV: Weave [0(A0)+0(A1)] = A
:
Fabbisogno
Requisito | Valore |
---|---|
client minimo supportato | DXVAHDDDI_STREAM_DATA è supportato a partire dal sistema operativo Windows 7. |
intestazione | d3dumddi.h (include D3dumddi.h) |
Vedere anche
DXVAHDDDI_STREAM_STATE_FRAME_FORMAT_DATA