Abnormal code stream generation method and device, and electronic equipment

By determining the target syntactic elements and their position information, the bitstream file is anomaly-processed to generate anomaly bitstreams that meet the testing requirements. This solves the problem of insufficient anomaly bitstreams in existing technologies and enables effective performance testing of the decoder.

CN115941936BActive Publication Date: 2026-04-10SPREADTRUM COMM (TIANJIN) INC
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SPREADTRUM COMM (TIANJIN) INC
Filing Date
2022-12-22
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, newer video protocols accumulate fewer abnormal bitstreams in practical applications, which cannot meet the testing requirements for decoder error compensation capabilities, especially the testing requirements for decoder robustness and error compensation capabilities.

Method used

By determining the target syntactic element and its position information in the bitstream file, anomaly processing is performed to generate an abnormal bitstream that meets the test requirements. This includes changing, deleting, or adding bit data to bitstream segments to generate an abnormal bitstream that conforms to specific rules.

Benefits of technology

It enables flexible generation of abnormal bitstreams according to testing requirements, meeting the performance testing needs of the decoder, especially the testing of the decoder's robustness and error compensation capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115941936B_ABST
    Figure CN115941936B_ABST
Patent Text Reader

Abstract

The application provides an abnormal code stream generation method and device and electronic equipment, and relates to the technical field of video coding. The abnormal code stream generation method comprises the following steps: first, determining a target syntax element, the target syntax element being a syntax element to be added with an exception. Then, determining position information of a target code stream segment corresponding to the target syntax element in a first code stream file. Finally, performing an exception processing on the target code stream segment in the first code stream file according to the position information, and obtaining an abnormal code stream. Through the technical solution, the expected abnormal code stream can be generated based on the actual test requirements, so as to facilitate the performance test of the decoder.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present application relates to the technical field of video coding, and in particular to an abnormal code stream generation method and device and electronic equipment.

[0002] Video coding refers to converting original video data into code stream data through compression technology, and video decoding is the reverse process of coding. When the code stream data is abnormal, the final decoded video image will be abnormal. Therefore, many decoders are configured with error compensation functions to repair abnormal images to restore the original video image to the greatest extent.

[0003] Error compensation capability is one of the key elements for evaluating the performance of a decoder. During the development or application process, a large number of abnormal code streams are needed to test the error compensation capability of the decoder. However, for some new video protocols, there are very few abnormal code streams accumulated in actual application, which cannot support the testing needs of the decoder.

[0004] The present application provides an abnormal code stream generation method, device and electronic equipment, which can be used to generate abnormal code streams that meet the testing needs to facilitate the performance testing of the decoder.

[0005] In a first aspect, the present application provides an abnormal code stream generation method, which includes: determining a target syntax element, the target syntax element being a video element to be added with an abnormality; determining the position information of a target code stream segment corresponding to the target syntax element in a first code stream file; and performing abnormality processing on the target code stream segment in the first code stream file according to the position information to obtain an abnormal code stream.

[0006] In the above technical solution, the target syntax element to which an abnormality needs to be introduced can be determined first, and then the abnormal code stream can be introduced in the complete code stream file according to the position information of the code stream segment corresponding to the target syntax element in the complete code stream file. Thus, the corresponding abnormal code stream can be generated flexibly based on the testing needs, and the testing needs of the decoder can be better adapted.

[0007] In one possible implementation, determining the target syntax element includes: determining the information of the target syntax element according to a received control instruction; and determining the target syntax element according to the information of the target syntax element, the number of the target syntax elements being one or more.

[0008] In this implementation, the code stream segment corresponding to a specific syntax element can be specified to be abnormal. Thus, the testing needs of the decoder for the robustness of the decoder during the testing process can be met.

[0009] ​​​In a possible implementation, the determining the target syntax element comprises: determining a proportion of target macroblocks in each frame image included in the first video data according to the received control instruction, the first video data being an original video file corresponding to the first bitstream file, and the target macroblock being a macroblock to which an exception is to be added; determining each target macroblock from the frame images according to the proportion of the target macroblocks; and determining the target syntax element according to a syntax element corresponding to each target macroblock in the frame images.

[0010] In a possible implementation, the determining the target syntax element according to the syntax element corresponding to each target macroblock in the frame images comprises: determining a first target macroblock from each target macroblock included in the frame images; and determining the syntax element corresponding to the first target macroblock as the target syntax element.

[0011] In this implementation, an exception of a code stream segment corresponding to any proportion of macroblocks in any frame image can be specified, thereby meeting the testing requirement of the error code compensation capability of the decoder to continuous abnormal macroblocks in the testing process.

[0012] In a possible implementation, the determining the position information of the target code stream segment corresponding to the target syntax element in the first bitstream file comprises: performing a decoding operation on the first bitstream file; and recording the position information of the target code stream segment in the first bitstream file after detecting that the target code stream segment corresponding to the target syntax element is decoded.

[0013] In this implementation, the position information of the target code stream segment corresponding to the target syntax element in the complete bitstream file can be determined in the decoding process of the bitstream file.

[0014] In a possible implementation, the performing the exception processing on the target code stream segment in the first bitstream file according to the position information comprises: performing the exception processing on a code stream segment at a corresponding position in a second bitstream file according to the position information, the second bitstream file being the same as the first bitstream file.

[0015] In a possible implementation, the exception processing comprises at least one of the following processing: changing data of at least one bit; deleting data of at least one bit; and adding data of at least one bit.

[0016] In a second aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; and at least one memory connected with the processor in communication, wherein: the memory stores program instructions executable by the processor, and the processor invoking the program instructions can execute the method in the first aspect.

[0017] In a third aspect, an embodiment of the present application provides a chip, which comprises a processor and a data interface, the processor reads instructions stored on a memory through the data interface, and can execute the method in the first aspect.

[0018] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores computer instructions, and the computer instructions make the computer execute the method in the first aspect.

DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0020] Figure 1 A flowchart of an abnormal code stream generation method provided by an embodiment of the present application;

[0021] Figure 2 A scene schematic diagram of an abnormal code stream generation method provided by an embodiment of the present application;

[0022] Figure 3 A scene schematic diagram of another abnormal code stream generation method provided by an embodiment of the present application;

[0023] Figure 4 A flowchart of another abnormal code stream generation method provided by an embodiment of the present application;

[0024] Figure 5 A flowchart of another abnormal code stream generation method provided by an embodiment of the present application;

[0025] Figure 6 A structural schematic diagram of an abnormal code stream generation device provided by an embodiment of the present application;

[0026] Figure 7 A structural schematic diagram of an electronic device provided by an embodiment of the present application.

DETAILED DESCRIPTION

[0027] In order to better understand the technical solutions of the present application, the embodiments of the present application will be described in detail below with reference to the drawings.

[0028] It should be clear that the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort fall within the scope of protection of the present application.

[0029] The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the embodiments of the present application and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0030] The bitstream file refers to a file obtained after encoding original video data. When any bit of the bitstream data in the bitstream file is abnormal, such as bitstream data loss caused by unreliable network transmission, the finally decoded video image will be abnormal.

[0031] Error concealment refers to repairing the decoded abnormal video image by interpolation or other methods to restore the original video image to the greatest extent. Error concealment capability is a key indicator for measuring the performance of a decoder. It is necessary to test the error concealment capability of a decoder during the development or application of the decoder.

[0032] A large number of abnormal bitstreams are needed to test the error concealment capability. However, the abnormal state of the abnormal bitstream generated in actual application is uncontrollable and cannot well adapt to the test requirements. Moreover, for some new video protocols, such as the H.265 protocol, the abnormal bitstream accumulated in actual application is very few and difficult to meet the test requirements of the decoder.

[0033] To solve the above problems, the present application can provide an abnormal bitstream generation method for generating abnormal bitstreams meeting the test requirements to facilitate the performance test of the decoder. The specific implementation of the abnormal bitstream generation method provided by the present application is described below.

[0034] Figure 1 The flowchart of the abnormal bitstream generation method provided by the embodiments of the present application is shown in FIG. 1, and the abnormal bitstream generation method can include the following steps. Figure 1

[0035] Step 101, determine a target syntax element, and the target syntax element is a syntax element to be added with an abnormality.

[0036] According to the coding principle, it can be known that the bitstream is composed of a plurality of syntax elements, each syntax element can be used to represent a specific physical meaning, such as macroblock type, image brightness, image resolution, etc. Each syntax element in the bitstream can include a plurality of bits of binary data, and any abnormal data of any bit will cause the syntax element to be abnormal, and further cause the finally decoded image to be abnormal or the decoder behavior to be abnormal.

[0037] ​Based on the above description, in this embodiment of the application, before generating the abnormal bitstream, the syntactic element to which the abnormality is to be added, i.e., the target syntactic element, can be flexibly specified according to the needs of the decoder. For example, it can be a syntactic element used to represent macroblock type, a syntactic element used to represent image brightness, a syntactic element used to represent quantization parameters, etc. Furthermore, the number of specified target syntactic elements can be one or more; for example, simultaneously specifying a syntactic element representing macroblock type and a syntactic element used to represent image brightness as target syntactic elements. This application does not impose any limitations on this.

[0038] Furthermore, based on the hierarchical structure of syntactic elements, syntactic elements are organized into multiple different levels. For example... Figure 2 As shown, taking the H.264 protocol as an example, syntax elements can include: sub-macroblock level syntax elements (21), macroblock level syntax elements (22), slice level syntax elements (23), frame level syntax elements (24), and sequence level syntax elements (25). The target syntax element specified in this application can contain syntax elements at any one or more of these levels.

[0039] In this embodiment of the application, the target syntactic element may be determined by issuing a control command issued by the user.

[0040] In one possible implementation, the user-issued control command may include the proportion of the target macroblock in each frame of the first video data. The target macroblock is the macroblock to be added with the anomaly. In a real-world scenario, for any given frame, if the bitstream corresponding to one macroblock is abnormal, the bitstreams corresponding to subsequent macroblocks in that frame will not be correctly decoded. Figure 3 As shown, when the bitstream corresponding to macroblock 30 is abnormal, the bitstreams corresponding to subsequent macroblocks in that frame will not be decoded correctly. Therefore, in this implementation, the proportion R of the target macroblock given by the preset rules... err It can be calculated according to formula R. err =(BLK total -BLK err ) / BLK total This determines the number of target macroblocks in each frame of the image, and then identifies each target macroblock from each frame. Among them, BLK... total BLK represents the total number of macroblocks in each frame of the image. errThe number of target macroblocks in each frame image is represented. Then, the target syntax element can be determined according to the syntax element corresponding to each target macroblock in each frame image. In a specific implementation, since the code stream corresponding to the subsequent macroblocks in the frame image will not be correctly decoded when the code stream corresponding to one of the macroblocks is abnormal, the first target macroblock can be determined from each target macroblock included in each frame image, and the syntax element corresponding to the first target macroblock is determined as the target syntax element. In another specific implementation, the syntax element corresponding to each target macroblock can also be determined as the target syntax element.

[0041] Based on the above implementation, the code stream data corresponding to any proportion of macroblocks in multiple frame images can be specified to be abnormal in batches. Thus, the test requirement for the error code compensation capability of the continuous macroblock level abnormal code stream in the decoder test process can be met.

[0042] In another possible implementation, the user can issue the information of the target syntax element in the control instruction, such as the name of the target syntax element and the like. In this implementation, the target syntax element can be directly determined according to the name of the target syntax element given in the control instruction. The number of target syntax elements can be one or more.

[0043] Based on the above implementation, the code stream data corresponding to a specific syntax element can be specified to be abnormal. Thus, the test requirement for the robustness of the decoder in the decoder test process can be met.

[0044] In another implementation, the target syntax element can also be determined in the first video data based on a random decision. The present application does not limit this.

[0045] In step 102, the position information of the target code stream segment corresponding to the target syntax element in the first code stream file is determined.

[0046] When the abnormal code stream data is introduced for the target code stream segment corresponding to the target syntax element, it is difficult to determine the position of the target code stream segment only through the binary data presented by the code stream file. Therefore, in the embodiment of the present application, the first code stream file can be read from the preset storage space, and the position information of the target code stream segment corresponding to the target syntax element can be determined by decoding the first code stream file. It should be noted that the first code stream file does not include error code stream.

[0047] Specifically, during the decoding process of the first bitstream file, the current decoding progress can be determined based on the currently decoded syntax elements. Once the target bitstream segment corresponding to the target syntax element is determined, the position information of that target bitstream segment in the first bitstream file can be recorded. Then, the decoding of the first bitstream file can continue, recording the position information of subsequently detected target bitstream segments, until the decoding of the first bitstream file is complete.

[0048] Step 103: Based on the location information, perform anomaly processing on the target bitstream segment in the first bitstream file to obtain an abnormal bitstream.

[0049] Specifically, based on the description of step 102 above, the location information is obtained by decoding the first bitstream file. Therefore, after obtaining the location information of each target bitstream segment, the first bitstream file has been decoded, forming the first video data. Therefore, in this embodiment, the encoded file of the first video data can be read again from the aforementioned preset storage space. To distinguish it from the first bitstream file, this application refers to the reread encoded file as the second bitstream file. It should be understood that the second bitstream file is the same as the first bitstream file. Furthermore, based on the location information, the bitstream segments at corresponding positions in the second bitstream file can be anomaly-processed to obtain an anomalous bitstream that meets the testing requirements. Specifically, the anomaly-processing may include any one or more of the following: changing at least one bit of data, deleting at least one bit of data, or adding at least one bit of data.

[0050] The above technical solution can generate abnormal bitstreams that meet expectations according to specific rules, thereby better adapting to the needs of decoder performance testing in multiple dimensions such as the number of abnormal bitstreams, error type, and number of error bits.

[0051] Figure 4 A flowchart of another abnormal bitstream generation method provided in the embodiments of this application is shown below. Figure 4 As shown, the abnormal bitstream generation method provided in this application embodiment may include:

[0052] Step 201: In response to the received control command, determine the proportion of the target macroblock in each frame of the first video data.

[0053] In this embodiment, a user control command regarding preset rules can be received. The control command can indicate the proportion of macroblocks to be added to each frame of the first video data, i.e., the proportion of target macroblocks. The first video data is the original video file corresponding to the first bitstream file. The proportion of target macroblocks in each frame can be flexibly set by the user based on the testing requirements of the decoder. The proportion of target macroblocks in each frame can be different.

[0054] In step 202, each target macroblock is determined from each frame image according to the proportion of the target macroblock.

[0055] In step 203, the syntax element corresponding to the first target macroblock in each target macroblock contained in each frame image is determined as the target syntax element.

[0056] In step 204, the first code stream file is decoded.

[0057] In step 205, whether the target macroblock is contained in a frame target image corresponding to the current to-be-decoded code stream is determined according to the proportion of the target macroblock in each frame image. If yes, step 206 is executed; otherwise, step 207 is executed.

[0058] In step 206, the current to-be-decoded code stream is decoded, and the position information of the target code stream segment corresponding to the target syntax element is recorded.

[0059] In step 207, the current to-be-decoded code stream is decoded.

[0060] In the embodiment of the present application, the proportion of the target macroblock in each frame image can be determined based on the received control instruction. Then, each target macroblock can be determined from each frame image according to the proportion of the target macroblock, and the specific determination method can refer to the foregoing embodiments, which will not be described here. Then, the syntax element corresponding to the first target macroblock in each frame image can be determined as the target syntax element.

[0061] In the process of decoding the first code stream file, whether the target macroblock is contained in a frame image being decoded can be determined according to the proportion of the target macroblock in each frame image.

[0062] Specifically, when it is determined that the proportion of the target macroblock in the frame image is not zero, it can be determined that the target macroblock is contained in the frame image. At this time, the code stream of the frame image can be decoded, and when the target code stream segment corresponding to the target syntax element is decoded, the position information of the target code stream segment in the first code stream file can be recorded.

[0063] On the contrary, when it is determined that the proportion of the target macroblock in the frame image is zero, it can be determined that the target macroblock is not contained in the frame image, and at this time, the code stream of the frame image can be directly decoded.

[0064] In step 208, whether the first code stream file is decoded is detected. If not, step 205 is executed; otherwise, step 209 is executed.

[0065] After the decoding of the code stream corresponding to each frame of image is completed, it can be detected whether there is any undecoded code stream, if yes, it can return to step 205 to continue decoding the code stream corresponding to the next frame of image. Otherwise, step 209 can be executed to perform abnormalization processing on the corresponding position of the second code stream file according to the position information of each recorded target code stream segment, and obtain abnormal code stream.

[0066] Step 209, abnormalization processing is performed on the corresponding position of the second code stream file according to the position information of each target code stream segment, and abnormal code stream is obtained.

[0067] Through the above technical solution, the code stream data corresponding to any proportion of macroblocks in any frame can be specified to be abnormal. Thus, the test requirement of the error code compensation ability of the decoder in the test process to the continuous macroblock level error code stream can be met.

[0068] Figure 5 The flow chart of another abnormal code stream generation method provided by the embodiment of the present application is shown in FIG. 4, and the abnormal code stream generation method provided by the embodiment of the present application can include the following steps. Figure 5

[0069] Step 301, in response to the received control instruction, the information of the target syntax element is determined.

[0070] In the embodiment of the present application, the control instruction of the user about the preset rule can be received. The control instruction can be used to directly indicate the information of the target syntax element, such as the name of the target syntax element. The target syntax element indicated by the control instruction can include multiple, and the specific number can be flexibly set according to the test requirement of the user to the decoder.

[0071] Step 302, the first code stream file corresponding to the first video data is decoded.

[0072] Step 303, according to the information of the target syntax element, it is determined whether the current to-be-decoded code stream is the target code stream segment corresponding to the target syntax element. If yes, step 304 is executed; otherwise, step 305 is executed.

[0073] Step 304, the current to-be-decoded code stream is decoded, and the position information of the current to-be-decoded code stream is recorded.

[0074] Step 305, the current to-be-decoded code stream is decoded.

[0075] ​In the actual decoding process, the current decoding progress can be determined according to the decoded syntax elements. Since the information of the target syntax element has been determined, according to the current decoding progress, it can be determined whether the current to-be-decoded code stream segment is the target code stream segment corresponding to the target syntax element. When it is determined that the current to-be-decoded code stream segment is the target code stream segment, the position information of the target code stream segment in the entire first code stream file can be recorded, and the target code stream segment can be decoded. Otherwise, the code stream segment can be directly decoded.

[0076] Step 306, detecting whether the first code stream file is decoded. If not, performing step 303; otherwise, performing step 307.

[0077] Step 307, according to the position information of each target code stream segment, performing abnormalization processing on the corresponding position of the second code stream file to obtain an abnormal code stream.

[0078] Through the above technical solution, the code stream data corresponding to any level and any number of syntax elements can be specified to be abnormal. Thus, the testing requirement of the robustness of the decoder in the decoder testing process can be met.

[0079] Figure 6 A structure schematic diagram of an abnormal code stream generation apparatus provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the apparatus can include a first determining module 61, a second determining module 62, and a processing module 63. Figure 6

[0080] The first determining module 61 is configured to determine a target syntax element, the target syntax element being a syntax element to which an abnormality is to be added.

[0081] The second determining module 62 is configured to determine position information of a target code stream segment corresponding to the target syntax element in a first code stream file.

[0082] The processing module 63 is configured to perform abnormalization processing on the target code stream segment in the first code stream file according to the position information, to obtain an abnormal code stream.

[0083] In a specific implementation manner, the first determining module 61 is specifically configured to determine information of the target syntax element according to a received control instruction, and determine the target syntax element according to the information of the target syntax element, the number of the target syntax elements being one or more.

[0084] ​In a specific implementation, the first determining module 61 is specifically configured to determine a proportion of target macroblocks in each frame image included in the first video data according to the received control instruction, the first video data being an original video file corresponding to the first bitstream file, the target macroblock being a macroblock to which an exception is to be added; determine each target macroblock from the frame images according to the proportion of the target macroblocks; and determine the target syntax element according to a syntax element corresponding to each target macroblock in the frame images.

[0085] In a specific implementation, the first determining module 61 is specifically configured to determine a first target macroblock from each target macroblock included in the frame images; and determine the syntax element corresponding to the first target macroblock as the target syntax element.

[0086] In a specific implementation, the second determining module 62 is specifically configured to perform a decoding operation on the first bitstream file; and record position information of a target bitstream segment in the first bitstream file after detecting that the target bitstream segment corresponding to the target syntax element is decoded.

[0087] In a specific implementation, the processing module 63 is specifically configured to perform an exception processing on a bitstream segment at a corresponding position in a second bitstream file according to the position information, the second bitstream file being the same as the first bitstream file.

[0088] In a specific implementation, the exception processing includes at least one of the following processing: changing data of at least one bit; deleting data of at least one bit; and adding data of at least one bit.

[0089] By using the above technical solution, an exception bitstream meeting a test requirement can be generated, so as to facilitate performance testing of a decoder.

[0090] Figure 7 Another structural schematic diagram of an electronic device provided by the embodiment of the present application is shown in FIG. 2. Figure 7 As shown in FIG. 2, the electronic device can include at least one processor; and at least one memory in communication connection with the processor, wherein the memory stores program instructions executable by the processor, and the processor invoking the program instructions can execute the exception bitstream generation method provided by the embodiment of the present application.

[0091] The embodiment of the present application is not limited to the specific form of the electronic device.

[0092] Figure 7 A block diagram of an exemplary electronic device suitable for use in implementing the embodiments of the present application is shown. Figure 7 The electronic device shown is merely an example, and should not impose any limitation on the functions and use range of the embodiments of the present application.

[0093] As shown in FIG. 3, the electronic device can include a processor 301, a memory 302, a communication interface 303, and a power supply 304. Figure 7As shown, the electronic device is in the form of a general purpose computing device. The components of the electronic device can include, but are not limited to, one or more processors 410, system memory 430, and a communication bus 440 that connects the various system components including the system memory 430 and the processor 410.

[0094] The communication bus 440 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics bus (e.g., AGP or Accelerated Graphics Port bus), and a local bus using any of a variety of bus architectures such as Industry Standard Architecture (ISA), Micro Channel Architecture (MCA), Enhanced ISA (EISA), Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0095] The electronic device typically includes a variety of computer system readable media. Such media can be any available media that is accessible by the electronic device and includes both volatile and non-volatile media, removable and non-removable media.

[0096] The memory 430 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The electronic device can further include other removable / non-removable, volatile / non-volatile computer system storage media. Although Figure 7A disk drive, a floppy disk drive, a CD-ROM drive, a DVD-ROM drive (Digital Video Disc Read Only Memory), etc., can be provided for reading from or writing to a removable n on-volatile magnetic media (e.g., a "floppy disk"), and to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media). In such cases, each will be connected to the communication bus 440 by one or more data media interfaces. The memory 430 can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.

[0097] Program / utility, having a set (at least one) of program modules, can be stored in memory 430, for example, include an operating system, one or more application programs, other program modules, and program data, each or some combination thereof, may

[0098] The electronic device can also communicate with one or more external devices such as a keyboard or a pointing device, a display, etc. through a communication interface 420. Additionally, the electronic device can communicate with one or more devices that enable a user to interact with the electronic device through a communication interface 420. The communication interface 420 can enable the electronic device to communicate with one or more other computing devices using any one or more of a set of protocols that include Figure 7 The electronic device can also communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the Internet through a network adapter (not shown) that can be part of or operatively coupled to the electronic device. It will be appreciated that the network adapter can be another device that is Figure 7 Other hardware and / or software modules can be used in conjunction with the electronic device. Such hardware and / or software modules can include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0099] The processor 410 performs various function applications and the abnormal code stream generation by running programs stored in the memory 430, for example, implements the abnormal code stream generation method provided in the embodiments of the present application.

[0100] The embodiments of the present application further provide a computer readable storage medium, the computer readable storage medium stores computer instructions, and the computer instructions make the computer execute the abnormal code stream generation method provided in the embodiments of the present application.

[0101] The computer readable storage medium can adopt any combination of one or more computer readable mediums. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example but not limited to, an electrical, a magnetic, an optical, an electromagnetic, an infrared, or a semiconductor system, device or apparatus, or any appropriate combination of the above. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM), or a flash memory, an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination of the above. In this document, the computer readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device.

[0102] The computer readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer readable program code is contained. Such a propagated data signal can take many forms, including but not limited to, an electromagnetic signal, an optical signal or any appropriate combination thereof. The computer readable signal medium can also be any computer readable medium that can send, propagate or transfer the program for use by or in connection with an instruction execution system, apparatus or device.

[0103] The program code contained in the computer readable medium can be transmitted by any appropriate medium, including but not limited to wireless, wire, cable, optical fiber, RF, etc., or any appropriate combination of the above.

[0104] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the description of the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the specification and the features of the different embodiments or examples without contradiction.

[0105] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "multiple" is at least two, for example, two, three, etc., unless otherwise specifically limited.

[0106] Any process or method descriptions in flow charts or otherwise described herein can be understood as representing code modules, segments, or portions of code that include one or more executable instructions for implementing specific logic functions (or steps) in the process, and the various preferred embodiments of the application include additional implementations in which the order of steps can be changed, including use of simultaneous processes, or the steps can be performed in reverse order, or with additional steps, or with additional processes, or with fewer steps or processes, depending on the specific logic function to be implemented.

[0107] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and in actual implementation, there can be another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0108] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.

[0109] The above only is the preferred embodiment of the present application, and is not used to limit the present application, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for generating abnormal bitstreams, characterized in that, include: Identify the target syntactic element, which is the syntactic element to which the exception is to be added; Determine the position information of the target bitstream segment corresponding to the target syntax element in the first bitstream file; Based on the location information, the target bitstream segment in the first bitstream file is subjected to anomaly processing to obtain an abnormal bitstream; The determination of the target syntactic element includes: Based on the received control instructions, the proportion of the target macroblock in each frame of the first video data is determined. The first video data is the original video file corresponding to the first bitstream file, and the target macroblock is the macroblock to be added to the abnormal file. Based on the proportion of the target macroblock, each target macroblock is determined from each frame of the image; The target syntax element is determined based on the syntax element corresponding to each target macroblock in each frame image.

2. The method according to claim 1, characterized in that, The determination of the target syntactic element includes: Based on the received control instructions, determine the information of the target syntactic element; Based on the information of the target syntax element, the target syntax element is determined, and the number of target syntax elements is one or more.

3. The method according to claim 1, characterized in that, Based on the syntactic elements corresponding to each target macroblock in each frame of the image, the target syntactic elements are determined, including: The first target macroblock is determined from the target macroblocks contained in each frame image; The syntactic element corresponding to the first target macroblock is determined as the target syntactic element.

4. The method according to claim 1, characterized in that, Determining the position information of the target bitstream segment corresponding to the target syntactic element in the first bitstream file includes: Perform decoding operations on the first bitstream file; After detecting the target bitstream segment corresponding to the target syntax element, the position information of the target bitstream segment in the first bitstream file is recorded.

5. The method according to claim 4, characterized in that, Based on the location information, the target bitstream segment in the first bitstream file is subjected to anomaly processing, including: Based on the location information, the corresponding bitstream segment in the second bitstream file is subjected to anomaly processing, and the second bitstream file is the same as the first bitstream file.

6. The method according to claim 5, characterized in that, The anomaly handling includes at least one of the following: Change at least one bit of data; Delete at least one bit of data; Add at least one bit of data.

7. An abnormal bitstream generation device, characterized in that, include: The first determining module is used to determine the target syntactic element, which is the syntactic element to which the exception is to be added; The second determining module is used to determine the position information of the target code stream segment corresponding to the target syntax element in the first code stream file; The processing module is used to perform anomaly processing on the target bitstream segment in the first bitstream file according to the location information to obtain an abnormal bitstream; The determination of the target syntactic element includes: Based on the received control instructions, the proportion of the target macroblock in each frame of the first video data is determined. The first video data is the original video file corresponding to the first bitstream file, and the target macroblock is the macroblock to be added to the abnormal file. Based on the proportion of the target macroblock, each target macroblock is determined from each frame of the image; The target syntax element is determined based on the syntax element corresponding to each target macroblock in each frame image.

8. An electronic device, characterized in that, include: At least one processor; as well as At least one memory communicatively connected to the processor, wherein: The memory stores program instructions that can be executed by the processor, and the processor can execute the method as described in any one of claims 1 to 6 by calling the program instructions.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause the computer to perform the method as described in any one of claims 1 to 6.

10. A chip, characterized in that, The chip includes a processor and a data interface. The processor reads instructions stored in the memory through the data interface and is capable of executing the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for verifying fault tolerance of multimedia player

    CN101931807A