US20250254287A1
VIDEO ENCODING METHOD AND SYSTEM, AND VIDEO DECODING METHOD AND SYSTEM
Publication
Application
Classifications
IPC Classifications
CPC Classifications
Applicants
ASPEED Technology Inc.
Inventors
Keng-Yen Huang
Abstract
A video encoding method and system, and a video decoding method and system are provided. A video is obtained, and the video includes multiple images. The first image of the images is reduced in size to generate a size-reduced image. Part or all of the first image is encoded to generate an original image encoded stream. The size-reduced image is encoded to generate a size-reduced image encoded stream. The original image encoded stream and the size-reduced image encoded stream are encapsulated into a video stream. Therefore, it could be applied to situations where the viewing angle changes.
Figures
Description
BACKGROUND
Technical Field
[0001]The present disclosure generally relates to a video encoding method and system, and a video decoding method and system.
Description of Related Art
[0002]During the process of panorama or 360-degree video streaming, the camera transmits the captured panorama or 360-degree video to the server, and the server allocates the corresponding video content based on the viewing angle of the terminal. Generally speaking, when the viewing angle changes, the server needs to re-provide the corresponding video content based on this change. However, when network bandwidth is limited, it may be difficult for the server to cope with the following two scenarios at the same time: small viewing angle changes and drastic viewing angle changes.
SUMMARY
[0003]The present disclosure is directed to a video encoding method and system, and a video decoding method and system, which could cope with the above-mentioned situations.
[0004]According to one or more exemplary embodiments of the disclosure, a video encoding method includes but is not limited to, the following steps: obtaining a video, and the video comprises multiple images; reducing the size of a first image of the images, to generate a size-reduced image; encoding a part or all of the first image, to generate an original image encoded stream; encoding the size-reduced image, to generate a size-reduced image encoded stream; and encapsulating the original image encoded stream and the size-reduced image encoded stream into a video stream.
[0005]According to one or more exemplary embodiments of the disclosure, a video decoding method includes but is not limited to, the following steps: obtaining a video stream, where the video stream includes an original image encoded stream and a size-reduced image encoded stream, the original image encoded stream is generated by encoding a part or all of a first image, the size-reduced image encoded stream is generated by encoding a size-reduced image, and the size-reduced image is generated by reducing a size of the first image; obtaining a viewing angle; and decoding at least one of the original image encoded stream and the size-reduced image encoded stream according to a change of the viewing angle.
[0006]According to one or more exemplary embodiments of the disclosure, a video encoding system includes one or more memories and one or more processors. The memory is used for storing one or more program codes. The processor is coupled to the memory. The processor is configured to execute the program code and perform: obtaining a video, and the video comprises multiple images; reducing the size of a first image of the images, to generate a size-reduced image; encoding a part or all of the first image, to generate an original image encoded stream; encoding the size-reduced image, to generate a size-reduced image encoded stream; and encapsulating the original image encoded stream and the size-reduced image encoded stream into a video stream.
[0007]According to one or more exemplary embodiments of the disclosure, a video decoding system includes a communication transceiver, one or more memories, and one or more processors. The communication transceiver is used for receiving or transmitting data. The memory is used for storing one or more program codes. The processor is coupled to the memory. The processor is configured to execute the program code and perform: obtaining a video stream through the communication transceiver, where the video stream includes an original image encoded stream and a size-reduced image encoded stream, the original image encoded stream is generated by encoding a part or all of a first image, the size-reduced image encoded stream is generated by encoding a size-reduced image, and the size-reduced image is generated by reducing a size of the first image; obtaining a viewing angle; and decoding at least one of the original image encoded stream and the size-reduced image encoded stream according to a change of the viewing angle.
[0008]Based on the above, the video encoding method and system, and the video decoding method and system of one or more exemplary embodiments of the disclosure may provide the original image encoded stream corresponding to the original size and the size-reduced image encoded stream corresponding to the reduced size at the encoding side, and decode the original image encoded stream and/or the size-reduced image encoded stream according to the change of the viewing angle at the decoding side. Accordingly, the requirement for changing the viewing angle could be met, the usage of bandwidth could be saved, and appropriate images could be provided to terminal devices in time.
[0009]To make the aforementioned more comprehensible, several embodiments accompanied with drawings are described in detail as follows.
BRIEF DESCRIPTION OF THE DRAWINGS
[0010]The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification. The drawings illustrate exemplary embodiments of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
DESCRIPTION OF THE EMBODIMENTS
[0026]
[0027]The video encoding system 10 could be an image capture device, a smartphone, a tablet computer, a wearable device, a laptop, a server, other electronic devices, or a combination thereof. In one embodiment, the video encoding system 10 could be implemented by one or more of the above electronic devices.
[0028]The video encoding system 10 includes but is not limited to, one or more communication transceivers 11, one or more memories 12, and one or more processors 13.
[0029]The communication transceiver 11 could be the communication transceiving circuit supporting communication such as fifth generation (5G) or other generations of mobile communications, Wi-Fi, Bluetooth, infrared, radio frequency identification (Radio Frequency Identification, RFID), Ethernet, or optical fiber network, or could be serial communication interfaces (such as RS-232), Universal Serial Bus (USB), Thunderbolt or other communication transmission interfaces.
[0030]The memory 12 could be any type of fixed or removable random access memory (Random Access Memory, RAM), read-only memory (Read Only Memory, ROM), flash memory (flash memory), traditional hard disk drive (Hard Disk Drive, HDD), solid-state drive (Solid-State Drive, SSD) or similar components. In one embodiment, the memory 12 is used to store one or more program codes, software modules, configurations, data (such as images, bit streams, or algorithms) or files, and the embodiment will be described in detail later.
[0031]The processor 13 is coupled to the communication transceiver 11 and the memory 12. The processor 13 may be a central processing unit (CPU), a graphics processing unit (GPU), other programmable general-purpose or special-purpose microprocessor (Microprocessor), digital signal processing Digital Signal Processor (DSP), programmable controller, Field Programmable Gate Array (FPGA), Application-Specific Integrated Circuit (ASIC), neural network accelerator or other similar elements or combinations of the above elements. In one embodiment, the processor 13 is used to execute all or part of the operations of the video encoding system 10, and could load and execute each program code, software module, file, and data stored in the memory 12. In some embodiments, the functions of the processor 13 may be implemented by software or a chip.
[0032]The video decoding system 30 could be an image capture device, a smartphone, a laptop, a wearable device, a notebook computer, a server, other electronic devices, or a combination thereof. In one embodiment, the video decoding system 30 could be implemented by one or more of the above electronic devices.
[0033]The video decoding system 30 includes but is not limited to, one or more communication transceivers 31, one or more memories 32, and one or more processors 33.
[0034]The functions and implementations of the communication transceiver 31, the memory 32, and the processor 33 can be referred to the aforementioned descriptions of the communication transceiver 11, the memory 12, and the processor 13, respectively, and will not be described again here.
[0035]The processor 33 is coupled to the communication transceiver 31 and the memory 32. In one embodiment, the processor 33 is used to execute all or part of the operations of the video decoding system 30, and could load and execute each program code, software module, file, and data stored in the memory 32.
[0036]
[0037]The video decoding system 30-1 includes one or more terminal devices 35. The terminal device 35 may be a smartphone, a laptop, a wearable device, or other devices equipped with a display, e.g., LCD, LED display, or OLED display. In one embodiment, the terminal device 35 is used for playing images.
[0038]In one embodiment, the terminal device 35 detects the posture of the user's head through a motion sensor (such as an accelerometer, a gyroscope, a magnetic sensor, or an inertial sensing unit), or detects the gaze direction of eyes through an image sensor, so as to determine the user's viewing angle accordingly. For example, a specific angle, for example, 130 degrees, 145 degrees, or 150 degrees, is extended outward with the orientation of the head or the gaze direction of the eyes as the center. The terminal device 35 transmits the viewing angle to server 20. The server 20 may forward the viewing angle to video encoding system 10-1, e.g., image capture device 15. Furthermore, the video encoding system 10-1 and/or the server 20 may provide the corresponding video stream to the corresponding terminal device 35 according to the viewing angle.
[0039]
[0040]
[0041]
[0042]In the following, the method described in the embodiment of the present disclosure would be described with reference to various devices, components, and modules in the video system 1, 1-1 to 1-4. Each process of this method can be adjusted according to the implementation situation.
[0043]
[0044]Referring to
[0045]Referring to
[0046]In one embodiment, the processor 13 may cut the first image according to the viewing angle, to generate a part of the first image. The viewing angle, for example, corresponds to the head orientation or gaze direction of the eyes of the user of the terminal device 35 in
[0047]For example,
[0048]In one embodiment, the range corresponding to the extended viewing angle is extended from one or more sides of the range corresponding to the viewing angle. For example, it extends outward from the left and right sides of the range corresponding to the viewing angle, or extends outward from the upper, lower, left, and right sides of the range corresponding to the viewing angle.
[0049]For example,
[0050]It should be noticed that the size of the extension area EA could be determined according to actual needs, and is not limited in the embodiment of the present disclosure. Furthermore, the processor 13 may also directly determine the size of the range ER1 corresponding to the extended viewing angle, and cut the corresponding image area from the first image OIM1 without first cutting the image FIM1.
[0051]In one embodiment, the encoding technology may be quad-tree (QT), extended quad-tree (Extended Quad-Tree, EQT), or other data structure video encoding. For example, high-efficiency video coding (HEVC) or audio video coding standard (AVS). However, depending on different application requirements, the encoding technology may also be moving picture experts group (MPEG), ProRes, versatile video coding (VVC), or other technologies, and the embodiments of the present disclosure are not limited thereto. Thereby, a coded bit stream corresponding to all or part of the first image could be obtained.
[0052]Referring to
[0053]Referring to
[0054]
[0055]
[0056]
[0057]Referring to
[0058]In one embodiment, in response to the original image encoded stream corresponding to the all of first image, the processor 33 may cut the all of first image according to the viewing angle as the part of the first image. As described above in
[0059]Referring to
[0060]
[0061]In response to the extended viewing angle not covering the change of viewing angle, the processor 33 may decode the size-reduced image encoded stream to generate a size-reduced image (step S920). The extended viewing angle corresponds to a part of the first image, and the extended viewing angle is larger than or covers the viewing angle. As shown in
[0062]On the other hand, in response to the extended view angle covering the change of the viewing angle, the processor 33 may decode the original image encoded stream to generate a part of the first image (step S930). Taking
[0063]In one embodiment, the processor 33 may further decode the size-reduced image encoded stream to generate a size-reduced image in response to the extended view angle only partially covering the change of viewing angle. That is to say, although the range corresponding to the changed viewing angle exceeds the range corresponding to the extended viewing angle, a part of the changed viewing angle overlaps with the extended viewing angle, and another part of the changed viewing angle does not overlap with the extended viewing angle. At this time, it is still necessary to use the size-reduced image to compensate for the area beyond the range corresponding to the extended viewing angle.
[0064]
[0065]Furthermore, the processor 33 enlarges the size-reduced image FIM5 as the size of (the entire) first image, to generate a size-restored image. For example, the processor 13 enlarges the reduced image from 480 pixels×270 pixels to 3840 pixels×2160 pixels. In one embodiment, the processor 13 may enlarge the size through interpolation or super-sampling.
[0066]Then, the processor 33 may cut and restore the image according to the changed viewing angle (step S1005), to generate a temporary viewing image. The processor 13 may determine the image area (located based on pixel coordinates) of the size-restored image corresponding to the changed viewing angle, and cut the image area to generate a temporary viewing image.
[0067]In some embodiments, the processor 33 may adjust the size of the temporary viewing image according to the supported specifications (e.g., resolution) of the display of the terminal device 35 as shown in
[0068]On the other hand, the processor 33 may also report the changed viewing angle to the video encoding systems 10, 10-1˜10-4 through the communication transceiver 31, so that the video encoding systems 10, 10-1˜10-4 may generate a corresponding new original image encoded stream based on the changed viewing angle. In some application scenarios (for example, the user's position does not move), the video encoding system 10, 10-1˜10-4 may only transmit the size-reduced image encoded stream once to save bandwidth usage.
[0069]In response to the extended viewing angle completely covering the change of viewing angle, the processor 33 may only decode the original image encoded stream OEB1 (step S1007), to generate the part FIM4 of the first image (corresponding to the extended viewing angle).
[0070]In some embodiments, the processor 33 may adjust the size of the part FIM4 (corresponding to the extended viewing angle) of the first image (step S1008), to comply with the monitor's support specifications. The display may play the part FIM4 of the first image (corresponding to the extended viewing angle), and the part FIM4 of the first image corresponds to the current viewing angle (i.e., the changed viewing angle).
[0071]On the other hand, the processor 33 may also report the changed viewing angle to the video encoding systems 10, 10-1˜10-4 through the communication transceiver 31, so that the video encoding systems 10, 10-1˜10-4 may generate a corresponding new original image encoded stream based on the changed viewing angle.
[0072]In response to the extended viewing angle only partially covering the change of viewing angle, the processor 33 may decode the original image encoded stream OEB1 (step S1009, and generate the part FIM4 of the first image), and decode the size-reduced image encoded stream TEB1 (step S1010, and generate a size-reduced image FIM5). Similarly, the processor 33 may enlarge the size-reduced image FIM5 as the size of the first image, to generate a size-restored image, and cut the size-restored image according to the change of viewing angle (step S1011), to generate a temporary viewing image (please refer to Step S1005 will not be described again here).
[0073]Furthermore, in response to the extended viewing angle only partially covering the change of viewing angle, the processor 33 fuses the part of the first image (corresponding to the extended viewing angle) and the temporary viewing image to generate a fused viewing image MIM (step S1012). For example, the processor 33 may compare the range of the part of the first image with the range of the temporary viewing image at their pixel coordinates in the first image. For the area where the part of the first image overlaps with the temporary viewing image, the processor 33 retains the part of the first image (corresponding to the extended viewing angle) and abandons/deletes/ignores the part of the temporary viewing image; for the area where the part of the first image and the temporary viewing image do not overlap, the processor 33 retains the part of the temporary viewing image and discards/delete/ignore the part of the first image (corresponding to the extended viewing angle). Then, the processor 33 may fuse all the retained parts of these image areas according to their pixel coordinates, to generate a fused viewing image.
[0074]In some embodiments, the processor 33 may adjust the size of the fused viewing image (step S1013) according to the supported specifications (for example, resolution) of the display 40 of the terminal device 35 as shown in
[0075]On the other hand, the processor 33 may also report the changed viewing angle to the video encoding systems 10, 10-1˜10-4 through the communication transceiver 31, so that the video encoding systems 10, 10-1˜10-4 may generate a corresponding new original image encoded stream based on the changed viewing angle. Before obtaining the new original image encoded stream, the display 40 may still play the image corresponding to the changed viewing angle.
[0076]In summary, in the video encoding method and system and the video decoding method and system of the embodiments of the present invention, the encoding end provides an image area with an extended viewing angle that is larger than the viewing angle and an encoded stream corresponding to the size-reduced image, and decoding end provides the appropriate encoded stream based on the change of viewing angle. It could meet the needs of changing viewing angles, enable uninterrupted viewing of content and save bandwidth usage, thereby improving the viewing experience and immersion.
[0077]It will be apparent to those skilled in the art that various modifications and variations can be made to the disclosed embodiments without departing from the scope or spirit of the disclosure. In view of the foregoing, it is intended that the disclosure covers modifications and variations provided that they fall within the scope of the following claims and their equivalents.
Claims
What is claimed is:
1. A video encoding method, comprising:
obtaining a video, wherein the video comprises a plurality of images;
reducing a size of a first image of the plurality of images, to generate a size-reduced image;
encoding a part or all of the first image, to generate an original image encoded stream;
encoding the size-reduced image, to generate a size-reduced image encoded stream; and
encapsulating the original image encoded stream and the size-reduced image encoded stream into a video stream.
2. The video encoding method according to
cutting the first image according to a viewing angle, to generate the part of the first image, wherein an extended viewing angle corresponding to the part of the first image is larger than the viewing angle.
3. The video encoding method according to
4. The video encoding method according to
5. A video decoding method, comprising:
obtaining a video stream, wherein the video stream comprises an original image encoded stream and a size-reduced image encoded stream, the original image encoded stream is generated by encoding a part or all of a first image, the size-reduced image encoded stream is generated by encoding a size-reduced image, and the size-reduced image is generated by reducing a size of the first image;
obtaining a viewing angle; and
decoding at least one of the original image encoded stream and the size-reduced image encoded stream according to a change of the viewing angle.
6. The video decoding method according to
in response to an extended viewing angle not covering the change of the viewing angle, decoding the size-reduced image encoded stream, to generate the size-reduced image, wherein the extended viewing angle corresponds to the part of the first image, and the extended viewing angle is larger than the viewing angle; and
in response to the extended viewing angle covering the change of the viewing angle, decoding the original image encoded stream, to generate the part of the first image.
7. The video decoding method according to
in response to the extended viewing angle partially covering the change of the viewing angle, further decoding the size-reduced image encoded stream, to generate the size-reduced image.
8. The video decoding method according to
enlarging the size-reduced image as a size of the first image, to generate a size-restored image; and
cutting the size-restored image according to the change of the viewing angle, to generate a temporary viewing image.
9. The video decoding method according to
in response to the extended viewing angle partially covering the change of the viewing angle, fusing the part of the first image and the temporary viewing image, to generate a fused viewing image.
10. The video decoding method according to
cutting the all of the first image according to the viewing angle, to generate the part of the first image, wherein an extended viewing angle corresponding to the part of the first image is larger than the viewing angle.
11. A video encoding system, comprising:
at least one memory, used for storing at least one program code; and
at least one processor, coupled to the at least one memory, configured to execute the at least one program code and perform:
obtaining a video, wherein the video comprises a plurality of images;
reducing a size of a first image of the plurality of images, to generate a size-reduced image;
encoding a part or all of the first image, to generate an original image encoded stream;
encoding the size-reduced image, to generate a size-reduced image encoded stream; and
encapsulating the original image encoded stream and the size-reduced image encoded stream into a video stream.
12. The video encoding system according to
cutting the first image according to a viewing angle, to generate the part of the first image, wherein an extended viewing angle corresponding to the part of the first image is larger than the viewing angle.
13. The video encoding system according to
14. The video encoding system according to
15. The video encoding system according to
at least one image capturing device, coupled to the at least one processor, and used for recording the video.
16. A video decoding system, comprising:
a communication transceiver, used for receiving or transmitting data;
at least one memory, used for storing at least one program code; and
at least one processor, coupled to the communication transceiver and the at least one memory, configured to execute the at least one program code and perform:
obtaining, through the communication transceiver, a video stream, wherein the video stream comprises an original image encoded stream and a size-reduced image encoded stream, the original image encoded stream is generated by encoding a part or all of a first image, the size-reduced image encoded stream is generated by encoding a size-reduced image, and the size-reduced image is generated by reducing a size of the first image;
obtaining a viewing angle; and
decoding at least one of the original image encoded stream and the size-reduced image encoded stream according to a change of the viewing angle.
17. The video decoding system according to
in response to an extended viewing angle not covering the change of the viewing angle, decoding the size-reduced image encoded stream, to generate the size-reduced image, wherein the extended viewing angle corresponds to the part of the first image, and the extended viewing angle is larger than the viewing angle; and
in response to the extended viewing angle covering the change of the viewing angle, decoding the original image encoded stream, to generate the part of the first image.
18. The video decoding system according to
in response to the extended viewing angle partially covering the change of the viewing angle, further decoding the size-reduced image encoded stream, to generate the size-reduced image.
19. The video decoding system according to
enlarging the size-reduced image as a size of the first image, to generate a size-restored image; and
cutting the size-restored image according to the change of the viewing angle, to generate a temporary viewing image.
20. The video decoding system according to
in response to the extended viewing angle partially covering the change of the viewing angle, fusing the part of the first image and the temporary viewing image, to generate a fused viewing image.
21. The video decoding system according to
cutting the all of the first image according to the viewing angle, to generate the part of the first image, wherein an extended viewing angle corresponding to the part of the first image is larger than the viewing angle.