15bd8deadSopenharmony_ciXXX - Not complete. 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ciName 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ci SGIX_mpeg1 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ciName Strings 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ci GL_SGIX_mpeg1 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ciVersion 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ci $Date: 1997/06/07 01:23:57 $ $Revision: 1.10 $ 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ciNumber 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ci ??? 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ciDependencies 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ci SGIX_image_compression is required. 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciOverview 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci This extension provides support for MPEG1-compressed images. 265bd8deadSopenharmony_ci MPEG1 compression is considered a pixel storage mode. Predictor 275bd8deadSopenharmony_ci frames are supported and are managed as objects in a manner 285bd8deadSopenharmony_ci similar to texture objects. 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci MPEG images may be uncompressed when transferred from client 315bd8deadSopenharmony_ci memory during the unpacking phase of pixel operations. Images may 325bd8deadSopenharmony_ci be compressed when transferred to client memory during the packing 335bd8deadSopenharmony_ci phase of pixel operations. 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci MPEG predictor frames are stored as two-dimensional RGB images of 365bd8deadSopenharmony_ci unspecified type. The predictors are referred to by numerical 375bd8deadSopenharmony_ci names. The allocation and deallocation of memory to store the 385bd8deadSopenharmony_ci predictor images takes place through the GL routines 395bd8deadSopenharmony_ci AllocMPEGPredictorsSGIX and DeleteMPEGPredictorsSGIX which are 405bd8deadSopenharmony_ci defined by this extension. 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci Support of this extension does not imply conformance to the MPEG1 435bd8deadSopenharmony_ci standard (ISO 11172), although the following guarantees are made: 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ci - During decode, the picture_coding_type piece of the picture 465bd8deadSopenharmony_ci coding header is extracted and interpreted correctly. The 475bd8deadSopenharmony_ci treatment of the resulting value is discussed below. 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ciIssues 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci * Some systems may not support predictors. Should we split the 525bd8deadSopenharmony_ci extension into two: one for intraframe only and a second 535bd8deadSopenharmony_ci which allows predictors? 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci A: Predictors are pretty fundamental to MPEG, so we will 565bd8deadSopenharmony_ci leave them in the spec. Implementations that do not 575bd8deadSopenharmony_ci support them can do a partial implementation and not 585bd8deadSopenharmony_ci advertise the extension. 595bd8deadSopenharmony_ci 605bd8deadSopenharmony_ci * Should we introduce the concept of "residency" for predictors 615bd8deadSopenharmony_ci as we did for texture objects? 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci A: No. Caching of predictors would be far less useful than 645bd8deadSopenharmony_ci caching textures. If we find an application which could 655bd8deadSopenharmony_ci use this capability, we'll add another extension. 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ci * When drawing from a predictor object, we always take the 685bd8deadSopenharmony_ci entire image. Should we allow a way to take a subregion of 695bd8deadSopenharmony_ci the predictor? A similar question arises for drawing to a 705bd8deadSopenharmony_ci predictor object. 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci A: Supporting this functionality could be difficult to 735bd8deadSopenharmony_ci impossible for systems using specialized compression and 745bd8deadSopenharmony_ci decompression hardware. Therefore, we will leave it for 755bd8deadSopenharmony_ci another extension. 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci * Currently, we require that the user allocate a predictor 785bd8deadSopenharmony_ci before using any predictors. That is, there is no default 795bd8deadSopenharmony_ci predictor created at context init. Is this the correct 805bd8deadSopenharmony_ci behavior? In the texture object extension, there is a 815bd8deadSopenharmony_ci default texture which is used. 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci A: Since predictors are used as sources, destinations, and 845bd8deadSopenharmony_ci forward and backward predictors, choosing the correct 855bd8deadSopenharmony_ci number of default predictors and bindings for them which 865bd8deadSopenharmony_ci would be at all useful would be difficult if not 875bd8deadSopenharmony_ci impossible. Textures are a simpler case since they are 885bd8deadSopenharmony_ci basically only used for one thing. Additionally, having 895bd8deadSopenharmony_ci default predictors would require implementations to 905bd8deadSopenharmony_ci reserve space for the predictors at context init (which 915bd8deadSopenharmony_ci would waste space since the vast majority of applications 925bd8deadSopenharmony_ci will not use MPEG compression) or to allocate the space 935bd8deadSopenharmony_ci during a pixel command (which could cause the pixel 945bd8deadSopenharmony_ci command to generate an out-of-memory error). Therefore, 955bd8deadSopenharmony_ci we will stick with the current approach. 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci * Should we add "error recovery" bind points? These predictors 985bd8deadSopenharmony_ci could be used by the implementation to replace regions of a 995bd8deadSopenharmony_ci decoded image which were determined to be bogus because of 1005bd8deadSopenharmony_ci image data errors. Frank Bernard says this is a fairly 1015bd8deadSopenharmony_ci common technique. 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci A: We'll leave this for another extension. 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci * Do we need a proxy mechanism to determine the amount of 1065bd8deadSopenharmony_ci predictor space available? 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci * Do we need a more straightforward way to copy predictors from 1095bd8deadSopenharmony_ci the frame buffer? Something like CopyMPEGPredictorSGIX? 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci * We guarantee that the picture_structure and picture_type 1125bd8deadSopenharmony_ci fields are interpreted and set correctly. We do this so that 1135bd8deadSopenharmony_ci we can make guarantees about which predictors will be used 1145bd8deadSopenharmony_ci and updated. Should we make this less restrictive? 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci * Drawing from predictors is still a little awkward. We 1175bd8deadSopenharmony_ci require the user to draw a zero-size MPEG-compressed image. 1185bd8deadSopenharmony_ci The user needs to have a legal picture header. Should we add 1195bd8deadSopenharmony_ci some more direct way to accomplish this step? 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ciReasoning 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci * We have used a scheme for predictor management which is 1245bd8deadSopenharmony_ci slightly different from the scheme for texture objects. 1255bd8deadSopenharmony_ci Specifically, we have an allocation routine 1265bd8deadSopenharmony_ci (AllocMPEGPredictorsSGIX), but textures are allocated on 1275bd8deadSopenharmony_ci download. The reason for this is that it removes the need to 1285bd8deadSopenharmony_ci allocate memory during commands like DrawPixels and 1295bd8deadSopenharmony_ci ReadPixels. Failure of either of these commands due to an 1305bd8deadSopenharmony_ci out-of-memory error would be highly counterintuitive. 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ci * To simplify state management and queries, we perform 1335bd8deadSopenharmony_ci upsampling prior to motion compensation and predictor 1345bd8deadSopenharmony_ci storage. 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci * We manage quantization tables using a syntax similar to that 1375bd8deadSopenharmony_ci of pixel maps instead of managing them as pixel data since 1385bd8deadSopenharmony_ci they update the pack and unpack state. Using and 1395bd8deadSopenharmony_ci simultaneously updating the state would be awkward. Also, 1405bd8deadSopenharmony_ci the values are always one unscaled component, meaning that 1415bd8deadSopenharmony_ci the added flexibility of a user-specified type and format 1425bd8deadSopenharmony_ci would be virtually useless. 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ciNew Procedures and Functions 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci void GenMPEGPredictorsSGIX(sizei n, 1475bd8deadSopenharmony_ci uint *predictors); 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci void AllocMPEGPredictorsSGIX(sizei width, 1505bd8deadSopenharmony_ci sizei height, 1515bd8deadSopenharmony_ci sizei n, 1525bd8deadSopenharmony_ci uint *predictors); 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci void DeleteMPEGPredictorsSGIX(sizei n, 1555bd8deadSopenharmony_ci uint *predictors); 1565bd8deadSopenharmony_ci 1575bd8deadSopenharmony_ci boolean IsMPEGPredictorSGIX(uint predictor); 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ci void MPEGPredictorSGIX(enum target, 1605bd8deadSopenharmony_ci enum format, 1615bd8deadSopenharmony_ci enum type, 1625bd8deadSopenharmony_ci void *pixels); 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci void GetMPEGPredictorSGIX(enum target, 1655bd8deadSopenharmony_ci enum format, 1665bd8deadSopenharmony_ci enum type, 1675bd8deadSopenharmony_ci void *pixels); 1685bd8deadSopenharmony_ci 1695bd8deadSopenharmony_ci void SwapMPEGPredictorsSGIX(enum target0, 1705bd8deadSopenharmony_ci enum target1); 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci void GetMPEGParameterfvSGIX(enum target, 1735bd8deadSopenharmony_ci enum pname, 1745bd8deadSopenharmony_ci float *params); 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ci void GetMPEGParameterivSGIX(enum target, 1775bd8deadSopenharmony_ci enum pname, 1785bd8deadSopenharmony_ci int *params); 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ci void MPEGQuantTableubv(enum target, 1815bd8deadSopenharmony_ci ubyte *values); 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ci void GetMPEGQuantTableubv(enum target, 1845bd8deadSopenharmony_ci ubyte *values); 1855bd8deadSopenharmony_ci 1865bd8deadSopenharmony_ciNew Tokens 1875bd8deadSopenharmony_ci 1885bd8deadSopenharmony_ci Accepted by the <target> parameter of GetMPEGParameterfvSGIX and 1895bd8deadSopenharmony_ci GetMPEGParameterivSGIX; by the <target0> and <target1> parameters 1905bd8deadSopenharmony_ci of SwapMPEGPredictorsSGIX; by the <param> parameter of PixelStoref 1915bd8deadSopenharmony_ci and PixelStorei; and by the <pname> parameter of GetBooleanv, 1925bd8deadSopenharmony_ci GetIntegerv, GetFloatv, and GetDoublev: 1935bd8deadSopenharmony_ci 1945bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_FWD_SGIX ???? 1955bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_BACK_SGIX ???? 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_FWD_SGIX ???? 1985bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_BACK_SGIX ???? 1995bd8deadSopenharmony_ci 2005bd8deadSopenharmony_ci Accepted by the <pname> parameter of PixelStoref, PixelStorei, 2015bd8deadSopenharmony_ci GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: 2025bd8deadSopenharmony_ci 2035bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_STORE_SGIX ???? 2045bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_STORE_SINK_SGIX ???? 2055bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_READ_SGIX ???? 2065bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_STORE_SGIX ???? 2075bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_STORE_SINK_SGIX ???? 2085bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_READ_SGIX ???? 2095bd8deadSopenharmony_ci 2105bd8deadSopenharmony_ci PACK_MPEG_PICTURE_TYPE_SGIX ???? 2115bd8deadSopenharmony_ci PACK_MPEG_ADAPT_QUANT_SCALE ???? 2125bd8deadSopenharmony_ci 2135bd8deadSopenharmony_ci Accepted by the <param> parameter of PixelStoref and PixelStorei: 2145bd8deadSopenharmony_ci 2155bd8deadSopenharmony_ci MPEG1_SGIX ???? 2165bd8deadSopenharmony_ci MPEG_IFRAME_SGIX ???? 2175bd8deadSopenharmony_ci MPEG_PFRAME_SGIX ???? 2185bd8deadSopenharmony_ci MPEG_BFRAME_SGIX ???? 2195bd8deadSopenharmony_ci 2205bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetMPEGParameterfvSGIX and 2215bd8deadSopenharmony_ci GetMPEGParameterivSGIX: 2225bd8deadSopenharmony_ci 2235bd8deadSopenharmony_ci MPEG_PREDICTOR_WIDTH_SGIX ???? 2245bd8deadSopenharmony_ci MPEG_PREDICTOR_HEIGHT_SGIX ???? 2255bd8deadSopenharmony_ci 2265bd8deadSopenharmony_ci Accepted by the <target> parameter of MPEGQuantTableubv and 2275bd8deadSopenharmony_ci GetMPEGQuantTableubv: 2285bd8deadSopenharmony_ci 2295bd8deadSopenharmony_ci PACK_MPEG_INTRA_QUANT ???? 2305bd8deadSopenharmony_ci PACK_MPEG_NON_INTRA_QUANT ???? 2315bd8deadSopenharmony_ci UNPACK_MPEG_INTRA_QUANT ???? 2325bd8deadSopenharmony_ci UNPACK_MPEG_NON_INTRA_QUANT ???? 2335bd8deadSopenharmony_ci 2345bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.1 Specification (OpenGL Operation) 2355bd8deadSopenharmony_ci 2365bd8deadSopenharmony_ci None. 2375bd8deadSopenharmony_ci 2385bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.1 Specification (Rasterization) 2395bd8deadSopenharmony_ci 2405bd8deadSopenharmony_ci The pixel storage modes are augmented to support MPEG compressed 2415bd8deadSopenharmony_ci images in memory. The following entries are added to Table 3.1: 2425bd8deadSopenharmony_ci 2435bd8deadSopenharmony_ci Parameter Name Type Initial Value Valid Range 2445bd8deadSopenharmony_ci -------------- ---- ------------- ----------- 2455bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_FWD_SGIX integer 0 [0, infinity] 2465bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_BACK_SGIX integer 0 [0, infinity] 2475bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_STORE_SGIX Z3 NONE NONE, UNPACK_MPEG_PREDICTOR_FWD_SGIX, UNPACK_MPEG_PREDICTOR_BACK_SGIX 2485bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_STORE_SINK_SGIX boolean FALSE 2495bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_READ_SGIX Z3 NONE NONE, UNPACK_MPEG_PREDICTOR_FWD_SGIX, UNPACK_MPEG_PREDICTOR_BACK_SGIX 2505bd8deadSopenharmony_ci 2515bd8deadSopenharmony_ci Additionally, the value MPEG1_SGIX is added to the valid range of 2525bd8deadSopenharmony_ci PACK_COMPRESSION_TYPE_SGIX and UNPACK_COMPRESSION_TYPE_SGIX. 2535bd8deadSopenharmony_ci 2545bd8deadSopenharmony_ci The following should be added to the end of section 3.6.1 (Pixel 2555bd8deadSopenharmony_ci Storage Modes): 2565bd8deadSopenharmony_ci 2575bd8deadSopenharmony_ci In addition to PixelStoref and PixelStorei, several commands 2585bd8deadSopenharmony_ci control the unpacking of MPEG-compressed images. The command: 2595bd8deadSopenharmony_ci 2605bd8deadSopenharmony_ci MPEGQuantTableubv(enum target, ubyte *values); 2615bd8deadSopenharmony_ci 2625bd8deadSopenharmony_ci allows the specification of custom quantization tables for MPEG 2635bd8deadSopenharmony_ci decode. The following are legal values for the <target> 2645bd8deadSopenharmony_ci parameter: PACK_MPEG_INTRA_QUANT, PACK_MPEG_NON_INTRA_QUANT, 2655bd8deadSopenharmony_ci UNPACK_MPEG_INTRA_QUANT, and UNPACK_MPEG_NON_INTRA_QUANT. If the 2665bd8deadSopenharmony_ci value of <target> is not legal, the error INVALID_ENUM is 2675bd8deadSopenharmony_ci generated. <values> points to a 64-element array of values 2685bd8deadSopenharmony_ci representing the quantizer grid which will update the state 2695bd8deadSopenharmony_ci specified by <target>. The organization of the elements in the 2705bd8deadSopenharmony_ci grid is not specified by this extension. 2715bd8deadSopenharmony_ci 2725bd8deadSopenharmony_ci Several other commands are used to manage predictor objects for 2735bd8deadSopenharmony_ci MPEG compressed images. Predictor objects represent 2745bd8deadSopenharmony_ci two-dimensional images allocated by GL. The images are stored in 2755bd8deadSopenharmony_ci a YUV format. Each component is stored as a number of unspecified 2765bd8deadSopenharmony_ci precision. Predictor objects are referred to by unsigned integer 2775bd8deadSopenharmony_ci names. A predictor name is considered "in use" when an image 2785bd8deadSopenharmony_ci (including a zero-size image) is associated with it. The name 2795bd8deadSopenharmony_ci zero is reserved for the GL and is permanently associated with a 2805bd8deadSopenharmony_ci zero-size image. 2815bd8deadSopenharmony_ci 2825bd8deadSopenharmony_ci Predictor frame names are allocated using the command: 2835bd8deadSopenharmony_ci 2845bd8deadSopenharmony_ci void GenMPEGPredictorsSGIX( sizei n, uint *predictors ); 2855bd8deadSopenharmony_ci 2865bd8deadSopenharmony_ci The parameter <predictors> points to an array of <n> unsigned 2875bd8deadSopenharmony_ci integers. GenMPEGPredictorsSGIX places <n> predictor names in 2885bd8deadSopenharmony_ci <predictors>. Names are chosen in an unspecified manner, the only 2895bd8deadSopenharmony_ci conditions being that only names that were not in use immediately 2905bd8deadSopenharmony_ci prior to the call to GenMPEGPredictorsSGIX will be returned, zero 2915bd8deadSopenharmony_ci will not be returned, and each name returned will be unique. An 2925bd8deadSopenharmony_ci image with width and height equal to zero is associated with each 2935bd8deadSopenharmony_ci name returned. 2945bd8deadSopenharmony_ci 2955bd8deadSopenharmony_ci Images associated with MPEG predictor names are allocated using 2965bd8deadSopenharmony_ci the command: 2975bd8deadSopenharmony_ci 2985bd8deadSopenharmony_ci AllocMPEGPredictorsSGIX( sizei width, sizei height, 2995bd8deadSopenharmony_ci sizei n, uint *predictors ); 3005bd8deadSopenharmony_ci 3015bd8deadSopenharmony_ci This function associates an image of size <width> by <height> with 3025bd8deadSopenharmony_ci each of the <n> predictors whose names are in <predictors>. The 3035bd8deadSopenharmony_ci parameters <width> and <height> specify the size of images to be 3045bd8deadSopenharmony_ci associated with the predictor objects. If a name was previously 3055bd8deadSopenharmony_ci in use, the image previously associated with it is deleted, just 3065bd8deadSopenharmony_ci as though DeleteMPEGPredictorsSGIX (see below) had been called. 3075bd8deadSopenharmony_ci The name zero may not be included in the list of predictor objects 3085bd8deadSopenharmony_ci or the error INVALID_OPERATION results. After allocation, the 3095bd8deadSopenharmony_ci contents of the allocated images are undefined. 3105bd8deadSopenharmony_ci 3115bd8deadSopenharmony_ci Predictor frames are deleted by calling: 3125bd8deadSopenharmony_ci 3135bd8deadSopenharmony_ci DeleteMPEGPredictorsSGIX( sizei n, uint *predictors ); 3145bd8deadSopenharmony_ci 3155bd8deadSopenharmony_ci with <predictors> pointing to a list of <n> predictor names of 3165bd8deadSopenharmony_ci objects to be deleted. When an object is deleted, the memory 3175bd8deadSopenharmony_ci associated with its image is freed. After the object is deleted, 3185bd8deadSopenharmony_ci it has no image size or contents and its name is considered no 3195bd8deadSopenharmony_ci longer in use. If a predictor object which is currently bound is 3205bd8deadSopenharmony_ci deleted, the binding reverts to zero. DeleteMPEGPredictorsSGIX 3215bd8deadSopenharmony_ci ignores names which do not correspond to predictor objects. The 3225bd8deadSopenharmony_ci name zero is also silently ignored. 3235bd8deadSopenharmony_ci 3245bd8deadSopenharmony_ci Predictors are associated with bind points which define their 3255bd8deadSopenharmony_ci usage during pixel download and readback operations. The valid 3265bd8deadSopenharmony_ci bind points are: PACK_MPEG_PREDICTOR_FWD_SGIX, 3275bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_BACK_SGIX, PACK_MPEG_PREDICTOR_BACK_SGIX, and 3285bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_BACK_SGIX. The use of each bind point is 3295bd8deadSopenharmony_ci described in detail in either section 3.6.3 (Rasterization of 3305bd8deadSopenharmony_ci Pixel Rectangles) or in the section of Chapter 4 entitled "Packing 3315bd8deadSopenharmony_ci of Compressed Images." To bind a predictor to a bind point, the 3325bd8deadSopenharmony_ci commands PixelStorei and PixelStoref are used. The parameter 3335bd8deadSopenharmony_ci <pname> gives the name of a bind point and the parameter <param> 3345bd8deadSopenharmony_ci gives the numerical name of a predictor object. If <param> is not 3355bd8deadSopenharmony_ci a predictor object, the error INVALID_VALUE is generated. 3365bd8deadSopenharmony_ci 3375bd8deadSopenharmony_ci The command 3385bd8deadSopenharmony_ci 3395bd8deadSopenharmony_ci MPEGPredictorSGIX(enum target, enum format, enum type, 3405bd8deadSopenharmony_ci void *pixels); 3415bd8deadSopenharmony_ci 3425bd8deadSopenharmony_ci is used to download images from client memory to the predictor 3435bd8deadSopenharmony_ci bound to the bind point <target>. If <target> is not the name of 3445bd8deadSopenharmony_ci a predictor bind point, the error INVALID_ENUM is generated. 3455bd8deadSopenharmony_ci <format> must be one of RED, GREEN, BLUE, ALPHA, RGB, RGBA, 3465bd8deadSopenharmony_ci ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA. <type> must be 3475bd8deadSopenharmony_ci UNSIGNED_BYTE, BYTE, UNSIGNED_SHORT, SHORT, UNSIGNED_INT, INT, or 3485bd8deadSopenharmony_ci FLOAT. <pixels> points to a two-dimensional image stored as 3495bd8deadSopenharmony_ci specified by <format> and <type>. The width and height of the 3505bd8deadSopenharmony_ci image are assumed to be the same as the width and height of the 3515bd8deadSopenharmony_ci predictor bound to <target>. The image is extracted from memory 3525bd8deadSopenharmony_ci and processed just as if DrawPixels were called, stopping after 3535bd8deadSopenharmony_ci the Final Expansion to RGBA step. 3545bd8deadSopenharmony_ci 3555bd8deadSopenharmony_ci The command 3565bd8deadSopenharmony_ci 3575bd8deadSopenharmony_ci SwapMPEGPredictorsSGIX(enum target0, enum target1); 3585bd8deadSopenharmony_ci 3595bd8deadSopenharmony_ci is used to swap the predictor objects associated with two 3605bd8deadSopenharmony_ci predictor bind points. The predictor bound to <target0> is bound 3615bd8deadSopenharmony_ci to <target1> and the predictor bound to <target1> is bound to 3625bd8deadSopenharmony_ci <target0>. The error INVALID_ENUM is generated if <target0> or 3635bd8deadSopenharmony_ci <target1> is not the name of a predictor bind point. 3645bd8deadSopenharmony_ci 3655bd8deadSopenharmony_ci 3.6.3 Rasterization of Pixel Rectangles 3665bd8deadSopenharmony_ci 3675bd8deadSopenharmony_ci The following should be added to the "Unpacking of Compressed 3685bd8deadSopenharmony_ci Images" subsection of section 3.6.3 (Rasterization of Pixel 3695bd8deadSopenharmony_ci Rectangles) following the paragraph which begins "Once the byte 3705bd8deadSopenharmony_ci stream has been taken from host memory...": If 3715bd8deadSopenharmony_ci UNPACK_COMPRESSION_TYPE_SGIX is equal to MPEG1_SGIX, the byte 3725bd8deadSopenharmony_ci stream is assumed to represent an MPEG1 picture header followed by 3735bd8deadSopenharmony_ci picture data. MPEG1 images are classified as one of three frame 3745bd8deadSopenharmony_ci types: I-frame, P-frame, or B-frame. The frame type is determined 3755bd8deadSopenharmony_ci by the value of the picture_type field in the picture header. 3765bd8deadSopenharmony_ci This extraction and interpretation takes place as described in the 3775bd8deadSopenharmony_ci MPEG specification (ISO 11172). The initial steps of MPEG 3785bd8deadSopenharmony_ci decompression are the same for all frames, but later steps are 3795bd8deadSopenharmony_ci dependent upon the frame type. 3805bd8deadSopenharmony_ci 3815bd8deadSopenharmony_ci The size of the image represented by the byte stream is determined 3825bd8deadSopenharmony_ci by the width and height values as computed in the 3835bd8deadSopenharmony_ci SGIX_image_compression extension. Only image sizes for which the 3845bd8deadSopenharmony_ci width and height are multiples of 16 are valid. Specification of 3855bd8deadSopenharmony_ci an invalid size for the decompressed image will result in the 3865bd8deadSopenharmony_ci error INVALID_OPERATION. 3875bd8deadSopenharmony_ci 3885bd8deadSopenharmony_ci Entropy decoding, inverse quantization, and inverse discrete 3895bd8deadSopenharmony_ci cosine transform operations are applied to the image. This 3905bd8deadSopenharmony_ci extension does not specify the algorithm used, nor does it imply 3915bd8deadSopenharmony_ci conformance to the MPEG2 specification. 3925bd8deadSopenharmony_ci 3935bd8deadSopenharmony_ci The IDCT step produces three output images: Y, Cr, and Cb. The 3945bd8deadSopenharmony_ci images are upsampled as determined by the setting of 3955bd8deadSopenharmony_ci UNPACK_UPSAMPLE_SGIX. The upsampling is performed as described in 3965bd8deadSopenharmony_ci SGIX_image_compression. The output of the upsampling step is a 3975bd8deadSopenharmony_ci single width by height YCrCB image. The contents of the image and 3985bd8deadSopenharmony_ci how it is handled after the upsampling step is determined by the 3995bd8deadSopenharmony_ci type of MPEG frame. 4005bd8deadSopenharmony_ci 4015bd8deadSopenharmony_ci The frame conversion step is described below for each of the 4025bd8deadSopenharmony_ci types. For all frame types, the output of the conversion step is 4035bd8deadSopenharmony_ci a single YCrCb image of the same width and height as the output of 4045bd8deadSopenharmony_ci the upsampling step. 4055bd8deadSopenharmony_ci 4065bd8deadSopenharmony_ci If the image is an I-frame, no predictors are used to compute the 4075bd8deadSopenharmony_ci output image, but the quantizer table UNPACK_MPEG_INTRA_QUANT may 4085bd8deadSopenharmony_ci be used. The quantizer table contents may also be changed during 4095bd8deadSopenharmony_ci the decompression if the byte stream contains an embedded 4105bd8deadSopenharmony_ci quantization table. Any changes made are reflected in the GL state 4115bd8deadSopenharmony_ci and persist until the quantizer table is respecified through a 4125bd8deadSopenharmony_ci call to MPEGQuantTableubv or during decompression of another 4135bd8deadSopenharmony_ci I-frame. The exact algorithm used to compute the output image is 4145bd8deadSopenharmony_ci not specified in this extension. 4155bd8deadSopenharmony_ci 4165bd8deadSopenharmony_ci If the image is a P-frame, the image represents a predicted picture. 4175bd8deadSopenharmony_ci The output of the frame conversion step is determined by the 4185bd8deadSopenharmony_ci contents of the image and by the contents of the predictor object 4195bd8deadSopenharmony_ci bound to the UNPACK_MPEG_PREDICTOR_BACK_SGIX bind point. This 4205bd8deadSopenharmony_ci predictor must be the same size as the current image or the error 4215bd8deadSopenharmony_ci INVALID_OPERATION is generated and processing of the image 4225bd8deadSopenharmony_ci terminates. The quantizer table UNPACK_MPEG_NON_INTRA_QUANT may 4235bd8deadSopenharmony_ci be used and possibly changed during the decompression. 4245bd8deadSopenharmony_ci 4255bd8deadSopenharmony_ci If the image is a B-frame, the image represents a bidirectionally 4265bd8deadSopenharmony_ci predicted picture. The output of the frame conversion step is 4275bd8deadSopenharmony_ci determined by the contents of the image and by the contents of the 4285bd8deadSopenharmony_ci predictor objects bound to the UNPACK_MPEG_PREDICTOR_BACK_SGIX and 4295bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_FWD_SGIX bind points. The predictor objects 4305bd8deadSopenharmony_ci must be the same size as the current image or the error 4315bd8deadSopenharmony_ci INVALID_OPERATION is generated and processing of the image 4325bd8deadSopenharmony_ci terminates. The quantizer table UNPACK_MPEG_NON_INTRA_QUANT may 4335bd8deadSopenharmony_ci be used and possibly changed during the decompression. The 4345bd8deadSopenharmony_ci algorithm used to compute the output image is not specified in 4355bd8deadSopenharmony_ci this extension. 4365bd8deadSopenharmony_ci 4375bd8deadSopenharmony_ci After the frame conversion step, the YCrCb image may be used to 4385bd8deadSopenharmony_ci update the predictor bound to UNPACK_MPEG_PREDICTOR_FORWARD_SGIX 4395bd8deadSopenharmony_ci or UNPACK_MPEG_PREDICTOR_BACK_SGIX in the predictor update step 4405bd8deadSopenharmony_ci described here. The predictor to be updated is specified using 4415bd8deadSopenharmony_ci the parameter UNPACK_MPEG_PREDICTOR_STORE_SGIX. If this value is 4425bd8deadSopenharmony_ci NONE, the predictor update step is skipped. Otherwise, the YCrCb 4435bd8deadSopenharmony_ci image from the frame conversion step overwrites the current 4445bd8deadSopenharmony_ci contents of the predictor bound to the target which was 4455bd8deadSopenharmony_ci specified with UNPACK_MPEG_PREDICTOR_STORE_SGIX. The affected 4465bd8deadSopenharmony_ci predictor's size must be the same as that of the current image or 4475bd8deadSopenharmony_ci the error INVALID_OPERATION is generated. Also, a predictor may 4485bd8deadSopenharmony_ci not be updated if it is being used in a previous step of the 4495bd8deadSopenharmony_ci decompression process or the error INVALID_OPERATION is generated. 4505bd8deadSopenharmony_ci This means that the UNPACK_MPEG_PREDICTOR_STORE_SGIX may not be 4515bd8deadSopenharmony_ci set to UNPACK_MPEG_PREDICTOR_BACK_SGIX during the download of a P- 4525bd8deadSopenharmony_ci or B-frame and that UNPACK_MPEG_PREDICTOR_STORE_SGIX may not be 4535bd8deadSopenharmony_ci set to UNPACK_MPEG_PREDICTOR_FORWARD_SGIX during the download of a 4545bd8deadSopenharmony_ci B-frame. If an error is generated during the predictor update 4555bd8deadSopenharmony_ci step, processing terminates and the contents of the predictor are 4565bd8deadSopenharmony_ci left unchanged. 4575bd8deadSopenharmony_ci 4585bd8deadSopenharmony_ci If UNPACK_MPEG_PREDICTOR_STORE_SINK_SGIX is TRUE, the operation 4595bd8deadSopenharmony_ci terminates after the update step (even if no update was 4605bd8deadSopenharmony_ci performed). 4615bd8deadSopenharmony_ci 4625bd8deadSopenharmony_ci After the predictor update step, the YCrCb image from the frame 4635bd8deadSopenharmony_ci conversion step may be replaced by the predictor bound to 4645bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_BACK_SGIX or UNPACK_MPEG_PREDICTOR_FWD_SGIX 4655bd8deadSopenharmony_ci as specified by UNPACK_MPEG_PREDICTOR_READ_SGIX. If We refer to 4665bd8deadSopenharmony_ci this step as the source replacement step. If 4675bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_READ_SGIX is equal to NONE, the image from 4685bd8deadSopenharmony_ci the conversion step is unchanged. If 4695bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_READ_SGIX is 4705bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_BACK_SGIX, the image is replaced by the 4715bd8deadSopenharmony_ci predictor image bound to UNPACK_MPEG_PREDICTOR_BACK_SGIX. If 4725bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_READ_SGIX is 4735bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_FORWARD_SGIX, the image is replaced by the 4745bd8deadSopenharmony_ci predictor image bound to UNPACK_MPEG_PREDICTOR_FORWARD_SGIX. When 4755bd8deadSopenharmony_ci replacement occurs, the image passed to the next stage in the 4765bd8deadSopenharmony_ci unpacking process has the same size and contents as the specified 4775bd8deadSopenharmony_ci predictor. Therefore, a predictor may be downloaded from a bind 4785bd8deadSopenharmony_ci point by setting UNPACK_MPEG_PREDICTOR_READ_SGIX appropriately and 4795bd8deadSopenharmony_ci drawing a zero-size MPEG image. 4805bd8deadSopenharmony_ci 4815bd8deadSopenharmony_ci Predictors may not be used for replacement if they were written 4825bd8deadSopenharmony_ci during a previous step of the same operation. That is to say, 4835bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_READ_SGIX may not be set to the same value 4845bd8deadSopenharmony_ci as UNPACK_MPEG_PREDICTOR_STORE_SGIX unless that value is NONE. 4855bd8deadSopenharmony_ci Also, UNPACK_MPEG_PREDICTOR_READ_SGIX and 4865bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_STORE_SGIX may not specify bind points to 4875bd8deadSopenharmony_ci which the same predictor is bound, even if the bind points are 4885bd8deadSopenharmony_ci different. If either error condition occurs, the error 4895bd8deadSopenharmony_ci INVALID_OPERATION is generated and the operation terminates. The 4905bd8deadSopenharmony_ci termination of the operation occurs prior to the predictor update 4915bd8deadSopenharmony_ci step, so if the error occurs the contents of the predictors are 4925bd8deadSopenharmony_ci left unchanged. 4935bd8deadSopenharmony_ci 4945bd8deadSopenharmony_ci After the replacement step, the YCrCb image is converted to RGB. 4955bd8deadSopenharmony_ci If UNPACK_TO_RGB_SGIX is enabled, an RGB image is produced using 4965bd8deadSopenharmony_ci an unspecified algorithm. If UNPACK_TO_RGB_SGIX is disabled, the 4975bd8deadSopenharmony_ci RGB image is producted by setting R to Y, G to Cr, and B to Cb. 4985bd8deadSopenharmony_ci The output image is treated as an RGB floating-point image. 4995bd8deadSopenharmony_ci 5005bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations 5015bd8deadSopenharmony_ciand the Frame Buffer) 5025bd8deadSopenharmony_ci 5035bd8deadSopenharmony_ci The following entries are added to Table 4.5: 5045bd8deadSopenharmony_ci 5055bd8deadSopenharmony_ci Parameter Name Type Initial Value Valid Range 5065bd8deadSopenharmony_ci -------------- ---- ------------- ----------- 5075bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_FWD_SGIX integer 0 [0, infinity] 5085bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_BACK_SGIX integer 0 [0, infinity] 5095bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_STORE_SGIX Z3 NONE NONE, PACK_MPEG_PREDICTOR_FWD_SGIX, PACK_MPEG_PREDICTOR_BACK_SGIX 5105bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_STORE_SINK_SGIX boolean FALSE TRUE/FALSE 5115bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_READ_SGIX Z3 NONE NONE, PACK_MPEG_PREDICTOR_FWD_SGIX, PACK_MPEG_PREDICTOR_BACK_SGIX 5125bd8deadSopenharmony_ci PACK_MPEG_PICTURE_TYPE_SGIX Z3 NONE MPEG_IFRAME_SGIX, MPEG_PFRAME_SGIX, MPEG_BFRAME_SGIX 5135bd8deadSopenharmony_ci PACK_MPEG_ADAPT_QUANT_SCALE b FALSE TRUE/FALSE 5145bd8deadSopenharmony_ci 5155bd8deadSopenharmony_ci The following is added to the "Packing of Compressed Images" 5165bd8deadSopenharmony_ci subsection following the paragraph beginning "If image compression 5175bd8deadSopenharmony_ci is on...": For MPEG1-compressed images (PACK_COMPRESSION_TYPE_SGIX 5185bd8deadSopenharmony_ci equal to MPEG1_SGIX), only image sizes for which width and height 5195bd8deadSopenharmony_ci are multiples of 16 are permitted. Other image sizes result in 5205bd8deadSopenharmony_ci the generation of the error INVALID_OPERATION. The type of frame 5215bd8deadSopenharmony_ci to be created is determined by the setting of 5225bd8deadSopenharmony_ci PACK_MPEG_PICTURE_TYPE_SGIX. During MPEG1 compression, if this 5235bd8deadSopenharmony_ci value is not equal to MPEG_IFRAME_SGIX, MPEG_PFRAME_SGIX, or 5245bd8deadSopenharmony_ci MPEG_BFRAME_SGIX, the error INVALID_ENUM is generated and no 5255bd8deadSopenharmony_ci processing takes place. 5265bd8deadSopenharmony_ci 5275bd8deadSopenharmony_ci If PACK_TO_RGB_SGIX is TRUE, the RGBA input image is converted 5285bd8deadSopenharmony_ci to a YCrCb image using an unspecified algorithm. If 5295bd8deadSopenharmony_ci PACK_TO_RGB_SGIX is FALSE, the input image is converted to YCrCb 5305bd8deadSopenharmony_ci by setting the Y equal to R, Cr equal to G, and Cb equal to B. 5315bd8deadSopenharmony_ci 5325bd8deadSopenharmony_ci The MPEG predictor bound to the bind point specified by 5335bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_STORE_SGIX is overwritten by the current image 5345bd8deadSopenharmony_ci if the value of PACK_MPEG_PREDICTOR_STORE_SGIX is not equal to 5355bd8deadSopenharmony_ci NONE. The update of PACK_MPEG_PREDICTOR_SGIX takes place in the 5365bd8deadSopenharmony_ci same manner as the update of UNPACK_MPEG_PREDICTOR_SGIX described 5375bd8deadSopenharmony_ci in section 3.6.3 (including the generation of errors and possible 5385bd8deadSopenharmony_ci termination of processing), except that the appropriate PACK 5395bd8deadSopenharmony_ci values are used in place of the UNPACK values. 5405bd8deadSopenharmony_ci 5415bd8deadSopenharmony_ci As with decompression, the value PACK_MPEG_PREDICTOR_READ_SGIX may 5425bd8deadSopenharmony_ci be used to specify a bind point whose contents will replace the 5435bd8deadSopenharmony_ci current image in all subsequent processing. This update is 5445bd8deadSopenharmony_ci identical to that described in section 3.6.3 (including the 5455bd8deadSopenharmony_ci generation of errors and possible termination of processing), 5465bd8deadSopenharmony_ci except that the appropriate PACK values are used in place of the 5475bd8deadSopenharmony_ci UNPACK values. 5485bd8deadSopenharmony_ci 5495bd8deadSopenharmony_ci The YCrCb image as downsampled is specified by PACK_SAMPLE_SGIX. 5505bd8deadSopenharmony_ci The operation is described in SGIX_image_compression. 5515bd8deadSopenharmony_ci 5525bd8deadSopenharmony_ci The output of the downsampling step is converted based upon the 5535bd8deadSopenharmony_ci frame type specified by PACK_MPEG_PICTURE_TYPE_SGIX. In this 5545bd8deadSopenharmony_ci extension, we do not specify the algorithms used. We list the GL 5555bd8deadSopenharmony_ci state used to control the algorithm, but the interpretation of 5565bd8deadSopenharmony_ci this state is implementation-dependent. All algorithms may be 5575bd8deadSopenharmony_ci effected by the setting of PACK_MPEG_ADAPT_QUANT_SCALE. Other 5585bd8deadSopenharmony_ci parameters affect different frame types in different ways and will 5595bd8deadSopenharmony_ci be discussed in the paragraphs below. 5605bd8deadSopenharmony_ci 5615bd8deadSopenharmony_ci If the frame type is MPEG_IFRAME_SGIX, the conversion does not use 5625bd8deadSopenharmony_ci any predictors. The conversion may use the contents of the 5635bd8deadSopenharmony_ci quantizer table PACK_MPEG_INTRA_QUANT_SGIX. Unlike during 5645bd8deadSopenharmony_ci decompression, the contents of the quant tables may not be changed 5655bd8deadSopenharmony_ci by the compression operation. 5665bd8deadSopenharmony_ci 5675bd8deadSopenharmony_ci If the frame type is MPEG_PFRAME_SGIX, the data is converted using 5685bd8deadSopenharmony_ci the predictor bound to PACK_MPEG_PREDICTOR_BACK_SGIX. If the 5695bd8deadSopenharmony_ci image size is not equal to the size of the predictor, the error 5705bd8deadSopenharmony_ci INVALID_OPERATION is generated and the operation is terminated. 5715bd8deadSopenharmony_ci The conversion may also use the contents of the quantizer table 5725bd8deadSopenharmony_ci PACK_MPEG_NON_INTRA_QUANT_SGIX, but the contents of the quantizer 5735bd8deadSopenharmony_ci may not be changed by the compression operation. 5745bd8deadSopenharmony_ci 5755bd8deadSopenharmony_ci If the frame type is MPEG_BFRAME_SGIX, the data is converted using 5765bd8deadSopenharmony_ci the predictors bound to PACK_MPEG_PREDICTOR_BACK_SGIX and 5775bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_FWD_SGIX. If the sizes of the predictors are 5785bd8deadSopenharmony_ci not equal to the image size, the error INVALID_OPERATION is 5795bd8deadSopenharmony_ci generated and the operation is terminated. The algorithms used in 5805bd8deadSopenharmony_ci the compression are not defined by this extension. The conversion 5815bd8deadSopenharmony_ci may also use the contents of the quantizer table 5825bd8deadSopenharmony_ci PACK_MPEG_NON_INTRA_QUANT_SGIX. The contents of table not may be 5835bd8deadSopenharmony_ci changed by the compression operation. 5845bd8deadSopenharmony_ci 5855bd8deadSopenharmony_ci The output of MPEG1 compression is a byte stream containing an 5865bd8deadSopenharmony_ci MPEG1 picture header followed by picture data. 5875bd8deadSopenharmony_ci 5885bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.1 Specification (Special Functions) 5895bd8deadSopenharmony_ci 5905bd8deadSopenharmony_ci All of the procedures and functions added by this extension are 5915bd8deadSopenharmony_ci not included in display lists, but instead are executed 5925bd8deadSopenharmony_ci immediately. 5935bd8deadSopenharmony_ci 5945bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.1 Specification (State and State Requests) 5955bd8deadSopenharmony_ci 5965bd8deadSopenharmony_ci The routine 5975bd8deadSopenharmony_ci 5985bd8deadSopenharmony_ci void GetMPEGQuantTableubv(enum target, ubyte *values); 5995bd8deadSopenharmony_ci 6005bd8deadSopenharmony_ci is used to read back the contents of an MPEG quantizer table. The 6015bd8deadSopenharmony_ci valid values for the parameter <target> are: 6025bd8deadSopenharmony_ci PACK_MPEG_INTRA_QUANT_SGIX, PACK_MPEG_NON_INTRA_QUANT_SGIX, 6035bd8deadSopenharmony_ci UNPACK_MPEG_INTRA_QUANT_SGIX, and 6045bd8deadSopenharmony_ci UNPACK_MPEG_NON_INTRA_QUANT_SGIX. If the value of <target> is not 6055bd8deadSopenharmony_ci legal, the error INVALID_ENUM is generated. <values> points to a 6065bd8deadSopenharmony_ci 64-element array. The organization of data in the array is not 6075bd8deadSopenharmony_ci specified by this extension. 6085bd8deadSopenharmony_ci 6095bd8deadSopenharmony_ci The routine 6105bd8deadSopenharmony_ci 6115bd8deadSopenharmony_ci void GetMPEGPredictorSGIX(enum target, enum format, enum type, 6125bd8deadSopenharmony_ci void *pixels); 6135bd8deadSopenharmony_ci 6145bd8deadSopenharmony_ci is used to read back the contents of the predictor bound to a bind 6155bd8deadSopenharmony_ci point specified by <target>. The error INVALID_ENUM is generated 6165bd8deadSopenharmony_ci if <target> is not one of UNPACK_MPEG_PREDICTOR_FWD_SGIX, 6175bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_BACK_SGIX, PACK_MPEG_PREDICTOR_FWD_SGIX, or 6185bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_BACK_SGIX. <format> must be one of RED, 6195bd8deadSopenharmony_ci GREEN, BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or 6205bd8deadSopenharmony_ci LUMINANCE_ALPHA. <type> must be UNSIGNED_BYTE, BYTE, 6215bd8deadSopenharmony_ci UNSIGNED_SHORT, SHORT, UNSIGNED_INT, INT, or FLOAT. If <format> 6225bd8deadSopenharmony_ci or <type> does not give a legal value, the error INVALID_ENUM is 6235bd8deadSopenharmony_ci generated. The two-dimensional image is returned to <pixels>. No 6245bd8deadSopenharmony_ci pixel transfer operations are performed on this image, but pixel 6255bd8deadSopenharmony_ci storage modes (including possibly MPEG compression) that are 6265bd8deadSopenharmony_ci applicable to ReadPixels are performed. Since the predictor does 6275bd8deadSopenharmony_ci not contain an alpha channel, any alpha values which are returned 6285bd8deadSopenharmony_ci are set to zero. If the pixel store operations applied would 6295bd8deadSopenharmony_ci change the contents of the predictor bound to <target>, the error 6305bd8deadSopenharmony_ci INVALID_OPERATION is generated. 6315bd8deadSopenharmony_ci 6325bd8deadSopenharmony_ci The routines 6335bd8deadSopenharmony_ci 6345bd8deadSopenharmony_ci void GetMPEGParameterfvSGIX(enum target, enum pname, 6355bd8deadSopenharmony_ci float *params); 6365bd8deadSopenharmony_ci 6375bd8deadSopenharmony_ci and 6385bd8deadSopenharmony_ci 6395bd8deadSopenharmony_ci void GetMPEGParameterivSGIX(enum target, enum pname, 6405bd8deadSopenharmony_ci int *params); 6415bd8deadSopenharmony_ci 6425bd8deadSopenharmony_ci are used to return attributes of a predictor object bound to 6435bd8deadSopenharmony_ci <target> as floating-point or integer values (respectively). 6445bd8deadSopenharmony_ci <target> must specify one of UNPACK_MPEG_PREDICTOR_FWD_SGIX, 6455bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_BACK_SGIX, PACK_MPEG_PREDICTOR_FWD_SGIX, or 6465bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_BACK_SGIX or the error INVALID_ENUM is 6475bd8deadSopenharmony_ci generated. <pname> specifies the attribute to be returned and 6485bd8deadSopenharmony_ci must be MPEG_PREDICTOR_WIDTH_SGIX or MPEG_PREDICTOR_HEIGHT_SGIX. 6495bd8deadSopenharmony_ci These values cause the width or height of the predictor to be 6505bd8deadSopenharmony_ci returned to the location in client memory specified by <params>. 6515bd8deadSopenharmony_ci If <pname> does not specify a legal value, the error INVALID_ENUM 6525bd8deadSopenharmony_ci is generated. 6535bd8deadSopenharmony_ci 6545bd8deadSopenharmony_ciAdditions to the GLX Specification 6555bd8deadSopenharmony_ci 6565bd8deadSopenharmony_ci None. 6575bd8deadSopenharmony_ci 6585bd8deadSopenharmony_ciGLX Protocol 6595bd8deadSopenharmony_ci 6605bd8deadSopenharmony_ci XXX 6615bd8deadSopenharmony_ci 6625bd8deadSopenharmony_ciErrors 6635bd8deadSopenharmony_ci 6645bd8deadSopenharmony_ci INVALID_ENUM is generated if the parameter <target> to 6655bd8deadSopenharmony_ci MPEGQuantTableubv is not one of the legal values listed above. 6665bd8deadSopenharmony_ci 6675bd8deadSopenharmony_ci INVALID_OPERATION is generated if the name zero is passed as one 6685bd8deadSopenharmony_ci of the predictors to AllocMPEGPredictorsSGIX. 6695bd8deadSopenharmony_ci 6705bd8deadSopenharmony_ci INVALID_VALUE is generated if the parameter <pname> to PixelStorei 6715bd8deadSopenharmony_ci or PixelStoref indicates a predictor bind point but <param> is not 6725bd8deadSopenharmony_ci the name of a predictor object. 6735bd8deadSopenharmony_ci 6745bd8deadSopenharmony_ci INVALID_OPERATION is generated if parameter <format> to 6755bd8deadSopenharmony_ci MPEGPredictorSGIX is not one of RED, GREEN, BLUE, ALPHA, RGB, 6765bd8deadSopenharmony_ci RGBA, ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA. 6775bd8deadSopenharmony_ci 6785bd8deadSopenharmony_ci INVALID_OPERATION is generated if parameter <type> to 6795bd8deadSopenharmony_ci MPEGPredictorSGIX is not one of UNSIGNED_BYTE, BYTE, 6805bd8deadSopenharmony_ci UNSIGNED_SHORT, SHORT, UNSIGNED_INT, INT, or FLOAT. 6815bd8deadSopenharmony_ci 6825bd8deadSopenharmony_ci INVALID_ENUM is generated if either or both of the parameters 6835bd8deadSopenharmony_ci <target0> and <target1> to the command SwapMPEGPredictorsSGIX is 6845bd8deadSopenharmony_ci not the name of a valid predictor bind point. 6855bd8deadSopenharmony_ci 6865bd8deadSopenharmony_ci INVALID_OPERATION is generated if UNPACK_COMPRESSION_TYPE_SGIX is 6875bd8deadSopenharmony_ci MPEG1_SGIX and during a pixel download the values width and height 6885bd8deadSopenharmony_ci (as computed in SGIX_image_compression) are not legal for MPEG1 6895bd8deadSopenharmony_ci decompression. 6905bd8deadSopenharmony_ci 6915bd8deadSopenharmony_ci INVALID_OPERATION is generated if UNPACK_MPEG_PREDICTOR_STORE_SGIX 6925bd8deadSopenharmony_ci is set to UNPACK_MPEG_PREDICTOR_BACK_SGIX during the download of a 6935bd8deadSopenharmony_ci P- or B-frame or if UNPACK_MPEG_PREDICTOR_STORE_SGIX is set to 6945bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_FORWARD_SGIX during the download of a 6955bd8deadSopenharmony_ci B-frame. 6965bd8deadSopenharmony_ci 6975bd8deadSopenharmony_ci INVALID_OPERATION is generated if UNPACK_MPEG_PREDICTOR_READ_SGIX 6985bd8deadSopenharmony_ci and UNPACK_MPEG_PREDICTOR_STORE_SGIX are set to the same value 6995bd8deadSopenharmony_ci during a MPEG decompression and that value is not NONE. 7005bd8deadSopenharmony_ci 7015bd8deadSopenharmony_ci INVALID_OPERATION is generated if during MPEG decompression 7025bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_READ_SGIX and 7035bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_STORE_SGIX specify bind points to which the 7045bd8deadSopenharmony_ci same predictor is bound. 7055bd8deadSopenharmony_ci 7065bd8deadSopenharmony_ci INVALID_OPERATION is generated if PACK_COMPRESSION_TYPE_SGIX is 7075bd8deadSopenharmony_ci MPEG1_SGIX and during a pixel readback the values width and height 7085bd8deadSopenharmony_ci (as computed in SGIX_image_compression) are not legal for MPEG1 7095bd8deadSopenharmony_ci compression. 7105bd8deadSopenharmony_ci 7115bd8deadSopenharmony_ci INVALID_OPERATION is generated if PACK_MPEG_PREDICTOR_STORE_SGIX 7125bd8deadSopenharmony_ci is set to PACK_MPEG_PREDICTOR_BACK_SGIX during the readback of a 7135bd8deadSopenharmony_ci P- or B-frame or if PACK_MPEG_PREDICTOR_STORE_SGIX is set to 7145bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_FORWARD_SGIX during the readback of a B-frame. 7155bd8deadSopenharmony_ci 7165bd8deadSopenharmony_ci INVALID_OPERATION is generated if PACK_MPEG_PREDICTOR_READ_SGIX 7175bd8deadSopenharmony_ci and PACK_MPEG_PREDICTOR_STORE_SGIX are set to the same value 7185bd8deadSopenharmony_ci during a MPEG compression and that value is not NONE. 7195bd8deadSopenharmony_ci 7205bd8deadSopenharmony_ci INVALID_OPERATION is generated if during MPEG decompression 7215bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_READ_SGIX and PACK_MPEG_PREDICTOR_STORE_SGIX 7225bd8deadSopenharmony_ci specify bind points to which the same predictor is bound. 7235bd8deadSopenharmony_ci 7245bd8deadSopenharmony_ci INVALID_ENUM is generated if the <target> parameter to 7255bd8deadSopenharmony_ci GetMPEGPredictorSGIX is not a legal value. 7265bd8deadSopenharmony_ci 7275bd8deadSopenharmony_ci INVALID_ENUM is generated if the <format> parameter to 7285bd8deadSopenharmony_ci GetMPEGPredictorSGIX is not one of the accepted values. 7295bd8deadSopenharmony_ci 7305bd8deadSopenharmony_ci INVALID_ENUM is generated if the <type> parameter to 7315bd8deadSopenharmony_ci GetMPEGPredictorSGIX is not one of the accepted values. 7325bd8deadSopenharmony_ci 7335bd8deadSopenharmony_ci INVALID_OPERATION is generated if the pixel storage modes in 7345bd8deadSopenharmony_ci operation when GetMPEGPredictorSGIX is called would change the 7355bd8deadSopenharmony_ci contents of the predictor bound to <target>. 7365bd8deadSopenharmony_ci 7375bd8deadSopenharmony_ci INVALID_ENUM is generated if the <target> parameter to 7385bd8deadSopenharmony_ci GetMPEGParameterfvSGIX or GetMPEGParameterivSGIX is not one of the 7395bd8deadSopenharmony_ci accepted values. 7405bd8deadSopenharmony_ci 7415bd8deadSopenharmony_ci INVALID_ENUM is generated if the <pname> parameter to 7425bd8deadSopenharmony_ci GetMPEGParameterfvSGIX or GetMPEGParameterivSGIX is not one of the 7435bd8deadSopenharmony_ci accepted values. 7445bd8deadSopenharmony_ci 7455bd8deadSopenharmony_ci INVALID_OPERATION is generated if any of the commands defined in this 7465bd8deadSopenharmony_ci extension is executed between the execution of Begin and the 7475bd8deadSopenharmony_ci corresponding execution of End. 7485bd8deadSopenharmony_ci 7495bd8deadSopenharmony_ciNew State 7505bd8deadSopenharmony_ci Initial 7515bd8deadSopenharmony_ci Get Value Get Command Type Value Attrib 7525bd8deadSopenharmony_ci --------- ----------- ---- ------- ------ 7535bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_DST_SGIX GetIntegerv Z+ 0 client 7545bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_SRC_SGIX GetIntegerv Z+ 0 client 7555bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_FWD_SGIX GetIntegerv Z+ 0 client 7565bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_BACK_SGIX GetIntegerv Z+ 0 client 7575bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_DST_SGIX GetIntegerv Z+ 0 client 7585bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_SRC_SGIX GetIntegerv Z+ 0 client 7595bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_FWD_SGIX GetIntegerv Z+ 0 client 7605bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_BACK_SGIX GetIntegerv Z+ 0 client 7615bd8deadSopenharmony_ci 7625bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_TO_DST_SGI GetIntegerv B 0 client 7635bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_FROM_SRC_SGIX GetIntegerv B 0 client 7645bd8deadSopenharmony_ci PACK_MPEG_PREDICTOR_TO_DST_SINK_SGIX GetIntegerv B 0 client 7655bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_TO_DST_SGIX GetIntegerv B 0 client 7665bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_FROM_SRC_SGIX GetIntegerv B 0 client 7675bd8deadSopenharmony_ci UNPACK_MPEG_PREDICTOR_TO_DST_SINK_SGIX GetIntegerv B 0 client 7685bd8deadSopenharmony_ci 7695bd8deadSopenharmony_ci PACK_MPEG_INTRA_QUANT GetMPEGQuantTableubv 64*Z+ ( 8,16,19,22,26,27,29,34, client 7705bd8deadSopenharmony_ci 16,16,22,24,47,49,34,37, 7715bd8deadSopenharmony_ci 19,22,26,27,29,34,34,38, 7725bd8deadSopenharmony_ci 22,22,26,27,29,34,37,40, 7735bd8deadSopenharmony_ci 22,26,27,29,32,35,40,48, 7745bd8deadSopenharmony_ci 26,27,29,32,35,40,48,58, 7755bd8deadSopenharmony_ci 26,27,29,34,38,46,56,69, 7765bd8deadSopenharmony_ci 27,29,35,38,46,56,69,83) 7775bd8deadSopenharmony_ci PACK_MPEG_NON_INTRA_QUANT GetMPEGQuantTableubv 64*Z+ (16,16,16,16,16,16,16,16, client 7785bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 7795bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 7805bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 7815bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 7825bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 7835bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 7845bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16) 7855bd8deadSopenharmony_ci UNPACK_MPEG_INTRA_QUANT GetMPEGQuantTableubv 64*Z+ ( 8,16,19,22,26,27,29,34, client 7865bd8deadSopenharmony_ci 16,16,22,24,47,49,34,37, 7875bd8deadSopenharmony_ci 19,22,26,27,29,34,34,38, 7885bd8deadSopenharmony_ci 22,22,26,27,29,34,37,40, 7895bd8deadSopenharmony_ci 22,26,27,29,32,35,40,48, 7905bd8deadSopenharmony_ci 26,27,29,32,35,40,48,58, 7915bd8deadSopenharmony_ci 26,27,29,34,38,46,56,69, 7925bd8deadSopenharmony_ci 27,29,35,38,46,56,69,83) 7935bd8deadSopenharmony_ci UNPACK_MPEG_NON_INTRA_QUANT GetMPEGQuantTableubv 64*Z+ (16,16,16,16,16,16,16,16, client 7945bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 7955bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 7965bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 7975bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 7985bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 7995bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16, 8005bd8deadSopenharmony_ci 16,16,16,16,16,16,16,16) 8015bd8deadSopenharmony_ci MPEG_PREDICTOR_WIDTH_SGIX GetMPEGParameterivSGIX 3 x Z+ 0 client 8025bd8deadSopenharmony_ci MPEG_PREDICTOR_HEIGHT_SGIX GetMPEGParameterivSGIX 3 x Z+ 0 client 8035bd8deadSopenharmony_ci 8045bd8deadSopenharmony_ciNew Implementation Dependent State 8055bd8deadSopenharmony_ci 8065bd8deadSopenharmony_ci None. 807