NAME

glSeparableFilter2D - define a separable two-dimensional convolution filter

C SPECIFICATION

void ggllSSeeppaarraabblleeFFiilltteerr22DD( GLenum _t_a_r_g_e_t,
                          GLenum _i_n_t_e_r_n_a_l_f_o_r_m_a_t,
                          GLsizei _w_i_d_t_h,
                          GLsizei _h_e_i_g_h_t,
                          GLenum _f_o_r_m_a_t,
                          GLenum _t_y_p_e,
                          const GLvoid _*_r_o_w,
                          const GLvoid _*_c_o_l_u_m_n )

PARAMETERS

_t_a_r_g_e_t
Must be GGLL__SSEEPPAARRAABBLLEE__22DD.
_i_n_t_e_r_n_a_l_f_o_r_m_a_t
The internal of the convolution filter kernel. The allowable values are GGLL__AALLPPHHAA, GGLL__AALLPPHHAA44, GGLL__AALLPPHHAA88, GGLL__AALLPPHHAA1122, GGLL__AALLPPHHAA1166, GGLL__LLUUMMIINNAANNCCEE, GGLL__LLUUMMIINNAANNCCEE44, GGLL__LLUUMMIINNAANNCCEE88, GGLL__LLUUMMIINNAANNCCEE1122, GGLL__LLUUMMIINNAANNCCEE1166, GGLL__LLUUMMIINNAANNCCEE__AALLPPHHAA, GGLL__LLUUMMIINNAANNCCEE44__AALLPPHHAA44, GGLL__LLUUMMIINNAANNCCEE66__AALLPPHHAA22, GGLL__LLUUMMIINNAANNCCEE88__AALLPPHHAA88, GGLL__LLUUMMIINNAANNCCEE1122__AALLPPHHAA44, GGLL__LLUUMMIINNAANNCCEE1122__AALLPPHHAA1122, GGLL__LLUUMMIINNAANNCCEE1166__AALLPPHHAA1166, GGLL__IINNTTEENNSSIITTYY, GGLL__IINNTTEENNSSIITTYY44, GGLL__IINNTTEENNSSIITTYY88, GGLL__IINNTTEENNSSIITTYY1122, GGLL__IINNTTEENNSSIITTYY1166, GGLL__RR33__GG33__BB22, GGLL__RRGGBB, GGLL__RRGGBB44, GGLL__RRGGBB55, GGLL__RRGGBB88, GGLL__RRGGBB1100, GGLL__RRGGBB1122, GGLL__RRGGBB1166, GGLL__RRGGBBAA, GGLL__RRGGBBAA22, GGLL__RRGGBBAA44, GGLL__RRGGBB55__AA11, GGLL__RRGGBBAA88, GGLL__RRGGBB1100__AA22, GGLL__RRGGBBAA1122, or GGLL__RRGGBBAA1166.
_w_i_d_t_h
The number of elements in the pixel array referenced by _r_o_w. (This is the width of the separable filter kernel.)
_h_e_i_g_h_t
The number of elements in the pixel array referenced by _c_o_l_u_m_n. (This is the height of the separable filter kernel.)
_f_o_r_m_a_t
The of the pixel data in _r_o_w and _c_o_l_u_m_n. The allowable values are GGLL__RREEDD, GGLL__GGRREEEENN, GGLL__BBLLUUEE, GGLL__AALLPPHHAA, GGLL__RRGGBB, GGLL__BBGGRR, GGLL__RRGGBBAA, GGLL__BBGGRRAA, GGLL__IINNTTEENNSSIITTYY, GGLL__LLUUMMIINNAANNCCEE, and GGLL__LLUUMMIINNAANNCCEE__AALLPPHHAA.
_t_y_p_e
The type of the pixel data in _r_o_w and _c_o_l_u_m_n. Symbolic constants GGLL__UUNNSSIIGGNNEEDD__BBYYTTEE, GGLL__BBYYTTEE, GGLL__BBIITTMMAAPP, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT, GGLL__SSHHOORRTT, GGLL__UUNNSSIIGGNNEEDD__IINNTT, GGLL__IINNTT, GGLL__FFLLOOAATT, GGLL__UUNNSSIIGGNNEEDD__BBYYTTEE__33__33__22, GGLL__UUNNSSIIGGNNEEDD__BBYYTTEE__22__33__33__RREEVV, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__55__66__55, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__55__66__55__RREEVV, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__44__44__44__44, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__44__44__44__44__RREEVV, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__55__55__55__11, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__11__55__55__55__RREEVV, GGLL__UUNNSSIIGGNNEEDD__IINNTT__88__88__88__88, GGLL__UUNNSSIIGGNNEEDD__IINNTT__88__88__88__88__RREEVV, GGLL__UUNNSSIIGGNNEEDD__IINNTT__1100__1100__1100__22, and GGLL__UUNNSSIIGGNNEEDD__IINNTT__22__1100__1100__1100__RREEVV are accepted.
_r_o_w
Pointer to a one-dimensional array of pixel data that is processed to build the row filter kernel.
_c_o_l_u_m_n
Pointer to a one-dimensional array of pixel data that is processed to build the column filter kernel.

DESCRIPTION

ggllSSeeppaarraabblleeFFiilltteerr22DD builds a two-dimensional separable convolution filter kernel from two arrays of pixels.

The pixel arrays specified by (_w_i_d_t_h, _f_o_r_m_a_t, _t_y_p_e, _r_o_w) and (_h_e_i_g_h_t, _f_o_r_m_a_t, _t_y_p_e, _c_o_l_u_m_n) are processed just as if they had been passed to ggllDDrraawwPPiixxeellss, but processing stops after the final expansion to RGBA is completed.

Next, the R, G, B, and A components of all pixels in both arrays are scaled by the four separable 2D GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__SSCCAALLEE parameters and biased by the four separable 2D GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__BBIIAASS parameters. (The scale and bias parameters are set by ggllCCoonnvvoolluuttiioonnPPaarraammeetteerr using the GGLL__SSEEPPAARRAABBLLEE__22DD target and the names GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__SSCCAALLEE and GGLL__CCOONNVVOOLLUUTTIIOONN__FFIILLTTEERR__BBIIAASS. The parameters themselves are vectors of four values that are applied to red, green, blue, and alpha, in that order.) The R, G, B, and A values are not clamped to [0,1] at any time during this process.

Each pixel is then converted to the internal specified by _i_n_t_e_r_n_a_l_f_o_r_m_a_t. This conversion simply maps the component values of the pixel (R, G, B, and A) to the values included in the internal (red, green, blue, alpha, luminance, and intensity). The mapping is as follows:
center;
l c c c c c c.
_
Internal Format           RedGreenBlueAlphaLuminanceIntensity
_
GGLL__LLUUMMIINNAANNCCEE              R
GGLL__LLUUMMIINNAANNCCEE__AALLPPHHAA        AR
GGLL__IINNTTEENNSSIITTYY              R
GGLL__RRGGBB                    RGB
GGLL__RRGGBBAA                   RGBA
_



The red, green, blue, alpha, luminance, and/or intensity components of the resulting pixels are stored in floating-point rather than integer They form two one-dimensional filter kernel images. The row image is indexed by coordinate _i starting at zero and increasing from left to right. Each location in the row image is derived from element _i of _r_o_w. The column image is indexed by coordinate _j starting at zero and increasing from bottom to top. Each location in the column image is derived from element _j of _c_o_l_u_m_n.

Note that after a convolution is performed, the resulting color components are also scaled by their corresponding GGLL__PPOOSSTT__CCOONNVVOOLLUUTTIIOONN__cc__SSCCAALLEE parameters and biased by their corresponding GGLL__PPOOSSTT__CCOONNVVOOLLUUTTIIOONN__cc__BBIIAASS parameters (where _c takes on the values RREEDD, GGRREEEENN, BBLLUUEE, and AALLPPHHAA). These parameters are set by ggllPPiixxeellTTrraannssffeerr.

NOTES

ggllSSeeppaarraabblleeFFiilltteerr22DD is present only if GGLL__AARRBB__iimmaaggiinngg is returned when ggllGGeettSSttrriinngg is called with an argument of GGLL__EEXXTTEENNSSIIOONNSS.

ERRORS

GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _t_a_r_g_e_t is not GGLL__SSEEPPAARRAABBLLEE__22DD.

GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _i_n_t_e_r_n_a_l_f_o_r_m_a_t is not one of the allowable values.

GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if _w_i_d_t_h is less than zero or greater than the maximum supported value. This value may be queried with ggllGGeettCCoonnvvoolluuttiioonnPPaarraammeetteerr using target GGLL__SSEEPPAARRAABBLLEE__22DD and name GGLL__MMAAXX__CCOONNVVOOLLUUTTIIOONN__WWIIDDTTHH.

GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if _h_e_i_g_h_t is less than zero or greater than the maximum supported value. This value may be queried with ggllGGeettCCoonnvvoolluuttiioonnPPaarraammeetteerr using target GGLL__SSEEPPAARRAABBLLEE__22DD and name GGLL__MMAAXX__CCOONNVVOOLLUUTTIIOONN__HHEEIIGGHHTT.

GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _f_o_r_m_a_t is not one of the allowable values.

GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _t_y_p_e is not one of the allowable values.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllSSeeppaarraabblleeFFiilltteerr22DD is executed between the execution of ggllBBeeggiinn and the corresponding execution of ggllEEnndd.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if _h_e_i_g_h_t is one of GGLL__UUNNSSIIGGNNEEDD__BBYYTTEE__33__33__22, GGLL__UUNNSSIIGGNNEEDD__BBYYTTEE__22__33__33__RREEVV, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__55__66__55, or GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__55__66__55__RREEVV and _f_o_r_m_a_t is not GGLL__RRGGBB.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if _h_e_i_g_h_t is one of GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__44__44__44__44, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__44__44__44__44__RREEVV, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__55__55__55__11, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT__11__55__55__55__RREEVV, GGLL__UUNNSSIIGGNNEEDD__IINNTT__88__88__88__88, GGLL__UUNNSSIIGGNNEEDD__IINNTT__88__88__88__88__RREEVV, GGLL__UUNNSSIIGGNNEEDD__IINNTT__1100__1100__1100__22, or GGLL__UUNNSSIIGGNNEEDD__IINNTT__22__1100__1100__1100__RREEVV and _f_o_r_m_a_t is neither GGLL__RRGGBBAA nor GGLL__BBGGRRAA.

ASSOCIATED GETS

ggllGGeettCCoonnvvoolluuttiioonnPPaarraammeetteerr, ggllGGeettSSeeppaarraabblleeFFiilltteerr

SEE ALSO

ggllCCoonnvvoolluuttiioonnFFiilltteerr11DD((33GG)), ggllCCoonnvvoolluuttiioonnFFiilltteerr22DD((33GG)), ggllCCoonnvvoolluuttiioonnPPaarraammeetteerr((33GG)), ggllPPiixxeellTTrraannssffeerr((33GG))