Identifying pixel locations using a transformation function
Techniques are described for identifying pixel locations using a transformation function. A transformation function is identified based on the projection space of a 2D representation, and pixel locations are generated using the transformation function.
1. A computer-implemented method, comprising:
receiving a two-dimensional (2D) rectangular representation of virtual reality (VR) content, the 2D rectangular representation corresponding to a three-dimensional (3D) projection space and having first pixel locations;
identifying a coordinate transformation function between the 2D rectangular representation and the 3D projection space;
generating second pixel locations from the first pixel locations using the identified coordinate transformation function, the first pixel locations including a first subset corresponding to nondisplay pixels that do not contain image content in the 2D rectangular representation, and the second pixel locations including a second subset corresponding to display pixels in the 3D projection space, wherein the first pixel locations represent 2D coordinates, and wherein the second pixel location represents 3D coordinates;
receiving pixel requests from an encoder, the pixel requests indicating at least one pixel location in the first subset for the 2D representation;
identifying pixels according to the second pixel locations; and
providing, in response to the pixel requests, the identified pixels including at least one pixel value for a pixel location in the second subset instead of a pixel value for a pixel location in the first subset to the encoder.
2. The method of claim 1 , wherein the 3D projection space is one of a cylinder, a tetrahedron, a cube, an octahedron, a dodecahedron, or an icosahedron.
3. A computer-implemented method, comprising:
receiving a two-dimensional (2D) representation of virtual reality (VR) content, the 2D representation corresponding to a three-dimensional (3D) projection space and having first pixel locations;
identifying a coordinate transformation function between the 2D representation and the 3D projection space;
receiving, from an encoder, a first request indicating a first one of the first pixel locations in the 2D representation;
generating a second pixel location from the first one of the first pixel locations using the identified coordinate transformation function, the first one of the first pixel locations corresponding to a nondisplay pixel that does not contain image content in the 2D representation, and the second pixel location corresponding to a display pixel in the 3D projection space, wherein the first pixel locations represent 2D coordinates, and wherein the second pixel location represents 3D coordinates; and
providing, in response to the first request, a pixel value for the second pixel location instead of a pixel value for the first one of the first pixel locations to the encoder.
4. The method of claim 3 , wherein the projection space is a three-dimensional (3D) polygonal projection space, and wherein the transformation function is identified based on the 3D polygonal projection.
5. The method of claim 3 , wherein generating the second pixel location includes:
identifying a vertical position of the first one of the first pixel locations;
determining a curvature of a playback projection at the vertical position of the first pixel location;
determining a horizontal position of the second pixel location according to the curvature; and
identifying the second pixel location using the vertical position and the horizontal position.
6. The method of claim 3 , further comprising:
generating a plurality of second pixel locations from the first pixel locations using the transformation function;
identifying a first set of vertices from the plurality of second pixel locations;
determining that the first set of vertices are associated with a first face of the projection space;
identifying a second set of vertices from the plurality of second pixel locations;
determining that the second set of vertices are associated with a second face of the projection space;
determining that the first set of vertices and the second set of vertices include a shared vertex; and
determining that the first face and the second face are adjacent according to the shared vertex.
7. The method of claim 6 , further comprising:
receiving a request from an encoder for a block of pixels;
identifying pixels according to pixel locations corresponding to the first face; and
providing the identified pixels to the encoder.
8. The method of claim 3 , wherein the projection space is one of an equirectangular projection, a tetrahedron projection, a cubic projection, an octahedron projection, a dodecahedron projection, or an icosahedron projection.
9. The method of claim 3 , wherein a pixel at the second location includes an average pixel value based on two or more pixels corresponding to the first pixel locations.
10. A system, comprising one or more processors and memory configured to:
receive a two-dimensional (2D) representation of virtual reality (VR) content, the 2D representation corresponding to a three-dimensional (3D) projection space and having first pixel locations;
identify a coordinate transformation function between the 2D representation and the 3D projection space;
receive, from an encoder, a first request indicating a first one of the first pixel locations in the 2D representation;
generate a second pixel location from the first one of the first pixel locations using the identified coordinate transformation function, the first one of the first pixel locations corresponding to a nondisplay pixel that does not contain image content in the 2D representation, and the second pixel location corresponding to a display pixel in the 3D projection space, wherein the first pixel locations represent 2D coordinates, and wherein the second pixel location represents 3D coordinates; and
provide, in response to the first request, a pixel value for the second pixel location instead of a pixel value for the first one of the first pixel locations to the encoder.
11. The system of claim 10 , wherein the projection space is a three-dimensional (3D) polygonal projection space, and wherein the transformation function is identified based on the 3D polygonal projection.
12. The system of claim 10 , wherein the one or more processors and memory are configured to generate the second pixel location by:
identifying a vertical position of the first one of the first pixel locations;
determining a curvature of a playback projection at the vertical position of the first pixel location;
determining a horizontal position of the second pixel location according to the curvature; and
identifying the second pixel location using the vertical position and the horizontal position.
13. The system of claim 10 , wherein the one or more processors and memory are configured to:
generate a plurality of second pixel locations from the first pixel locations using the transformation function;
identify a first set of vertices from the plurality of second pixel locations;
determine that the first set of vertices are associated with a first face of the projection space;
identify a second set of vertices from the plurality of second pixel locations;
determine that the second set of vertices are associated with a second face of the projection space;
determine that the first set of vertices and the second set of vertices include a shared vertex; and
determine that the first face and the second face are adjacent according to the shared vertex.
14. The system of claim 13 , wherein the one or more processors and memory are further configured to:
receive a request from an encoder for a block of pixels;
identify pixels according to pixel locations corresponding to the first face; and
provide the identified pixels to the encoder.
15. The system of claim 10 , wherein the projection space is one of an equirectangular projection, a tetrahedron projection, a cubic projection, an octahedron projection, a dodecahedron projection, or an icosahedron projection.
16. The system of claim 10 , wherein a pixel at the second location includes an average pixel value based on two or more pixels corresponding to the first pixel locations.