(19)
(11)EP 3 780 636 A1

(12)EUROPEAN PATENT APPLICATION
published in accordance with Art. 153(4) EPC

(43)Date of publication:
17.02.2021 Bulletin 2021/07

(21)Application number: 18924523.6

(22)Date of filing:  25.06.2018
(51)Int. Cl.: 
H04N 21/4363  (2011.01)
H04N 21/4402  (2011.01)
(86)International application number:
PCT/CN2018/092630
(87)International publication number:
WO 2020/000135 (02.01.2020 Gazette  2020/01)
(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR
Designated Extension States:
BA ME
Designated Validation States:
KH MA MD TN

(71)Applicant: HUAWEI TECHNOLOGIES CO., LTD.
Shenzhen, Guangdong 518129 (CN)

(72)Inventors:
  • YUAN, Le
    Shenzhen, Guangdong 518129 (CN)
  • WANG, Zheng
    Shenzhen, Guangdong 518129 (CN)
  • WU, Renjian
    Shenzhen, Guangdong 518129 (CN)
  • HUANG, Fang
    Shenzhen, Guangdong 518129 (CN)

(74)Representative: Pfenning, Meinig & Partner mbB 
Patent- und Rechtsanwälte Theresienhöhe 11a
80339 München
80339 München (DE)


(56)References cited: : 
  
      


    (54)METHOD AND APPARATUS FOR PROCESSING HIGH DYNAMIC RANGE VIDEO INCLUDING CAPTIONS


    (57) Embodiments of this application disclose a method and an apparatus for processing a high dynamic range video including a subtitle. The method includes: encapsulating HDR video data into a video data frame that matches a transmission interface; encapsulating subtitle information into a subtitle information frame that matches the transmission interface; and separately transmitting the video data frame and the subtitle information frame to a display device through the transmission interface, where the video data frame and the subtitle information frame are packets in two types of formats. According to the method provided in this application, content and subtitle information of a dynamic metadata HDR video are separately transmitted to the display device. In this way, the display device can obtain the separated video content and subtitle information, and then separately perform corresponding processing on the HDR video and a subtitle. This improves a subtitle display effect of the dynamic metadata HDR video.




    Description

    TECHNICAL FIELD



    [0001] This application relates to the field of multimedia communication, and in particular, to a method and an apparatus for processing a high dynamic range video including a subtitle.

    BACKGROUND



    [0002] A high dynamic range (High Dynamic Range, HDR) video technology expands a luminance range of an image that can be displayed, so that information in a relatively large luminance range can be recorded, and more details in bright and dark regions can be presented. Forms of metadata used to describe an HDR video feature include a static metadata HDR video and a dynamic metadata HDR video. Both the static metadata HDR video and the dynamic metadata HDR video can be correctly presented on a screen only after tone mapping tone mapping is performed on a video signal source featured by a wide dynamic range. For the static metadata HDR video, a fixed mapping method is used to process all images, and a mapping manner does not vary with a change in a video image. For the dynamic metadata HDR video, a mapping method is dynamically adjusted based on a change in image content, so that images in various luminance ranges can be optimally displayed and presented.

    [0003] A subtitle plays an important role in assisting a subscriber in watching a program. Almost all types of TV programs, such as TV series, movies, and variety shows, are provided with subtitles. In addition, a bullet screen subtitle is becoming popular. When a subscriber watches a dynamic metadata HDR video, a display effect of a subtitle greatly affects user experience. However, the dynamic metadata HDR video does not describe subtitle content. A subtitle display effect is poor if an existing video processing method is used to process a dynamic metadata HDR video including a subtitle.

    SUMMARY



    [0004] Embodiments of this application provide a method and an apparatus for processing a high dynamic range video including a subtitle, to improve a subtitle display effect of a dynamic metadata HDR video.

    [0005] A first aspect of this application provides a method for processing a high dynamic range video including a subtitle. The method includes: encapsulating HDR video data into a video data frame that matches a transmission interface; encapsulating subtitle information into a subtitle information frame that matches the transmission interface; and separately transmitting the video data frame and the subtitle information frame to a display device through the transmission interface, where the video data frame and the subtitle information frame are packets in two types of formats.

    [0006] According to the video processing method provided in this application, content and subtitle information of a dynamic metadata HDR video are separately transmitted to the display device. In this way, the display device can obtain the separated video content and subtitle information, and then separately perform corresponding processing on the HDR video and a subtitle. This improves a subtitle display effect of the dynamic metadata HDR video.

    [0007] In a possible implementation, the separately transmitting the video data frame and the subtitle information frame to a display device through the transmission interface specifically includes: transmitting the video data frame and the subtitle information frame to the display device through the transmission interface in a time-division manner.

    [0008] In a possible implementation, the transmission interface corresponds to a plurality of transmission frequency bands, and the video data frame and the subtitle information frame are transmitted through the transmission interface in a frequency-division manner.

    [0009] In a possible implementation, the transmission interface corresponds to a plurality of transmission channels, and the video data frame and the subtitle information frame are transmitted through the transmission interface in a channel-division manner.

    [0010] In a possible implementation, the subtitle information frame is transmitted within a vertical blanking, and the vertical blanking is a time interval at which two adjacent video data frames are transmitted.

    [0011] Two video data frames are sent at a time interval. The time interval may be used to transmit information other than video data, for example, audio information and metadata information. The transmission interface can provide very high bandwidth for transmitting audio and video information, and an information mount of the subtitle information is far less than an information amount of the video data. Therefore, the time interval between the video data frames is sufficient for transmitting the subtitle information frame.

    [0012] In a possible implementation, the video data frames are sequentially transmitted through the transmission interface in chronological order, where an Nth video data frame is transmitted in an Nth timeslot, a subtitle information frame corresponding to the Nth video data frame is transmitted within a vertical blanking of the Nth timeslot, and N is a positive integer.

    [0013] A subtitle information frame and a video data frame corresponding to the subtitle information frame are transmitted in a same timeslot. This can ensure synchronization between a video image and a subtitle.

    [0014] In a possible implementation, a correspondence between a subtitle information frame and a video data frame is preset, and the video data frame and the subtitle information frame are transmitted based on the preset correspondence in the time-division manner.

    [0015] The correspondence between a subtitle information frame and a video data frame is preset, and the subtitle information frame and the video data frame are sent based on the preset correspondence. This can ensure synchronization between the video image and the subtitle.

    [0016] In a possible implementation, the subtitle information frame includes at least one of a type identification field or a plurality of valid subtitle information payload bytes.

    [0017] In a possible implementation, the subtitle information frame further includes at least one of a version identification field or a length identification field, and a value of the length identification field is related to a quantity of the plurality of valid subtitle information payload bytes.

    [0018] The version identifier field facilitates subsequent development and improvement of a subtitle information frame based on the encapsulation format. For example, a subtitle information frame format first launched is an initial version, and a new field is subsequently added to satisfy a new requirement. In this case, a version 2, a version 3, and the like may be provided. This field is used to indicate a version of a current information frame, so that a playing device and the display device perform corresponding processing based on different subtitle information frame versions. The length identification field is used to indicate a length of a to-be-transmitted subtitle information frame, to help preliminarily determine a size of the subtitle information frame, adjust a quantity of bytes occupied for transmitting the subtitle information frame, and improve flexibility of subtitle processing.

    [0019] In a possible implementation, valid subtitle information included in the plurality of valid subtitle information payload bytes includes at least one of subtitle text content, a codeword corresponding to the subtitle text content, or subtitle drawing control information.

    [0020] In a possible implementation, the subtitle drawing control information includes at least one of a font, a size, a color, a position, an aspect ratio, transparency, color gamut information, or a bit depth of a subtitle.

    [0021] In a possible implementation, the plurality of valid subtitle information payload bytes include a valid information flag byte, and the valid information flag byte is used to limit respective identification content of another valid subtitle information payload byte.

    [0022] In a possible implementation, the transmission interface is a high -definition multimedia interface HDMI.

    [0023] In a possible implementation, the method further includes: receiving a transport stream, where the transport stream includes the HDR video data, the subtitle information, and metadata metadata, and the metadata includes a mapping relationship for performing tone mapping tone mapping on the HDR video data.

    [0024] In a possible implementation, the method further includes: encapsulating the metadata into a metadata information frame that matches the transmission interface; and transmitting, within the vertical blanking of the Nth timeslot, a metadata information frame corresponding to the Nth video data frame.

    [0025] In a possible implementation, the subtitle information frame is transmitted before or after the metadata.

    [0026] A second aspect of this application provides a method for processing a high dynamic range video including a subtitle. The method includes: separately receiving, through a transmission interface, a video data frame and a subtitle information frame that are transmitted from a playing device; decapsulating the video data frame to obtain HDR video data; decapsulating the subtitle information frame to obtain subtitle information; separately performing tone mapping on the HDR video data and a subtitle image, where the subtitle image is drawn based on the subtitle information; and overlaying HDR video data obtained after tone mapping and a subtitle image obtained after tone mapping, to obtain a video image including a subtitle.

    [0027] In a possible implementation, the separately receiving, through a transmission interface, a video data frame and a subtitle information frame that are transmitted from a playing device specifically includes: receiving, through the transmission interface in a time-division manner, the video data frame and the subtitle information frame that are transmitted from the playing device.

    [0028] In a possible implementation, the subtitle information frame is transmitted within a vertical blanking, and the vertical blanking is a time interval at which two adjacent video data frames are transmitted.

    [0029] Two video data frames are sent at a time interval. The time interval may be used to transmit information other than video data, for example, audio information and metadata information. The transmission interface can provide very high bandwidth for transmitting audio and video information, and an information mount of the subtitle information is far less than an information amount of the video data. Therefore, the time interval between the video data frames is sufficient for transmitting the subtitle information frame.

    [0030] In a possible implementation, the video data frames are sequentially transmitted through the transmission interface in chronological order, where an Nth video data frame is transmitted in an Nth timeslot, a subtitle information frame corresponding to the Nth video data frame is transmitted within a vertical blanking of the Nth timeslot, and N is a positive integer.

    [0031] A subtitle information frame and a video data frame corresponding to the subtitle information frame are transmitted in a same timeslot. This can ensure synchronization between a video image and a subtitle.

    [0032] In a possible implementation, a correspondence between a subtitle information frame and a video data frame is preset, and the video data frame and the subtitle information frame are transmitted based on the preset correspondence in the time-division manner.

    [0033] The correspondence between a subtitle information frame and a video data frame is preset, and the subtitle information frame and the video data frame are sent based on the preset correspondence. This can ensure synchronization between the video image and the subtitle.

    [0034] In a possible implementation, the subtitle information frame includes at least one of a type identification field or a plurality of valid subtitle information payload bytes.

    [0035] In a possible implementation, the subtitle information frame further includes at least one of a version identification field or a length identification field, and a value of the length identification field is related to a quantity of the plurality of valid subtitle information payload bytes.

    [0036] In a possible implementation, valid subtitle information included in the plurality of valid subtitle information payload bytes includes at least one of subtitle text content, a codeword corresponding to the subtitle text content, or subtitle drawing control information.

    [0037] In a possible implementation, the subtitle drawing control information includes at least one of a font, a size, a color, a position, an aspect ratio, transparency, color gamut information, or a bit depth of a subtitle.

    [0038] In a possible implementation, the plurality of valid subtitle information payload bytes include a valid information flag byte, and the valid information flag byte is used to limit respective identification content of another valid subtitle information payload byte.

    [0039] In a possible implementation, the transmission interface corresponds to a plurality of transmission frequency bands, and the separately receiving, through a transmission interface, a video data frame and a subtitle information frame that are transmitted from a playing device specifically includes: receiving, through the transmission interface, the video data frame and the subtitle information frame that are transmitted from the playing device in a frequency-division manner. Alternatively, the transmission interface corresponds to a plurality of transmission channels, and the separately receiving, through a transmission interface, a video data frame and a subtitle information frame that are transmitted from a playing device specifically includes: receiving, through the transmission interface, the video data frame and the subtitle information frame that are transmitted from the playing device in a channel-division manner.

    [0040] In a possible implementation, the method further includes: receiving a metadata information frame through the transmission interface; decapsulating the metadata information frame to obtain metadata, where the metadata includes a mapping relationship for performing tone mapping tone mapping on the HDR video data; and the separately performing tone mapping on the HDR video data and a subtitle image includes: performing tone mapping on the HDR video data based on the metadata; and performing tone mapping on the subtitle image based on a range of luminance that can be displayed by a display device.

    [0041] In a possible implementation, the transmission interface is a high -definition multimedia interface HDMI.

    [0042] A third aspect of this application provides an apparatus for playing a high dynamic range video including a subtitle. The apparatus includes a processor and a transmission interface. The processor is configured to implement the following operations: encapsulating HDR video data into a video data frame that matches the transmission interface; and encapsulating subtitle information into a subtitle information frame that matches the transmission interface. The transmission interface is configured to separately transmit the video data frame and the subtitle information frame to a display device, where the video data frame and the subtitle information frame are packets in two types of formats.

    [0043] In a possible implementation, the transmission interface is specifically configured to transmit the video data frame and the subtitle information frame to the display device in a time-division manner.

    [0044] In a possible implementation, the subtitle information frame is transmitted within a vertical blanking, and the vertical blanking is a time interval at which two adjacent video data frames are transmitted.

    [0045] Two video data frames are sent at a time interval. The time interval may be used to transmit information other than video data, for example, audio information and metadata information. The transmission interface can provide very high bandwidth for transmitting audio and video information, and an information mount of the subtitle information is far less than an information amount of the video data. Therefore, the time interval between the video data frames is sufficient for transmitting the subtitle information frame.

    [0046] In a possible implementation, the video data frames are sequentially transmitted through the transmission interface in chronological order, where an Nth video data frame is transmitted in an Nth timeslot, a subtitle information frame corresponding to the Nth video data frame is transmitted within a vertical blanking of the Nth timeslot, and N is a positive integer.

    [0047] A subtitle information frame and a video data frame corresponding to the subtitle information frame are transmitted in a same timeslot. This can ensure synchronization between a video image and a subtitle.

    [0048] In a possible implementation, a correspondence between a subtitle information frame and a video data frame is preset, and the video data frame and the subtitle information frame are transmitted based on the preset correspondence in the time-division manner.

    [0049] The correspondence between a subtitle information frame and a video data frame is preset, and the subtitle information frame and the video data frame are sent based on the preset correspondence. This can ensure synchronization between the video image and the subtitle.

    [0050] In a possible implementation, the subtitle information frame includes at least one of a type identification field or a plurality of valid subtitle information payload bytes.

    [0051] In a possible implementation, the subtitle information frame further includes at least one of a version identification field or a length identification field, and a value of the length identification field is related to a quantity of the plurality of valid subtitle information payload bytes.

    [0052] In a possible implementation, valid subtitle information included in the plurality of valid subtitle information payload bytes includes at least one of subtitle text content, a codeword corresponding to the subtitle text content, or subtitle drawing control information.

    [0053] In a possible implementation, the transmission interface is specifically configured to transmit the video data frame and the subtitle information frame to the display device in a frequency-division manner or in a channel-division manner.

    [0054] In a possible implementation, the transmission interface is a high-definition multimedia interface HDMI.

    [0055] In a possible implementation, the transmission interface is an HDMI transmitter.

    [0056] In a possible implementation, the apparatus further includes: a receiving interface, configured to receive a transport stream. The transport stream includes the HDR video data, the subtitle information, and metadata metadata, where the metadata includes a mapping relationship for performing tone mapping tone mapping on the HDR video data.

    [0057] In a possible implementation, the processor is further configured to encapsulate the metadata into a metadata information frame that matches the transmission interface. The transmission interface is configured to transmit, within the vertical blanking of the Nth timeslot, a metadata information frame corresponding to the Nth video data frame to the display device.

    [0058] In a possible implementation, the apparatus further includes a memory. The memory is configured to store a program instruction, and the program instruction is used to drive the processor to perform the foregoing operations.

    [0059] In a possible implementation, the memory includes at least one of a computer-readable storage medium, a floppy disk device, a hard disk device, an optical disc device, or a magnetic disk device.

    [0060] In a possible implementation, the processor is further configured to perform the method described in any possible implementation of the first aspect.

    [0061] A fourth aspect of this application provides an apparatus for displaying a high dynamic range video including a subtitle. The apparatus includes: a receiving interface and a processor. The receiving interface is configured to separately receive a video data frame and a subtitle information frame that are transmitted from a playing device. The processor is configured to: decapsulate the video data frame to obtain HDR video data; decapsulate the subtitle information frame to obtain subtitle information; separately perform tone mapping on the HDR video data and a subtitle image, where the subtitle image is drawn based on the subtitle information; and overlay HDR video data obtained after tone mapping and a subtitle image obtained after tone mapping, to obtain a video image including a subtitle.

    [0062] In a possible implementation, the transmission interface is specifically configured to receive, in a time-division manner, the video data frame and the subtitle information frame that are transmitted from the playing device.

    [0063] In a possible implementation, the subtitle information frame is transmitted within a vertical blanking, and the vertical blanking is a time interval at which two adjacent video data frames are transmitted.

    [0064] In a possible implementation, the video data frames are sequentially received through the transmission interface in chronological order, where an Nth video data frame is transmitted in an Nth timeslot, a subtitle information frame corresponding to the Nth video data frame is transmitted within a vertical blanking of the Nth timeslot, and N is a positive integer.

    [0065] In a possible implementation, the transmission interface is a high-definition multimedia interface HDMI.

    [0066] In a possible implementation, the transmission interface is an HDMI receiver.

    [0067] In a possible implementation, the apparatus further includes a memory. The memory is configured to store a program instruction, and the program instruction is used to drive the processor to perform the foregoing operations.

    [0068] In a possible implementation, the memory includes at least one of a computer-readable storage medium, a floppy disk device, a hard disk device, an optical disc device, or a magnetic disk device.

    [0069] In a possible implementation, the processor is further configured to perform the method described in any possible implementation of the second aspect.

    [0070] A fifth aspect of this application provides an apparatus for playing a high dynamic range video including a subtitle. The apparatus includes: an encapsulation module, configured to encapsulate HDR video data into a video data frame that matches a transmission interface, where the encapsulation module is further configured to encapsulate subtitle information into a subtitle information frame that matches the transmission interface; and a transmission module, configured to separately transmit the video data frame and the subtitle information frame to a display device through the transmission interface, where the video data frame and the subtitle information frame are packets in two types of formats.

    [0071] In a possible implementation, the separately transmitting the video data frame and the subtitle information frame to a display device through the transmission interface specifically includes: transmitting the video data frame and the subtitle information frame to the display device through the transmission interface in a time-division manner.

    [0072] In a possible implementation, the transmission interface corresponds to a plurality of transmission frequency bands, and the video data frame and the subtitle information frame are transmitted through the transmission interface in a frequency-division manner.

    [0073] In a possible implementation, the transmission interface corresponds to a plurality of transmission channels, and the video data frame and the subtitle information frame are transmitted through the transmission interface in a channel-division manner.

    [0074] In a possible implementation, the transmission interface is a high -definition multimedia interface HDMI.

    [0075] In a possible implementation, the apparatus further includes: a receiving module, configured to receive a transport stream. The transport stream includes the HDR video data, the subtitle information, and metadata metadata, where the metadata includes a mapping relationship for performing tone mapping tone mapping on the HDR video data.

    [0076] In a possible implementation, the encapsulation module is further configured to: encapsulate the metadata into a metadata information frame that matches the transmission interface; and transmit, within a vertical blanking of an Nth timeslot, a metadata information frame corresponding to an Nth video data frame.

    [0077] In a possible implementation, the subtitle information frame is transmitted before or after the metadata.

    [0078] A sixth aspect of this application provides an apparatus for displaying a high dynamic range video including a subtitle. The apparatus includes: a receiving module, configured to separately receive, through a transmission interface, a video data frame and a subtitle information frame that are transmitted from a playing device; a decapsulation module, configured to decapsulate the video data frame to obtain HDR video data, where the decapsulation module is further configured to decapsulate the subtitle information frame to obtain subtitle information; a processing module, configured to separately perform tone mapping on the HDR video data and a subtitle image, where the subtitle image is drawn based on the subtitle information; and an overlaying module, configured to overlay HDR video data obtained after tone mapping and a subtitle image obtained after tone mapping, to obtain a video image including a subtitle.

    [0079] In a possible implementation, the apparatus further includes: a receiving module, configured to receive a metadata information frame through the transmission interface. The decapsulation module is further configured to decapsulate the metadata information frame to obtain metadata, where the metadata includes a mapping relationship for performing tone mapping tone mapping on the HDR video data. The processing module is specifically configured to perform tone mapping on the HDR video data based on the metadata. The processing module is further configured to perform tone mapping on the subtitle image based on a range of luminance that can be displayed by a display device.

    [0080] In a possible implementation, the transmission interface is a high -definition multimedia interface HDMI.

    [0081] A seventh aspect of this application provides a system for processing a high dynamic range video including a subtitle. The system includes a playing apparatus and a display apparatus. The playing apparatus is the playing apparatus described in any one of the first aspect, the fifth aspect, or the possible implementations of the third or the fifth aspect. The display apparatus is the display apparatus described in any one of the fourth aspect, the sixth aspect, or the possible implementations of the fourth or the sixth aspect.

    [0082] An eighth aspect of this application provides a computer-readable storage medium. The computer-readable storage medium stores an instruction. When the instruction is run on a computer or a processor, the computer or the processor is enabled to perform the method described in any one of the first aspect or the possible implementations of the first aspect.

    [0083] A ninth aspect of this application provides a computer program product including an instruction. When the computer program product runs on a computer or a processor, the computer or the processor is enabled to perform the method described in any one of the first aspect or the possible implementations of the first aspect.

    BRIEF DESCRIPTION OF DRAWINGS



    [0084] 

    FIG. 1 is a schematic diagram of an example application scenario according to an embodiment of this application;

    FIG. 2(a) is a schematic diagram of a tone mapping relationship for static metadata according to an embodiment of this application;

    FIG. 2(b) is a schematic diagram of a tone mapping relationship for dynamic metadata according to an embodiment of this application;

    FIG. 3 is a schematic diagram of a framework of a video playing system according to an embodiment of this application;

    FIG. 4 is a schematic timing diagram of a transmission channel according to an embodiment of this application;

    FIG. 5 is a schematic diagram of a hardware architecture of a video playing system according to an embodiment of this application;

    FIG. 6 is a schematic diagram of a hardware architecture of a playing device according to an embodiment of this application;

    FIG. 7 is a schematic diagram of a hardware architecture of a display device according to an embodiment of this application;

    FIG. 8 is a flowchart of a method for displaying a video including a subtitle according to an embodiment of this application; and

    FIG. 9 is a flowchart of another method for displaying a video including a subtitle according to an embodiment of this application.


    DESCRIPTION OF EMBODIMENTS



    [0085] In the embodiments, claims, and the accompanying drawings of this specification in this application, the terms "first", "second", and the like are intended to distinguish between similar objects, but do not necessarily indicate a specific order or sequence. In addition, the terms "include", "have", and any variant thereof are intended to cover a non-exclusive inclusion, for example, include a series of steps or units. Methods, systems, products, or devices are not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to such processes, methods, products, or devices.

    [0086] It should be understood that, in this application, "at least one" means one or more, and "a plurality of" means two or more. The term "and/or" is used to describe an association relationship for describing associated objects, and indicates that three relationships may exist. For example, "A and/or B" may represent the following three cases: Only A exists, only B exists, and both A and B exist, where A and B may be singular or plural. The character "/" generally indicates an "or" relationship between the associated objects. "At least one of the following items (pieces)" or a similar expression thereof indicates any combination of these items, including a single item (piece) or any combination of a plurality of items (pieces). For example, at least one of a, b, or c may indicate a, b, c, "a and b", "a and c", "b and c", or "a, b, and c", where a, b, and c may be singular or plural.

    [0087] FIG. 1 is a schematic diagram of an example application scenario according to an embodiment of this application. In this application scenario, a playing device 102 receives and decodes an audio/video stream 101. The playing device 102 sends, through a high-definition multimedia interface (High Definition Multimedia Interface, HDMI), decoded video or audio data to a display device 103 for displaying or playing. In this way, a user can enjoy video or audio content.

    [0088] For example, the audio/video stream 101 may be from a website streaming medium, a remote network device, the internet, a fiber-optic network, or the like. The video stream may be dynamic metadata HDR video data or static metadata HDR video data. For example, the audio/video stream 101 may be a data stream in a transport stream (Transport Stream, TS) format. A TS may include a video stream, an audio stream, a subtitle packet, and the like. The audio/video stream may alternatively be a data stream in another similar format. For example, the streaming medium may also use a Matroska Video File (Matroska Video File, MKV) format to encapsulate audio data, video data, subtitle data, and the like. Similarly, an audio video interleaved (Audio Video Interleaved, AVI) format may also be used. A transport format of the audio/video stream is not limited in this application. For example, the video stream may include HDR video data and metadata used to describe an HDR video. In this case, both the metadata and the HDR video data are compressed into the video stream. Optionally, the TS may include the video stream, the audio stream, the subtitle packet, and the metadata used to describe the HDR video. In this case, the metadata used to describe the HDR video data is included in the TS and is not compressed into the video stream. The subtitle packet may include a font, a size, a color, a position, an aspect ratio, color gamut information, a bit depth, text content, and the like of a subtitle. The metadata includes a description of video image data. For example, static metadata describes a production environment of an entire video, and may include related information of a monitor used for color tuning and correction in video production, peak luminance, a black level, RGB tricolor coordinates, and white point coordinates. For example, dynamic metadata usually describes content of each frame of a video image, for example, may include maximum luminance, minimum luminance, average luminance, and the like of the image. Optionally, the dynamic metadata may further include a reference mapping curve between a frame of image and a display screen. It should be understood that the reference mapping curve included in the dynamic metadata varies with a change in the video image.

    [0089] In an optional solution, the playing device 102 may be a set top box (Set Top Box, STB), a multimedia player, or the like. The STB mainly has many security functions, for example, charging by inserting a card, and video encryption and decryption. Some high-quality videos are protected by using a digital rights protection mechanism, and can be watched on a TV only after being decrypted by the STB. Video data received by the STB is usually encoded video data. The STB further has a decoding function. Usually, the STB decodes the video data and then sends decoded video data to the TV for displaying. The following uses the STB as an example to describe an application scenario in the embodiments of this application. The STB parses a received TS to obtain video data, subtitle data, and the like. Then the STB decodes the video data and draws a subtitle. Optionally, the STB overlays video content and subtitle content, and transmits overlaid video content and subtitle content to the display device 103 through wired or wireless HDMI or display port transmission.

    [0090] For example, the display device 103 may be a TV, a computer display, or any fixed or mobile terminal that has a display function. The TV displays an overlaid video and subtitle sent by the STB on a screen after performing display processing. For example, the display processing may be that the TV adjusts video luminance based on a preset tone mapping relationship, so that the video content adapts to a display capability of the TV. Optionally, when a video transmitted by the STB is a HDR video with dynamic metadata, and the TV is a TV with an HDR display function, the TV performs tone mapping tone mapping on different video images based on a plurality of tone mapping relationships included in dynamic metadata, so that the different images can be optimally displayed and presented. In this application scenario, the STB overlays the video content and the subtitle content and then sends the overlaid video content and subtitle content to the TV. Therefore, the TV does not distinguish between the video and the subtitle. Instead, the TV uses a mapping method for processing the dynamic metadata HDR video, to process the overlaid video and subtitle. In a process of displaying the video content, subtitle luminance flickers.

    [0091] It should be understood that, the embodiments of this application focus on displaying of a video including a subtitle. Therefore, processing of video data and subtitle data is described in detail, and processing of audio data and other data is omitted. This does not mean that the STB cannot parse and process data other than the video data and the subtitle data. The foregoing application scenario is merely for ease of description, and is not intended to limit the embodiments. The embodiments of this application may be further extended to more application scenarios of video displaying.

    [0092] It should be understood that "tone mapping" mentioned in this application is a Chinese expression of "tone mapping", and tone mapping is essentially to adjust a luminance range of a video image to a range of luminance that can be displayed on a display screen. For ease of understanding a concept of tone mapping, the following separately provides schematic diagrams of tone mapping for a static metadata HDR video and a dynamic metadata HDR video, as shown in FIG. 2.

    [0093] For the static metadata HDR video, a fixed mapping method is used to process all video images. As shown in FIG. 2(a), the static metadata HDR video has a fixed mapping curve. An input luminance range of the mapping curve is 0-4000 nits, and an output luminance of the mapping curve is 0-500 nits. The TV uses the mapping curve to perform tone mapping on all three frames of images whose maximum luminance is 200 nits, 1500 nits, and 4000 nits respectively, and displays processed images on a display. Actual luminance ranges of the first two frames of images do not satisfy the mapping relationship. As a result, most details of the first two frames of images are lost, the entire image is dark, and a display effect is poor. The dynamic metadata HDR video has a plurality of mapping curves. In a process of displaying a video image, a mapping curve is used based on actual luminance of the image. FIG. 2(b) shows three different mapping curves. An input luminance range of a mapping curve 1 is 0-500 nits, and an output luminance range of the mapping curve 1 is 0-500 nits. An input luminance range of a mapping curve 2 is 0-1500 nits, and an output luminance range of the mapping curve 2 is 0-500 nits. An input luminance range of a mapping curve 3 is 0-4000 nits, and an output luminance range of the mapping curve 3 is 0-500 nits. The TV selects, based on an actual luminance range of an image frame, a proper mapping curve to perform tone mapping. In this way, images with different luminance can be optimally presented on the screen. For example, the mapping curve 2 is selected to perform tone mapping on an image with highest luminance of 1500 nits, and a processed image retains image details. It should be understood that input luminance of the mapping curve is luminance represented by a video signal source, and output luminance of the mapping curve is luminance that can be actually displayed by the display device such as the TV. For the HDR video, a luminance range represented by a video signal produced in a professional film production environment is usually greater than a range of luminance that can be displayed by a consumer TV set. Tone mapping is a technology for mapping a luminance range of an input video signal to a range of luminance displayed by the display device.

    [0094] FIG. 3 is a schematic diagram of a framework of a video display system according to an embodiment of this application. A playing device 302 includes a demultiplexing module, a video decoding module, a subtitle parsing module, and an encapsulation module. The encapsulation module separately encapsulates video data and subtitle data. A display device 303 includes a decapsulation module, a video processing module, a subtitle processing module, a video and subtitle overlaying module (or may be referred to as a video and subtitle mixing module), a display module, and the like. It should be understood that, in this embodiment of this application, the playing device and the display device are functionally divided. In actual implementation, there may be another division manner. For example, a plurality of modules may be combined or integrated into another system. Coupling between the modules may be implemented through some interfaces. These interfaces are usually electrical communications interfaces, but may alternatively be mechanical interfaces or interfaces in another form. Therefore, modules described as separate parts may or may not be physically separate, may be located in one position, or may be distributed in different positions of a same device or different devices.

    [0095] The playing device 302 receives a transport stream 301. For a source, a format, and content of the transport stream, refer to descriptions of the audio/video stream 101. Details are not described herein again.

    [0096] The demultiplexing module may be, for example, a demultiplexer Demux or a demultiplexer. The demultiplexing module is configured to parse the received TS to obtain a video stream, subtitle data, audio data, and data of another type. It should be understood that obtained video data may be standard dynamic range (Standard Dynamic Range, SDR) video data, static metadata HDR video data, or dynamic metadata HDR video data. In this embodiment of this application, a dynamic metadata HDR video is used as an example to describe a system for displaying a video including a subtitle.

    [0097] The video decoding module may be, for example, a video decoder. For example, the video decoder may be a high efficiency video coding (High Efficiency Video Coding, HEVC) video decoder, a VP9 video decoder, a second-generation audio video coding standard (2nd Audio Video coding Standard, AVS2) video decoder, or a video decoder in accordance with another new coding standard that can support an HDR video in the future. The video decoder may be a software decoder or a hardware decoder. However, it should be understood that performance and power consumption of the software decoder are usually poorer than those of the hardware decoder. The video data obtained by parsing the TS is usually encoded video data. Therefore, the video decoding module is configured to decode a dynamic metadata HDR video stream obtained by parsing, to obtain HDR video data and dynamic metadata metadata.

    [0098] The subtitle parsing module may be, for example, a graphic processing module (Graphic Processing Module), or the graphic processing module parses the subtitle data. For example, the graphic processing module may be a software module running on a general-purpose central processing unit (Central Processing Unit, CPU) or graphics processing unit (Graphics Processing Unit, GPU), or may be a special-purpose logic circuit, or a special-purpose image signal processor (Image Signal Processor, ISP). Subtitle information is included in an encapsulation format of the TS. The subtitle parsing module extracts the subtitle information from the encapsulation format of the TS. For example, the subtitle information may include subtitle text content, a codeword corresponding to the subtitle text content, and a font, a size, a color, a position, an aspect ratio, transparency, color gamut information, a bit depth, and the like of a subtitle. The subtitle parsing module extracts the subtitle information from the encapsulation format of the TS. The codeword corresponding to the subtitle text content is described herein by using an example. Chinese and English are represented by different codewords in a computer. For example, "hello" occupies 5 bytes after character encoding, "hello in Chinese" occupies 4 bytes after character encoding. The graphic processing module extracts the specific codeword corresponding to the subtitle content and sends the codeword to the encapsulation module. Then the encapsulation module packages the codeword according to a format that matches a transmission interface (or transmission channel).

    [0099] Generally, the playing device 302 may further include the video/subtitle mixing module (not shown in FIG. 3). When the video data received by the playing device is the SDR video data or the static metadata HDR video data, the video/subtitle mixing module is configured to mix (or overlay) video data output by the video decoder and the subtitle information output by the subtitle parsing module, package overlaid data, and transmit the overlaid data to the display device through an HDMI. In an embodiment provided in this application, the video data and the subtitle information are not sent to the video/subtitle mixing module for mixing. Instead, the video data and the subtitle information are separately processed. For example, the video data and the subtitle information are separately encapsulated, and are separately transmitted to the display device.

    [0100] The encapsulation module is configured to separately encapsulate the HDR video data (including the dynamic metadata) and the subtitle information. For example, the encapsulation module may be an HDMI transmitter transmitter. The encapsulation module encapsulates the HDR video data including the dynamic metadata into a packet that matches the HDMI and the subtitle information into a packet that matches the HDMI, and separately transmits the encapsulated packets to the display device through the HDMI. In a transmission process, the packets are directly isolated from each other. Optionally, a large amount of data is usually processed during data encapsulation. A few control configurations are completed by software, and an encapsulation process is implemented by hardware in the HDMI transmitter. Optionally, the encapsulation process may alternatively be completely completed by the software. A speed and performance of encapsulation by the software are poorer than those of encapsulation by the hardware. It should be noted that a digital channel such as the HDMI usually needs to be used to transmit video, audio, and other additional information at the same time. To ensure that different types of information can be correctly received and identified, various types of data and information need to be encapsulated and packaged according to a certain format before being transmitted. In other words, when being transmitted between the playing device and the display device, the video data and the subtitle data need to be encapsulated according to a packet format that matches the transmission interface (or transmission channel). Optionally, the HDMI transmitter encapsulates the subtitle information into an independent information frame, and sends the information frame to the display device through a transmit port of the HDMI. Optionally, the encapsulated subtitle information frame includes a type identification field and a plurality of valid subtitle information payload bytes. Optionally, the subtitle information frame further includes at least one of a version identification field or a length identification field, and a value of the length identification field is used to indicate a quantity of the plurality of valid subtitle information payload bytes. For example, valid subtitle information included in the plurality of valid subtitle information payload bytes includes at least one of the subtitle text content, the codeword corresponding to the subtitle text content, or subtitle drawing control information. The subtitle drawing control information includes at least one of the font, the size, the color, the position, the aspect ratio, the transparency, the color gamut information, the bit depth, or the like of the subtitle.

    [0101] For example, Table 1 shows an encapsulation format of a subtitle information frame according to an embodiment of this application.
    Table 1
    InfoFrame Type CodeOXABCDEF (specific code needs to be applied for and approved)Used to identify whether a current information frame is a subtitle information frame
    InfoFrame Version Number   Used to identify a version of the information frame
    Length Of InfoFrame N Used to indicate a length of the information frame
    Data Byte 1   First valid subtitle information payload byte
    Data Byte 2   Second valid subtitle information payload byte
    ...   ...
    Data Byte N   Last valid subtitle information payload byte


    [0102] It can be learned from the table that an encapsulated information frame may include an information frame type identification field "InfoFrame Type Code". This field occupies one byte, and is used to identify that the information frame is a subtitle information frame. Specific code corresponding to this field needs to be applied for and approved. Based on this field, the transmission interface of the playing device may separately encapsulate the subtitle information into the subtitle information frame different from a video data frame, and separately send the subtitle information frame and the video data frame. A transmission interface of the corresponding display device may identify, based on this field, the received information frame as the subtitle information frame. The information frame may further include a field "InfoFrame Version Number" used to identify a version of the information frame. This field occupies one byte, and facilitates subsequent development and improvement of a subtitle information frame based on the encapsulation format. For example, a subtitle information frame format first launched is an initial version, and a new field is subsequently added to satisfy a new requirement. In this case, a version 2, a version 3, and the like may be provided. This field is used to indicate a version of the current information frame, so that the playing device and the display device perform corresponding processing based on different subtitle information frame versions. The information frame may further include a field "Length of InfoFrame" used to indicate a length of the information frame. This field occupies one byte, and is used to indicate a length of a to-be-transmitted subtitle information frame, to help preliminarily determine a size of the subtitle information frame, adjust a quantity of bytes occupied for transmitting the subtitle information frame, and improve flexibility of subtitle processing. The information frame further includes bytes "Data Byte 1" to "Data Byte N" that represent a valid subtitle information payload. Each data byte occupies one byte, and N is a quantity of the valid subtitle information payload bytes. A value of the length identification field is N, in other words, the length identification field is used to indicate the quantity of the valid subtitle information payload bytes. For example, the valid subtitle information may include the subtitle text content and the codeword corresponding to the subtitle text content, and may also include the subtitle drawing control information. For example, the subtitle drawing control information includes but is not limited to the font, the size, the color, the position, the aspect ratio, the transparency, the color gamut information, the bit depth, and the like of the subtitle. The color includes a foreground color and a background color, and the transparency includes foreground transparency and background transparency. In a possible implementation, the plurality of valid subtitle information payload bytes include a valid information flag byte, and the valid information flag byte is used to limit respective identification content of another valid subtitle information payload byte. For example, Data Byte 1 may be a valid information flag, and is used to indicate whether the current subtitle information frame includes a valid font, a valid font size, a valid foreground color, a valid background color, valid foreground transparency, valid background transparency, and valid position information. Table 2 is a specific example of Data Byte 1.
    Table 2
    bit 7bit 6bit 5bit 4bit 3bit 2bit 1bit 0
    F0 so C0 A0 P0 Reserved Reserved Reserved


    [0103] Meanings of the bits are as follows:
    If F0 is 1, it indicates that Data Byte 3 is a valid field (the playing device specifies the subtitle font). If F0 is 0, it indicates that Data Byte 3 is an invalid field (the playing device does not specify the subtitle font, and the display device determines the font for subtitle drawing).

    [0104] If SO is 1, it indicates that Data Byte 4 is a valid field (the playing device specifies the subtitle font size). If SO is 0, it indicates that Data Byte 4 is an invalid field (the playing device does not specify the subtitle font size, and the display device determines the font size for subtitle drawing).

    [0105] If C0 is 1, it indicates that Data Byte 5 to Data Byte 7 are valid fields (the playing device specifies the subtitle foreground color). If C0 is 0, it indicates that Data Byte 5 to Data Byte 7 are invalid fields (the playing device does not specify the subtitle foreground color, and the display device determines the color for subtitle drawing).

    [0106] If A0 is 1, it indicates that Data Byte 8 is a valid field (the playing device specifies the subtitle foreground transparency). If A0 is 0, it indicates that Data Byte 8 is an invalid field (the playing device does not specify the subtitle foreground transparency, and the display device determines the foreground transparency for subtitle drawing).

    [0107] If P0 is 1, it indicates that Data Byte 9 to Data Byte 12 are valid fields (the playing device specifies subtitle position coordinates). If C0 is 0, it indicates that Data Byte 9 to Data Byte 12 are invalid fields (the playing device does not specify the subtitle position coordinates, and the display device determines the position coordinates for subtitle drawing).

    [0108] Bit 2 to bit 0 are reserved bits. Optionally, reserved bits may be set to add new payload bytes to limit the aspect ratio, the color gamut information, and the like of the subtitle.

    [0109] The following is an example limitation on each valid subtitle information payload byte:

    Data Byte 2 (one byte) is used to carry a character content length. This field depends on an actual quantity of subtitle characters in the subtitle information frame, and is in a unit of byte. Optionally, if one subtitle information frame supports transmission of a maximum of 243-byte character content, a value of Data Byte 2 is 243.

    Data Byte 3 (one byte): A value ranges from 0 to 255, indicating 256 different fonts.

    Data Byte 4 (one byte): A value ranges from 0 to 255, indicating 256 different font sizes.

    Data Byte 5 to Data Byte 7 (three bytes) indicate that different colors are used for subtitle drawing. Byte 5 is a most significant byte, and Byte 7 is a least significant byte.

    Data Byte 8 (one byte): A value ranges from 0 to 255, indicating 256 different subtitle transparency levels.

    Data Byte 9 and Data Byte 10 (two bytes) indicate a horizontal coordinate of the upper left corner of a subtitle in a video image. Byte 9 is a most significant byte, and Byte 10 is a least significant byte.

    Data Byte 11 and Data Byte 12 (two bytes) indicates a vertical coordinate of the upper left corner of the subtitle in the video image. Byte 11 is a most significant byte, and Byte 12 is a least significant byte.

    Data Byte 13 to Data Byte N indicate possible information such as subtitle text characters and punctuation marks.



    [0110] It should be understood that the encapsulation format of the subtitle information frame may be extended based on an existing mechanism in an HDMI/consumer technology association (Consumer Technology Association, CTA) standard. The information frame encapsulation formats shown in Table 1 and Table 2 are merely examples, and do not impose a limitation on the encapsulation format.

    [0111] Optionally, an HDR video packet, a dynamic metadata metadata packet, and a subtitle packet that are transmitted through the HDMI are separately encapsulated and are isolated from each other. In this way, the three different packets or information frames can be correctly received and identified by the display device.

    [0112] The HDMI transmitter separately transmits the video data frame, a dynamic metadata information frame, the subtitle information frame, and another information frame or packet to the display device. It should be understood that there are a plurality of channels in the HDMI. Some of the channels are used to transmit data information, and the other channels are used to transmit control information such as a clock signal, a check signal, a power supply signal, and a ground signal. Optionally, a data channel is time-division multiplexed, and cannot be used to transmit various packets at the same time. An amount of data transmitted through the channel in a unit time is limited by a working frequency. A maximum amount of data that can be transmitted through the channel in the unit time is bandwidth of an HDMI channel. For example, bandwidth of HDMI 2.1 is 18G bps (bit per second). Optionally, the transmission interface transmits the HDR video data frame, the dynamic metadata information frame, and the subtitle information frame in a time-division manner. Optionally, the transmission interface corresponds to a plurality of transmission frequency bands, and the transmission interface transmits the video data frame, the dynamic metadata frame, and the subtitle information frame in a frequency-division manner. Optionally, the transmission interface corresponds to a plurality of transmission channels, and the transmission interface transmits the video data frame, the dynamic metadata frame, and the subtitle information frame in a channel-division manner.

    [0113] It should be understood that, in this time-division transmission manner, it needs to be ensured that image content and subtitle information of a video are synchronized in terms of time, to prevent a subtitle from being displayed before or after a dialog image. Based on a feature of frame-level aligned transmission, additional subtitle information may be encapsulated and then transmitted in an information transmission time period corresponding to an image frame matching the additional subtitle information, to ensure synchronization between an image and a subtitle. In other words, any subtitle information frame and a video data frame matching the subtitle information frame are transmitted in a same timeslot, to ensure synchronization between the image and the subtitle. Optionally, the playing device and the display device may agree on a correspondence between a subtitle information frame and a video data frame in advance. For example, the playing device and the display device may agree that an Nth subtitle information frame received by the display device corresponds to an Nth video data frame, or that an (N+M)th subtitle information frame received by the display device corresponds to an Nth frame of video data, where M may be an integer such as ±1 or ±2. The display device matches the video data frame and the subtitle information frame based on the pre-agreed correspondence, to implement synchronization between the image and the subtitle. In addition, optionally, a frame of dynamic metadata needs to be transmitted within a specific time before or after video data corresponding to the frame of dynamic metadata is transmitted. In a compressed video stream in accordance with a standard such as efficient video coding (High Efficiency Video Coding, HEVC), dynamic metadata needs to be in a syntax structure of header information of a frame of image corresponding to the dynamic metadata. The following describes a manner of transmitting video data, metadata, and subtitle data according to an embodiment of this application. FIG. 4 is a schematic timing diagram of a transmission channel according to an embodiment of this application.

    [0114] Video frames 1, 2, 3, ..., N, N+1, ... are sequentially transmitted through an HDMI transmission channel in chronological order. A timeslot represented by an interval in the figure is occupied for transmitting each video data frame and information related to the data frame. A timeslot for transmitting an Nth frame of video data and information related to the data frame is "Interval of Frame N", and a timeslot for transmitting an (N+1)th frame of video data and information related to the data frame is "Interval of Frame N+1". The interval is related to a frame rate of a video. For example, if the frame rate is 50 frames per second, the interval is 1/50 seconds. A time interval at which two adjacent video data frames are transmitted is referred to as a vertical blanking (Vertical Blanking). The time interval may be used to transmit information related to a video data frame other than the data frame, for example, transmit audio information, HDR metadata information, subtitle information, and the like. The foregoing information is provided as an information frame referred to as InfoFrame. Optionally, the information frame may be an information frame specified in a CTA standard or a private information frame provided by a vendor registered with the Institute of Electrical and Electronics Engineers (Institute of Electrical and Electronics Engineers, IEEE). Table 1 shows an example information frame format provided in the embodiments of this application. It should be understood that a sequence of transmitting the subtitle information frame and a metadata information frame in a transmission timeslot (in other words, in a transmission period) is not limited in this embodiment of this application. Although the subtitle information frame is transmitted after the metadata information frame in FIG. 4, optionally, the subtitle information frame may alternatively be transmitted before the metadata information frame.

    [0115] It should be understood that an interface such as the HDMI can provide very high bandwidth for transmitting audio and video information in real time. However, a data amount of the subtitle information frame is far less than an amount of audio and video data. Therefore, a vertical blanking between video data frames is completely sufficient to transmit subtitle-related information.

    [0116] The display device 303 receives the HDR video data frame, the dynamic metadata information frame, the subtitle data frame, and the like that are transmitted from the HDMI channel.

    [0117] The decapsulation module may be, for example, an HDMI receiver receiver. The decapsulation module decapsulates the received HDR video data frame, dynamic metadata information frame, subtitle data frame, and the like that are in the encapsulation format, to obtain the HDR video data, the dynamic metadata, and the subtitle information to facilitate subsequent processing by the display device.

    [0118] The video processing module may be, for example, a video processor, or may be a special-purpose ISP or an application-specific integrated circuit. Optionally, the video processing module may alternatively be a software module running on a CPU or a GPU. The video processing module selects a proper mapping relationship based on an actual luminance range of an image frame to perform tone mapping on the HDR video data, so that different images of the dynamic metadata HDR video can be optimally displayed and presented.

    [0119] The subtitle parsing module may be, for example, a graphic processing module (Graphic Processing Module), or the graphic processing module completes subtitle processing. For example, the graphic processing module may be a software module running on a general-purpose CPU or GPU, or may be a special-purpose logic circuit, or a special-purpose image signal processor ISP. The subtitle processing module converts subtitle text information into an RGB image, and draws a subtitle image. The subtitle processing module may further perform tone mapping on the drawn subtitle image based on luminance of a display screen. It should be understood that the subtitle processing module performs subtitle drawing based on the size, the color, the font, and the like in the subtitle information, and ensures, during tone mapping, that a corresponding RGB value is suitable for luminance and color ranges of the screen to perform displaying.

    [0120] The video and subtitle overlaying/mixing module may be, for example, a mixer mixer in a hardware form, or may be an application-specific integrated circuit or a software module running on a general-purpose CPU or GPU. The video and subtitle overlaying/mixing module mixes/overlays a video and a subtitle that undergo tone mapping, to obtain an image frame including a subtitle. Then, the video and subtitle overlaying/mixing module sends the image frame including the subtitle to the display module for displaying. For example, the display module may be a liquid crystal display (Liquid Crystal Display, LCD) or an organic light-emitting diode (Organic Light-Emitting Diode, OLED) display screen.

    [0121] In this embodiment of this application, the playing device separately encapsulates the HDR video data including the dynamic metadata and the subtitle information, and separately transmits the encapsulated HDR video data and subtitle information to the display device. The display device receives the separated video data and subtitle information, performs dynamic tone mapping on the HDR video data based on the dynamic metadata, and performs, based on the actual luminance range of the screen, tone mapping on the subtitle image drawn based on the subtitle information. In this way, subtitle luminance and the subtitle color are suitable for the luminance and color ranges of the display screen. This ensures a processing effect of the HDR video and the subtitle, and prevents the subtitle luminance from being flicked or changed due to dynamic tone mapping on the HDR video data.

    [0122] The foregoing describes, from a perspective of a modular functional entity, a video display system including a playing device and a display device in the embodiments of this application. The following separately describes, from a perspective of processor hardware, a playing device and a display device in the embodiments of this application.

    [0123] FIG. 5 is a schematic diagram of a hardware architecture of a video playing system according to an embodiment of this application.

    [0124] Optionally, a playing device 302 includes at least one central processing unit CPU, at least one memory, a GPU, a decoder, a special-purpose video/graphics processing unit, an input interface, an HDMI transmitter, and the like. Optionally, the playing device may further include a microprocessor, a microcontroller unit (Microcontroller Unit, MCU), and the like. Optionally, the foregoing components of the playing device are coupled by using a connector. The connector may include various types of interfaces, transmission cables, buses, or the like. This is not limited in this embodiment. The connector may include various types of interfaces, transmission cables, buses, or the like. This is not limited in this embodiment. Optionally, the foregoing components are integrated into a same chip, to jointly constitute a core chip of the playing device. Alternatively, the CPU, the GPU, the decoder, the input interface, and the HDMI transmitter are integrated into one chip, and each component inside the chip accesses an external memory through a bus. The special-purpose video/graphics processing unit may be integrated into a same chip with the CPU, or may exist as an independent processor chip. The chip in this embodiment of this application is a system manufactured on a same semiconductor substrate by using an integrated circuit technology, and is also referred to as a semiconductor chip. The chip may be a set of integrated circuits formed on the substrate (which is usually a semiconductor material such as silicon) by using the integrated circuit technology, and an outer layer of the chip is usually packaged with a semiconductor packaging material. The integrated circuit may include various types of functional devices. Each type of functional device includes a logic gate circuit, a metal-oxide-semiconductor (Metal-Oxide-Semiconductor, MOS) transistor, or a transistor such as a bipolar transistor or a diode, and may also include another component such as a capacitor, a resistor, or an inductor. Each functional device may operate independently or operate after being driven by necessary driver software, and may implement various functions such as communication, operation, or storage.

    [0125] For example, the CPU may be configured to implement some or all operations in the embodiments of this application, for example, may implement tone mapping for an image, and demultiplex and decode video data. Optionally, the CPU may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Optionally, the CPU may be a processor group including a plurality of processors, and the plurality of processors are coupled to each other through one or more buses. Optionally, image and video processing is partially completed by the CPU and partially completed by the special-purpose video/graphics processing unit, or may be completed by software code running on a general-purpose CPU or GPU.

    [0126] The memory may be configured to store a computer program instruction, including various types of computer program code such as an operating system (Operation System, OS), various user application programs, and program code used to execute the solutions of this application. The memory may be further configured to store video data, audio data, subtitle data, and the like. The CPU may be configured to execute the computer program code stored in the memory, to implement the method in the embodiments of this application. Various types of program code executed may be considered as drivers of the CPU. Optionally, the memory 302 may be a nonvolatile memory, for example, an embedded multimedia card (Embedded Multi Media Card, EMMC), a universal flash storage (Universal Flash Storage, UFS), or a read-only memory (Read-Only Memory, ROM); or may be another type of static storage device that can store static information and an instruction; or may be a volatile memory (volatile memory), for example, a random access memory (Random Access Memory, RAM), or another type of dynamic storage device that can store information and an instruction; or may be an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM) or another optical disc storage, an optical disc storage (including a compressed optical disc, a laser disc, an optical disc, a digital versatile disc, a Blu-ray disc, or the like), a magnetic disk storage medium or another magnetic storage device, or any other computer-readable storage medium that can be configured to carry or store program code in a form of an instruction or a data structure and can be accessed by a computer. However, the memory is not limited thereto.

    [0127] The input interface is configured to receive a transport stream. The input interface of the playing device may be a network interface, for example, a WIFI or ethernet interface. The input interface may alternatively be a television broadcasting terminal, for example, a tunner. The input interface may alternatively be a universal serial bus (Universal Serial Bus, USB) interface.

    [0128] Optionally, the CPU executes related code to demultiplex the transport stream, to obtain video data, subtitle data, and the like. The decoder decodes a video data stream to obtain video data and metadata. The video/graphics processing unit parses a subtitle. The HDMI transmitter separately encapsulates the decoded video data, metadata, and subtitle data, and transmits an encapsulated packet/information frame to a display device 303 through an HDMI data channel.

    [0129] Optionally, the display device 303 includes an HDMI receiver, at least one central processing unit CPU, at least one memory, a GPU, a decoder, a special-purpose video/graphics processing unit, a V By One interface, and the like. The display device further includes a display screen (not shown in the figure). Optionally, the V By One interface is coupled to the display screen. The V By One interface is a digital interface standard developed for image transmission. Optionally, the display device 303 shown in FIG. 5 may be an integrated display chip, and received video data is processed by the display chip and then sent to the display screen for displaying.

    [0130] For detailed descriptions of the CPU and the memory, refer to descriptions of the CPU and the memory of the playing device. Details are not described herein again. The HDMI receiver receives a packet sent by the playing device, and separately decapsulates a video packet, a metadata packet, and a subtitle information frame. Specifically, refer to descriptions of the decapsulation module. Details are not described herein again. Tone mapping may be performed on the video data by the GPU or the special-purpose video/graphics processing unit. Subtitle drawing and tone mapping can be completed by the special-purpose video/graphics processing unit or by software code running on the CPU or the GPU. It should be understood that the display device separately processes the video data and the subtitle data. Optionally, the video/graphics processing unit overlays a processed video and subtitle, and transmits an overlaid video and subtitle to the display screen through the V By One interface.

    [0131] For example, the display screen may be a liquid crystal display (Liquid Crystal Display, LCD), a light emitting diode (Light Emitting Diode, LED) display, an organic light-emitting diode (Organic Light-Emitting Diode, OLED) display screen, or a cathode ray tube (Cathode Ray Tube, CRT) display screen.

    [0132] FIG. 6 is a schematic diagram of a hardware architecture of a playing device according to an embodiment of this application.

    [0133] The playing device may include a demultiplexer, a video decoder, a video processor, a graphic processing module, a graphic/video mixer, an HDMI transmitter, and the like.

    [0134] The demultiplexer is configured to parse a received video transport stream to obtain an HDR video stream, a subtitle packet, audio data, and data of another type. Specifically, refer to descriptions of the demultiplexing module. Details are not described herein again.

    [0135] The video decoder decodes the HDR video stream to obtain HDR video data and metadata metadata.

    [0136] The video processor is configured to implement conversion between a video in each HDR format and a video in an SDR format. Optionally, the video processor may further perform scaling-up, scaling-down, denoising, or sharpening on an image in a video.

    [0137] For example, the graphic processing module may be a special-purpose ISP, a special-purpose logic circuit, or a software module running on a general-purpose CPU or GPU. Subtitle information is included in an encapsulation format of the TS. For example, the subtitle information may include subtitle text content, a codeword corresponding to the subtitle text content, and a font, a size, a color, a position, an aspect ratio, color gamut information, a bit depth, and the like of a subtitle. The graphic processing module extracts the subtitle information from the encapsulation format of the TS. For details, refer to the descriptions of the subtitle parsing module. Optionally, processing performed by the graphic processing module may further include drawing an image based on the subtitle information, scaling-up, scaling-down, processing related to translucent alpha blending, and the like.

    [0138] Optionally, after being mixed by the graphic/video mixer, the HDR video data (including the metadata) and the subtitle information are encapsulated by the HDMI transmitter and then sent to a display device.

    [0139] Optionally, the playing device does not mix the HDR video data, the metadata, and the subtitle information, but separately sends them to the HDMI transmitter. The HDMI transmitter separately encapsulates the HDR video data, the metadata, and the subtitle information and then sends them to the display device. For a format of an encapsulated information frame, refer to descriptions of the encapsulation module. Details are not described herein again.

    [0140] FIG. 7 is a schematic diagram of a hardware architecture of a display device according to an embodiment of this application.

    [0141] The display device may include an HDMI receiver, a video processor, a graphic processing module, a graphic/video mixer, a V By One (VBO) interface, an LCD/OLED display screen, and the like.

    [0142] The HDMI receiver decapsulates a received HDR video data frame, dynamic metadata information frame, subtitle information frame, and the like that are in an encapsulation format, to obtain HDR video data, dynamic metadata, and subtitle data to facilitate subsequent processing by the display device.

    [0143] The video processor may be a special-purpose ISP or an application-specific integrated circuit. The video processor selects, from a mapping relationship included in metadata, a proper mapping relationship based on an actual luminance range of an image frame to perform tone mapping on the HDR video data. In this way, different images of a dynamic metadata HDR video can be optimally displayed and presented.

    [0144] The graphic processing module may be a special-purpose logic circuit, or a special-purpose image signal processor ISP. The graphic processing module converts subtitle text content into an RGB image based on a font, a size, a color, a position, and the like that are indicated in subtitle information, and draws a subtitle image. The graphic processing module may further perform tone mapping on the drawn subtitle image based on luminance of the display screen.

    [0145] The graphic/video mixer mixes/overlays a video and a subtitle that undergo tone mapping, to obtain an image frame including a subtitle, and sends, through the VBO interface, the image frame including the subtitle to the display screen for displaying. For a type of the display screen, refer to descriptions of the display screen in the embodiment corresponding to FIG. 5.

    [0146] FIG. 8 is a schematic flowchart of a method for processing an HDR video including a subtitle according to an embodiment of this application. For ease of understanding, in this embodiment of this application, the video processing method is described as steps. Although the method flowchart in FIG. 8 shows a sequence of the method, in some cases, the described steps may be performed in a sequence different from the sequence herein.

    [0147] Optionally, the video processing method includes a step 801 in which a transport stream is received.

    [0148] For example, the transport stream may include video data, metadata, audio data, subtitle data, and the like. The video data may be SDR video data, static metadata HDR video data, dynamic metadata HDR video data, or the like. For example, the metadata usually describes content of each frame of a video image, for example, may include maximum luminance, minimum luminance, average luminance, and the like of the image. Optionally, the metadata may further include a reference mapping curve between a frame of image and a display screen. In this embodiment of this application, the video processing method is described by using an example in which the video data is a dynamic metadata HDR video.

    [0149] Optionally, the video processing method includes a step 802 in which the transport stream is parsed to obtain a video stream, a subtitle packet, and data of another type. For example, the data of another type includes audio data, a transport stream description table, a program mapping table, a network information table, and the like.

    [0150] Optionally, the video processing method includes a step 803 in which the video stream is decoded to obtain decoded HDR video data and dynamic metadata metadata. Optionally, both the dynamic metadata metadata and the HDR video data are encapsulated in the video stream. After the video stream is parsed, separated HDR video data and dynamic metadata can be obtained. The metadata can be obtained without decoding the video stream.

    [0151] Optionally, the video processing method includes a step 804 in which the subtitle packet is parsed to obtain subtitle information, where the subtitle information is included in the subtitle packet. It should be understood that the subtitle packet herein is a packet in a TS encapsulation format. The subtitle information may include subtitle text content, a codeword corresponding to the subtitle text content, and a font, a size, a color, a position, an aspect ratio, color gamut information, a bit depth, and the like of a subtitle.

    [0152] Optionally, the video processing method includes a step 805 in which the HDR video data including the dynamic metadata and the subtitle information are separately encapsulated, to obtain a video data frame, a dynamic metadata information frame, a subtitle information frame, and the like that match a transmission interface. It should be understood that each frame of the HDR video data needs to be encapsulated, and correspondingly, the subtitle information is also encapsulated frame by frame. Each frame of the video data has subtitle information matching the frame. In other words, one frame of video data corresponds to one frame of subtitle information. A data amount of the video data frame is far greater than a data amount of the dynamic metadata information frame and a data amount of the subtitle information frame. For example, for one frame of video in a 3840x2160 422 10-bit format, data of 166 megabits need to be transmitted. However, for subtitle data including 20 Chinese characters, only 320 bits need to be transmitted. In this case, the subtitle data may account for only a few hundred thousandths of the video data. The video data frame, the dynamic metadata information frame, and the subtitle information frame are all in encapsulation formats that match the transmission interface, so that different information can be correctly received and identified by a display device. For a format of the subtitle information frame, refer to the foregoing Table 1 and related descriptions. Optionally, the transmission interface is an interface referencing a CTA related definition, for example, may be an HDMI or a display port interface.

    [0153] Optionally, the video processing method includes a step 806 in which the video data frame, the dynamic metadata information frame, the subtitle information frame, and the like are separately transmitted to the display device.

    [0154] Optionally, the video data frame, the dynamic metadata information frame, the subtitle information frame, and the like may be transmitted in a time-division manner by using a time-division multiplexing feature of the transmission interface. Alternatively, frequency division performance may be improved, or a transmission channel may be added, to implement transmission in a channel-division manner. For example, the transmission interface corresponds to a plurality of transmission frequency bands, and the transmission interface transmits the video data frame, the dynamic metadata frame, and the subtitle information frame in a frequency-division manner. Alternatively, the transmission interface corresponds to a plurality of transmission channels, and the transmission interface transmits the video data frame, the dynamic metadata frame, and the subtitle information frame in the channel-division manner.

    [0155] It should be understood that, in this separate transmission manner, it needs to be ensured that image content and subtitle information of a video are synchronized in terms of time, to prevent a subtitle from being displayed before or after a dialog image. Optionally, based on a feature of frame-level aligned transmission, additional subtitle information may be transmitted in a transmission timeslot of a video image frame matching the additional subtitle information, to ensure synchronization between an image and a subtitle. Optionally, the playing device and the display device may agree on a correspondence between a subtitle information frame and a video data frame in advance. For example, the playing device and the display device may agree that an Nth subtitle information frame received by the display device corresponds to an Nth video data frame, or that an (N+M)th subtitle information frame received by the display device corresponds to an Nth frame of video data, where M may be an integer such as ±1 or ±2. The display device matches the video data frame and the subtitle information frame based on the pre-agreed correspondence, to implement synchronization between the image and the subtitle. In addition, optionally, a frame of dynamic metadata needs to be transmitted within a specific time before or after video data corresponding to the frame of dynamic metadata is transmitted. In a compressed video stream in accordance with a standard such as HEVC, dynamic metadata needs to be in a syntax structure of header information of a frame of image corresponding to the dynamic metadata. For an example of separate transmission, refer to FIG. 4 and descriptions corresponding to FIG. 4.

    [0156] Optionally, the video processing method includes a step 807 in which the video data frame, the dynamic metadata information frame, and the subtitle information frame are received, and the received data frame or information frame is separately decapsulated to obtain the HDR video data, the dynamic metadata, and the subtitle information to facilitate subsequent processing by the display device.

    [0157] The video processing method includes a step 808 in which tone mapping is performed on the HDR video data based on the dynamic metadata.

    [0158] It should be understood that the dynamic metadata includes a plurality of mapping relationships. A proper mapping relationship is selected based on an actual luminance range of an HDR video image frame to perform tone mapping on the HDR video image frame, so that different images of the dynamic metadata HDR video can be optimally displayed and presented.

    [0159] The video processing method includes a step 809 in which based on a luminance range of the display screen, tone mapping is performed on a subtitle image drawn based on the subtitle information.

    [0160] It should be understood that the subtitle information includes the subtitle text content and indication information. The indication information includes but is not limited to the font, the size, the color, the position, the bit depth, and the like of the subtitle. The subtitle image is drawn based on the subtitle text content and the indication information in the subtitle information. Optionally, the subtitle image is an RGB image. Tone mapping is performed on the subtitle image based on range of luminance that can be displayed by the display screen to ensure that a corresponding RGB value is suitable for luminance and color ranges of the screen.

    [0161] Optionally, the video processing method includes a step 810 in which HDR video data obtained after tone mapping and a subtitle image obtained after tone mapping are overlaid to obtain a video image including a subtitle, and the video image including the subtitle is displayed.

    [0162] In this embodiment of this application, the HDR video data including the dynamic metadata and the subtitle information are separately encapsulated and are separately transmitted to the display device. The display device receives the separated video data and subtitle information, performs dynamic tone mapping on the HDR video data based on the dynamic metadata, and performs, based on the actual luminance range of the screen, tone mapping on the subtitle image drawn based on the subtitle information. In this way, subtitle luminance and the subtitle color are suitable for the luminance and color ranges of the display screen. This ensures a processing effect of the HDR video and the subtitle, and improves a subtitle display effect of the dynamic metadata HDR video.

    [0163] FIG. 9 is a schematic flowchart of another method for processing an HDR video including a subtitle according to an embodiment of this application.

    [0164] For ease of understanding, in this embodiment of this application, the video processing method is described as steps. Although the method flowchart in FIG. 9 shows a sequence of the method, in some cases, the described steps may be performed in a sequence different from the sequence herein.

    [0165] The method includes the following steps:

    Step 901: Encapsulate HDR video data into a video data frame that matches a transmission interface.

    Step 902: Encapsulate subtitle information into a subtitle information frame that matches the transmission interface.

    Step 903: Separately transmit the video data frame and the subtitle information frame to a display device through the transmission interface.



    [0166] Optionally, the transmission interface may be time-division multiplexed, and the transmission interface transmits the video data frame and the subtitle information frame in a time-division manner. Optionally, the transmission interface corresponds to a plurality of transmission frequency bands, and the transmission interface transmits the video data frame and the subtitle information frame in a frequency-division manner. Optionally, the transmission interface corresponds to a plurality of transmission channels, and the transmission interface transmits the video data frame and the subtitle information frame in a channel-division manner. Optionally, the transmission interface may be an HDMI, a display port interface, or another interface referencing a CTA related definition. For details, refer to the foregoing related descriptions of the encapsulation module of the playing device. It should be understood that the subtitle information frame and the video data frame are packets in two types of formats. For a format of the subtitle information frame, refer to Table 1, Table 2, and related descriptions. For separate transmission of the subtitle information frame and the video data frame, refer to FIG. 4 and corresponding descriptions.

    [0167] Optionally, the method further includes: receiving a transport stream. The transport stream includes the HDR video data, the subtitle information, and metadata metadata, where the metadata includes a mapping relationship for performing tone mapping tone mapping on the HDR video data.

    [0168] Optionally, the method further includes: encapsulating the metadata into a metadata information frame that matches the transmission interface.

    [0169] The video data frame, the subtitle information frame, and the metadata information frame are separately transmitted to the display device through the transmission interface. Optionally, the subtitle information frame and the metadata information frame are transmitted within a vertical blanking of a corresponding transmission timeslot of the video data frame. The subtitle information frame is transmitted before or after the metadata.

    [0170] In this embodiment of this application, the HDR video data including dynamic metadata and the subtitle information are separately encapsulated and are separately transmitted to the display device. In this way, the display device can obtain the separated video content and subtitle information, and then separately perform corresponding processing on an HDR video and a subtitle. This improves a subtitle display effect of a dynamic metadata HDR video.

    [0171] An embodiment of this application further provides a computer-readable storage medium. The computer-readable storage medium stores an instruction. When the instruction is run on a computer, the computer is enabled to perform one or more steps of any one of the foregoing methods. When component modules of the signal processing apparatus are implemented in a form of a software functional unit and sold or used as an independent product, the component modules may be stored in the computer-readable storage medium.

    [0172] Based on such an understanding, an embodiment of this application further provides a computer program product including an instruction. The technical solutions of this application essentially, or the part contributing to the prior art, or all or a part of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or a part of the steps of the methods described in the embodiments of this application. For a type of the storage medium, refer to related descriptions of the memory 302.

    [0173] The foregoing embodiments are merely intended for describing the technical solutions of this application, but not for limiting this application. Although this application is described in detail with reference to the foregoing embodiments, persons of ordinary skill in the art should understand that they may still make modifications to the technical solutions described in the foregoing embodiments or make equivalent replacements to some technical features thereof, without departing from the scope of the technical solutions of the embodiments of this application. For example, for some specific operations in the apparatus embodiment, refer to the foregoing method embodiments.

    (Conventional expressions):



    [0174] The foregoing descriptions are merely specific implementations of the present invention, but are not intended to limit the protection scope of the present invention. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present invention shall fall within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.


    Claims

    1. A method for processing a high dynamic range HDR video comprising a subtitle, wherein the method comprises:

    encapsulating HDR video data into a video data frame that matches a transmission interface;

    encapsulating subtitle information into a subtitle information frame that matches the transmission interface; and

    separately transmitting the video data frame and the subtitle information frame to a display device through the transmission interface, wherein the video data frame and the subtitle information frame are packets in two types of formats.


     
    2. The method according to claim 1, wherein the separately transmitting the video data frame and the subtitle information frame to a display device through the transmission interface specifically comprises:
    transmitting the video data frame and the subtitle information frame to the display device through the transmission interface in a time-division manner.
     
    3. The method according to claim 1 or 2, wherein the subtitle information frame is transmitted within a vertical blanking, and the vertical blanking is a time interval at which two adjacent video data frames are transmitted.
     
    4. The method according to any one of claims 1 to 3, wherein the video data frames are sequentially transmitted through the transmission interface in chronological order, wherein an Nth video data frame is transmitted in an Nth timeslot, a subtitle information frame corresponding to the Nth video data frame is transmitted within a vertical blanking of the Nth timeslot, and N is a positive integer.
     
    5. The method according to any one of claims 1 to 3, wherein a correspondence between a subtitle information frame and a video data frame is preset, and the video data frame and the subtitle information frame are transmitted based on the preset correspondence in the time-division manner.
     
    6. The method according to claim 1, wherein the transmission interface corresponds to a plurality of transmission frequency bands, and the separately transmitting the video data frame and the subtitle information frame to a display device through the transmission interface specifically comprises:

    transmitting the video data frame and the subtitle information frame to the display device through the transmission interface in a frequency-division manner; or

    the transmission interface corresponds to a plurality of transmission channels, and the separately transmitting the video data frame and the subtitle information frame to a display device through the transmission interface specifically comprises:
    transmitting the video data frame and the subtitle information frame to the display device through the transmission interface in a channel-division manner.


     
    7. The method according to any one of claims 1 to 6, wherein the subtitle information frame comprises a type identification field and a plurality of valid subtitle information payload bytes.
     
    8. The method according to claim 7, wherein the subtitle information frame further comprises at least one of a version identification field or a length identification field, and a value of the length identification field is used to indicate a quantity of the plurality of valid subtitle information payload bytes.
     
    9. The method according to claim 7 or 8, wherein valid subtitle information comprised in the plurality of valid subtitle information payload bytes comprises at least one of subtitle text content, a codeword corresponding to the subtitle text content, or subtitle drawing control information.
     
    10. The method according to any one of claims 7 to 9, wherein the plurality of valid subtitle information payload bytes comprise a valid information flag byte, and the valid information flag byte is used to limit identification content of another valid subtitle information payload byte.
     
    11. The method according to any one of claims 1 to 10, wherein the transmission interface is a high-definition multimedia interface HDMI.
     
    12. The method according to any one of claims 1 to 11, wherein the method further comprises:
    receiving a transport stream, wherein the transport stream comprises the HDR video data, the subtitle information, and metadata metadata, and the metadata comprises a mapping relationship for performing tone mapping tone mapping on the HDR video data.
     
    13. The method according to claim 12, wherein the method further comprises:

    encapsulating the metadata into a metadata information frame that matches the transmission interface; and

    transmitting, within the vertical blanking of the Nth timeslot, a metadata information frame corresponding to the Nth video data frame.


     
    14. The method according to claim 12 or 13, wherein the subtitle information frame is transmitted before or after the metadata.
     
    15. A method for processing a high dynamic range HDR video comprising a subtitle, wherein the method comprises:

    separately receiving, through a transmission interface, a video data frame and a subtitle information frame that are transmitted from a playing device;

    decapsulating the video data frame to obtain HDR video data;

    decapsulating the subtitle information frame to obtain subtitle information;

    separately performing tone mapping on the HDR video data and a subtitle image, wherein the subtitle image is drawn based on the subtitle information; and

    overlaying HDR video data obtained after tone mapping and a subtitle image obtained after tone mapping, to obtain a video image comprising a subtitle.


     
    16. The method according to claim 15, wherein the separately receiving, through a transmission interface, a video data frame and a subtitle information frame that are transmitted from a playing device specifically comprises:
    receiving, through the transmission interface in a time-division manner, the video data frame and the subtitle information frame that are transmitted from the playing device.
     
    17. The method according to claim 15 or 16, wherein the subtitle information frame is transmitted within a vertical blanking, and the vertical blanking is a time interval at which two adjacent video data frames are transmitted.
     
    18. The method according to any one of claims 15 to 17, wherein the video data frames are sequentially received through the transmission interface in chronological order, wherein an Nth video data frame is transmitted in an Nth timeslot, a subtitle information frame corresponding to the Nth video data frame is transmitted within a vertical blanking of the Nth timeslot, and N is a positive integer.
     
    19. The method according to claim 15, wherein the transmission interface corresponds to a plurality of transmission frequency bands, and the separately receiving, through a transmission interface, a video data frame and a subtitle information frame that are transmitted from a playing device specifically comprises:

    receiving, through the transmission interface, the video data frame and the subtitle information frame that are transmitted from the playing device in a frequency-division manner; or

    the transmission interface corresponds to a plurality of transmission channels, and the separately receiving, through a transmission interface, a video data frame and a subtitle information frame that are transmitted from a playing device specifically comprises:
    receiving, through the transmission interface, the video data frame and the subtitle information frame that are transmitted from the playing device in a channel-division manner.


     
    20. The method according to any one of claims 15 to 19, wherein the method further comprises:

    receiving a metadata information frame through the transmission interface;

    decapsulating the metadata information frame to obtain metadata, wherein the metadata comprises a mapping relationship for performing tone mapping tone mapping on the HDR video data; and

    the separately performing tone mapping on the HDR video data and a subtitle image comprises:

    performing tone mapping on the HDR video data based on the metadata; and

    performing tone mapping on the subtitle image based on a range of luminance that can be displayed by a display device.


     
    21. The method according to any one of claims 15 to 20, wherein the transmission interface is a high-definition multimedia interface HDMI.
     
    22. An apparatus for playing an HDR video comprising a subtitle, wherein the apparatus comprises a processor and a transmission interface;
    the processor is configured to implement the following operations:

    encapsulating HDR video data into a video data frame that matches the transmission interface; and

    encapsulating subtitle information into a subtitle information frame that matches the transmission interface; and

    the transmission interface is configured to separately transmit the video data frame and the subtitle information frame to a display device, wherein the video data frame and the subtitle information frame are packets in two types of formats.


     
    23. The apparatus according to claim 22, wherein the transmission interface is specifically configured to:
    transmit the video data frame and the subtitle information frame to the display device in a time-division manner.
     
    24. The apparatus according to claim 22 or 23, wherein the subtitle information frame is transmitted within a vertical blanking, and the vertical blanking is a time interval at which two adjacent video data frames are transmitted.
     
    25. The apparatus according to any one of claims 22 to 24, wherein the video data frames are sequentially transmitted through the transmission interface in chronological order, wherein an Nth video data frame is transmitted in an Nth timeslot, a subtitle information frame corresponding to the Nth video data frame is transmitted within a vertical blanking of the Nth timeslot, and N is a positive integer.
     
    26. The apparatus according to any one of claims 22 to 24, wherein a correspondence between a subtitle information frame and a video data frame is preset, and the video data frame and the subtitle information frame are transmitted based on the preset correspondence in the time-division manner.
     
    27. The apparatus according to claim 22, wherein the transmission interface is specifically configured to:

    transmit the video data frame and the subtitle information frame to the display device in a frequency-division manner; or

    transmit the video data frame and the subtitle information frame to the display device in a channel-division manner.


     
    28. The apparatus according to any one of claims 22 to 27, wherein the subtitle information frame comprises a type identification field and a plurality of valid subtitle information payload bytes.
     
    29. The method according to claim 28, wherein the subtitle information frame further comprises at least one of a version identification field or a length identification field, and a value of the length identification field is used to indicate a quantity of the plurality of valid subtitle information payload bytes.
     
    30. The method according to claim 28 or 29, wherein valid subtitle information comprised in the plurality of valid subtitle information payload bytes comprises at least one of subtitle text content, a codeword corresponding to the subtitle text content, or subtitle drawing control information.
     
    31. The apparatus according to any one of claims 22 to 30, wherein the transmission interface is a high -definition multimedia interface HDMI.
     
    32. The apparatus according to any one of claims 22 to 31, wherein the apparatus further comprises:
    a receiving interface, configured to receive a transport stream, wherein the transport stream comprises the HDR video data, the subtitle information, and metadata metadata, and the metadata comprises a mapping relationship for performing tone mapping tone mapping on the HDR video data.
     
    33. The apparatus according to claim 32, wherein the processor is further configured to:

    encapsulate the metadata into a metadata information frame that matches the transmission interface; and

    the transmission interface is configured to transmit, within the vertical blanking of the Nth timeslot, a metadata information frame corresponding to the Nth video data frame to the display device.


     
    34. An apparatus for displaying an HDR video comprising a subtitle, wherein the display apparatus comprises a receiving interface and a processor;
    the receiving interface is configured to separately receive a video data frame and a subtitle information frame that are transmitted from a playing device; and
    the processor is configured to decapsulate the video data frame to obtain HDR video data;
    decapsulate the subtitle information frame to obtain subtitle information;
    separately perform tone mapping on the HDR video data and a subtitle image, wherein the subtitle image is drawn based on the subtitle information; and
    overlay HDR video data obtained after tone mapping and a subtitle image obtained after tone mapping, to obtain a video image comprising a subtitle.
     
    35. The display apparatus according to claim 34, wherein the transmission interface is specifically configured to:
    receive, in a time-division manner, the video data frame and the subtitle information frame that are transmitted from the playing device.
     
    36. The display apparatus according to claim 34 or 35, wherein the subtitle information frame is transmitted within a vertical blanking, and the vertical blanking is a time interval at which two adjacent video data frames are transmitted.
     
    37. The display apparatus according to any one of claims 34 to 36, wherein the video data frames are sequentially received through the transmission interface in chronological order, wherein an Nth video data frame is transmitted in an Nth timeslot, a subtitle information frame corresponding to the Nth video data frame is transmitted within a vertical blanking of the Nth timeslot, and N is a positive integer.
     
    38. The display apparatus according to any one of claims 34 to 37, wherein the receiving interface is an HDMI receiver.
     
    39. A computer-readable storage medium, wherein the computer-readable storage medium stores an instruction, and when the instruction is run on a computer or a processor, the computer or the processor is enabled to perform the method according to any one of claims 1 to 21.
     
    40. A computer program product comprising an instruction, wherein when the computer program product runs on a computer or a processor, the computer or the processor is enabled to perform the method according to any one of claims 1 to 21.
     




    Drawing