WO2019214141A1 - 编码方法、设备及可读存储介质 - Google Patents

编码方法、设备及可读存储介质 Download PDF

Info

Publication number
WO2019214141A1
WO2019214141A1 PCT/CN2018/107471 CN2018107471W WO2019214141A1 WO 2019214141 A1 WO2019214141 A1 WO 2019214141A1 CN 2018107471 W CN2018107471 W CN 2018107471W WO 2019214141 A1 WO2019214141 A1 WO 2019214141A1
Authority
WO
WIPO (PCT)
Prior art keywords
bit
bit stream
bitstream
stream
bits
Prior art date
Application number
PCT/CN2018/107471
Other languages
English (en)
French (fr)
Inventor
张裕桦
曹丹
王拂依
刘克远
贾沛
Original Assignee
深圳市华星光电技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市华星光电技术有限公司 filed Critical 深圳市华星光电技术有限公司
Publication of WO2019214141A1 publication Critical patent/WO2019214141A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0009Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the channel coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0057Block codes

Definitions

  • the present application relates to the field of data transmission, and in particular, to an encoding method, device, and readable storage medium.
  • 4B5B is a commonly used code that converts the input 4-bit data into 5 bits and outputs it.
  • the coded table is searched to complete the encoding and decoding work, so both the transmitting end and the receiving end require additional memory to store the code table.
  • the 4B5B encoding may also reduce the encoding quality, that is, the number of consecutive bits having the same logical value is excessive, for example, when transmitting 8 bits of data using 4B5B encoding. Low-quality coding is not conducive to the receiver to extract clock synchronization information, and brings a large DC component to improve the bit error rate.
  • the technical problem to be solved by the present application is to provide an encoding method, a device, and a readable storage medium, which can solve the problem that encoding in the prior art may reduce the encoding quality.
  • the present application provides a readable storage medium storing instructions, and when the instructions are executed, implementing the following method: performing quality judgment on the first bit stream; if the first bit stream does not meet the preset quality standard Translating the first bit stream and outputting the second bit stream; combining the output second bit stream with the identification bit to form a third bit stream, wherein the identification bit is determined by a specific bit of the second bit stream
  • An assignment method obtains an assignment; if the first bit stream satisfies a preset quality criterion, outputs a first bit stream; combines the output first bit stream with the identification bit to form a third bit stream;
  • the step of combining the two bit stream with the flag bit includes: setting a logical value of the 0th bit of the third bit stream to be equal to the 0th bit of the second bit stream, wherein the first bit and the subsequent bit of the third bit stream are The 0th and subsequent bits of the two-bit stream are converted and assigned.
  • the present application provides an encoding method, including: performing quality judgment on a first bit stream; and if the first bit stream does not satisfy a preset quality criterion, converting the first bit stream, And outputting the second bit stream; combining the output second bit stream with the identification bit to form a third bit stream, wherein the identification bit is obtained by assigning a specific bit of the second bit stream in a first assignment manner.
  • the present application provides an encoding apparatus including a processor for executing instructions to implement the aforementioned method.
  • the beneficial effects of the present application are: first determining whether the first bit stream satisfies a preset quality standard in the encoding process, converting the first bit stream that does not satisfy the quality standard, and outputting the second bit stream, and then outputting the output
  • the first bit stream or the second bit stream is combined with the identification bit to form a third bit stream, and the encoding quality of the second bit stream is improved compared to the first bit stream after the conversion, the third bit stream is The quality of the code is guaranteed.
  • FIG. 1 is a schematic flow chart of an embodiment of an encoding method of the present application.
  • FIG. 2 is a schematic diagram of a specific process of S3 in FIG. 1 in a specific embodiment of the encoding method of the present application;
  • FIG. 3 is a schematic diagram of a specific process of S3 in FIG. 1 in still another embodiment of the encoding method of the present application;
  • FIG. 4 is a schematic diagram of a specific process of S4 in FIG. 1 in still another embodiment of the encoding method of the present application;
  • FIG. 5 is a schematic flowchart diagram of still another specific embodiment of the encoding method of the present application.
  • FIG. 6 is a schematic flow chart of still another specific embodiment of the encoding method of the present application.
  • FIG. 7 is a schematic flow chart of still another specific embodiment of the encoding method of the present application.
  • FIG. 8 is a schematic flow chart of still another specific embodiment of the encoding method of the present application.
  • FIG. 9 is a schematic structural diagram of an embodiment of an encoding device of the present application.
  • FIG. 10 is a schematic structural diagram of an embodiment of a readable storage medium of the present application.
  • an embodiment of the encoding method of the present application includes:
  • the first bit stream may be uncoded data, and the number of bits may be determined according to actual transmission requirements, such as 8-bit, 16-bit, and the like.
  • the quality judgment may be to determine whether the quality of the first bit stream satisfies a preset quality standard.
  • the quality criterion can be related to consecutive bits of the same logical value in the first bitstream. In general, the consecutive consecutive bits of logical values in the first bitstream that satisfy the quality criteria do not exceed a threshold, and the magnitude of the threshold may be related to the number of bits of the first bitstream, such as the number of bits of the first bitstream. Half plus a positive integer.
  • the first bit stream is an 8-bit bit stream
  • the first bit stream satisfies at least one of the following conditions a, b, c, and d, determining that the first bit stream is not satisfied Quality Standard:
  • the first to sixth bits of the first bit stream have the same logical value
  • the logical values of the 6th and 7th bits in the first bit stream are the same, and the logical values of the 0th to 4th bits are the same, and are opposite to the logical values of the 6th and 7th bits.
  • the above judgment manner may be converted into a judgment on the calculation result of the following logical expression:
  • NAND NAND (bm [4 ⁇ 7]), NAND (bm [1 ⁇ 6]), NAND (bm [0 ⁇ 5]), OR (NAND (bm [6 ⁇ 7]), OR (bm [0 ⁇ 4])), OR (OR(bm[6 ⁇ 7]), NAND(bm[0 ⁇ 4])), OR(bm[4 ⁇ 7]), OR(bm[1 ⁇ 6]), OR( Bm[0 ⁇ 5]))(1)
  • NAND NAND and OR is OR
  • bm[i ⁇ j] is the ith bit to the jth bit of the first bit stream
  • i and j are integers from 0 to 7 and i ⁇ j.
  • Equation (1) when the 4th to 7th bits of the first bit stream are both 1, NAND(bm[4 ⁇ 7]) is 0.
  • NAND(bm[1 ⁇ 6]) is 0.
  • NAND(bm[0 ⁇ 5]) is 0.
  • NAND(bm[6 ⁇ 7]) When the 6th to 7th bits of the first bit stream are both 1 and the 0th to 4th bits of the first bit stream are both 0, NAND(bm[6 ⁇ 7]) is 0, OR(bm[ 0 to 4]) is 0, OR (NAND (bm [6 to 7]), and OR (bm [0 to 4])) is 0.
  • the calculation result of the equation (1) is 1, it means NAND (bm [4 ⁇ 7]), NAND (bm [1 ⁇ 6]), NAND (bm [0 ⁇ 5]), OR (NAND (bm [6] ⁇ 7]), OR(bm[0 ⁇ 4])), OR(0R(bm[6 ⁇ 7]), NAND(bm[0 ⁇ 4])), 0R(bm[4 ⁇ 7]), OR (bm[1 ⁇ 6]), at least one of OR(bm[0 ⁇ 5]) is 0, and the first bit stream satisfies the conditions a, b, c and the condition that the above respective logical formulas are 0. At least one of d, the first bit stream does not satisfy the quality criterion. If the calculation result of the equation (1) is 0, the first bit stream satisfies the quality criterion.
  • the first bit stream is an 8-bit bit stream
  • the logical values of the 6th and 7th bits in the first bit stream are the same, the logical values of the 0th to 4th bits are the same, and the logical values of the 6th and 7th bits are the same.
  • the above judgment manner may be converted into a judgment on the calculation result of the following logical expression:
  • NAND is a NAND operation
  • OR is an OR operation
  • XOR is an exclusive OR operation
  • bm[ij] is the ith bit to the jth bit of the first bit stream
  • i and j are both 0 to 7
  • XOR (bm [4 to 7]) is 1 when the logical values of the 4th to 7th bits of the first bit stream are different (that is, the logical values of at least two of them are different).
  • NAND(bm[6 ⁇ 7]) and OR(bm[6 ⁇ 7]) are both 1, regardless of the 0th of the first bit stream.
  • OR (NAND(bm[6 ⁇ 7]), OR(bm[0 ⁇ 4]))) and OR(OR(bm[6 ⁇ 7]), NAND(bm[ 0 to 4])) are all 1.
  • NAND(bm[0 ⁇ 4]) and OR(bm[0 ⁇ 4]) are both 1, regardless of the sixth bit of the first bit stream.
  • OR (NAND(bm[6 ⁇ 7]), OR(bm[0 ⁇ 4]))) and OR(OR(bm[6 ⁇ 7]), NAND(bm[ 0 to 4])) are all 1.
  • the calculation result of the formula (2) is 1, it means XOR (bm [4 ⁇ 7]), XOR (bm [1 ⁇ 6]), XOR (bm [0 ⁇ 5]), OR (NAND (bm [6] ⁇ 7]), OR(bm[0 ⁇ 4])), OR(OR(bm[6 ⁇ 7]), NAND(bm[0 ⁇ 4])) are all 1, which can be obtained by combining the description of the previous paragraph.
  • a bit stream satisfies all of the conditions e, f, g, and h, and the first bit stream satisfies the quality criteria. If the calculation result of the equation (2) is 0, the first bit stream does not satisfy the quality criterion.
  • the quality judgment if the first bit stream satisfies the quality standard, it jumps to S2; if the first bit stream does not satisfy the quality standard, it jumps to S3.
  • the encoding quality of the first bit stream does not need to be improved, and the output can be directly output.
  • the purpose of the conversion is to improve the coding quality of the first bit stream.
  • the second bit stream obtained after conversion can meet predetermined quality standards. After outputting the second bit stream, jump to S4.
  • this step may specifically include:
  • S31 Perform a logical operation on the first specific bit set in the first bit stream.
  • the result of the logical operation may be a first result or a second result, the first result being different from the second result.
  • the first specific bit set, the second specific bit set, and the third specific bit set include at least one bit.
  • the second particular bit set and at least a portion of the third particular bit set are different.
  • the first bit stream after the completion of the negation can be output as the second bit stream.
  • the 0th bit and the 1st bit in the first bit stream may be XORed. If the result of the exclusive OR operation is 1, it means that the 0th bit and the 1st bit in the first bit stream are different, and the probability that the consecutive multi-bit logical values in the upper bit in the first bit stream are the same is greater, then the first The 4th, 5th, and 7th bits in the bitstream are inverted; if the result of the exclusive OR operation is 0, it means that the 0th bit and the 1st bit in the first bitstream are the same, in the first bitstream. The possibility that the consecutive multi-bit logical values are the same in the lower bits is greater, and the 0th, 3rd, 5th, and 6th bits in the first bit stream are inverted.
  • the method may include:
  • S35 Assign a third bit stream by using the first bit stream or the second bit stream.
  • S36 Perform a logical operation or negation on the bit corresponding to at least part of the first specific bit set, the second specific bit set or the third specific bit set in the third bit stream after the assignment.
  • the third bit stream is logically operated or inverted.
  • the first specific bit set in the first bit stream may be logically operated, then the first bit stream is assigned to the third bit stream, and then the third bit stream is inverted.
  • the bit stream is assigned to the third bit stream, and the bits corresponding to the remainder of the second/third specific bit set in the third bit stream are inverted.
  • the negation operation is divided into two steps, one for the first bit stream and the third bit stream, respectively.
  • the negation operation may also be performed on the first bit stream and the second bit stream, or the first, second, and third bit streams.
  • the 0th bit and the 1st bit in the first bit stream may be XORed. If the result of the exclusive OR operation is 1, it means that the 0th bit and the 1st bit in the first bit stream are different, and the probability that the consecutive multi-bit logical values in the upper bit in the first bit stream are the same is greater, then the first The 4th and 7th bits in the bit stream are inverted; if the result of the exclusive OR operation is 0, it means that the 0th bit and the 1st bit in the first bit stream are the same, and the low bits in the first bit stream are consecutive If the probability of the multi-bit logical value being the same is greater, the 0th, 3rd, and 6th bits in the first bit stream are inverted.
  • the first bit stream obtains the second bit stream after the first inversion, and then assigns the second bit stream to the third bit stream, and then to the sixth bit in the third bit stream (equivalent to the first/second bit)
  • the fifth bit in the stream is inverted (whether the result of the XOR operation is 0 or 1).
  • the number of digits in the flag can be 1, or more.
  • the identifier bit may be directly inserted into the front/middle/back of the first/second bit stream to form a third bit stream, or at least part of the bits of the first/second bit stream may be logically operated and then inserted into the identifier bit.
  • Other combinations are also possible, and no limitation is imposed here.
  • the combination of the identification bit and the first/second bitstream should not affect the coding quality, ie the third bitstream still satisfies the preset quality criteria.
  • the logical value of the flag can be different from the logical value of at least one of the adjacent bits (one or two bits) after insertion. For example, the flag bit is inserted before the 0th bit of the first/second bit stream, and the logical value of the flag bit is different from the logical value of the 0th bit of the first/second bit stream.
  • the step may specifically include:
  • the identifier bit is assigned by using a specific bit of the first bit stream in a second assignment manner, and the identifier bit is combined with the first bit stream; if the output is a second bit stream, Then, the specific bit of the second bit stream is used to assign a value to the identification bit in a first assignment manner, and the identification bit is combined with the second bit stream.
  • the flag bit can be any bit in the first/second bitstream.
  • the flag bits may or may not be adjacent to the bits corresponding to the specific bit.
  • the first assignment method is different from the second assignment method to distinguish whether the third bitstream has undergone quality adjustment by the identification bit and the specific bit.
  • the first assignment method may be one of a direct assignment and a reverse assignment
  • the second assignment may be another of the direct assignment and the inverse assignment.
  • the receiving end can determine whether the received third bit stream is quality-adjusted by the XOR result of the identifier bit and the specific bit, thereby selecting a different decoding mode.
  • the specific bit of the first/second bit stream may be directly or indirectly assigned to the identifier bit, or other equivalent manner may be used, for example, determining whether the logical value of the specific bit is 0/1, according to the judgment. The result combines whether the negation is needed to set the logical value of the flag.
  • the logical value of the 0th bit (ie, the identification bit) of the third bit stream may be set to be equal to the inversion result of the 0th bit of the first bit stream, where the third The first and subsequent bits of the bitstream are assigned by the 0th bit and subsequent bits of the first bitstream.
  • the result of the 0th bit of the first bit stream can be assigned to the flag first, and then the 0th bit and the subsequent bit of the first bit stream are assigned to the first bit.
  • the first bit and the subsequent bit of the three-bit stream; the 0th bit and the subsequent bit of the first bit stream may be first assigned to the first bit and the subsequent bit of the third bit stream, and then the 0th bit of the first bit stream is further
  • the result of the inversion of the bit or the result of the inversion of the first bit of the third bit stream is assigned to the flag bit.
  • the logical value of the 0th bit (ie, the identification bit) of the third bit stream may be set equal to the 0th bit of the second bit stream, where the first bit of the third bit stream and Subsequent bits are assigned by the 0th bit and subsequent bits of the second bit stream.
  • the 0th bit of the second bit stream can be assigned to the flag bit, and then the 0th bit and the subsequent bit of the second bit stream are assigned to the third bit stream.
  • the first bit and the subsequent bit; the 0th bit and the subsequent bit of the second bit stream may be first assigned to the first bit and the subsequent bit of the third bit stream, and then the 0th bit or the third bit of the second bit stream may be The first bit of the bitstream is assigned to the flag bit.
  • the logical value of the flag bit is set equal to the inverse of the 0th bit of the first bit stream or equal to the 0th bit of the second bit stream.
  • the logical value of the identification bit is set equal to the 0th bit of the first bit stream or the inverse result of the 0th bit of the second bit stream.
  • the encoding process it is first determined whether the first bit stream satisfies a preset quality standard, and the first bit stream that does not satisfy the quality standard is converted, and the second bit stream is output, and then the output is output.
  • a bit stream or a second bit stream is combined with the identification bit to form a third bit stream, and the encoding quality of the second bit stream is improved compared to the first bit stream after the conversion, thereby ensuring encoding of the third bit stream quality.
  • the encoding method includes:
  • S106 assigning the second bit stream to the first to eighth bits of the third bit stream, and inverting the sixth bit of the third bit stream (bn[6], equal to the fifth bit of the first and second bit streams)
  • the 0th bit of the second bit stream is assigned to the 0th bit of the third bit stream (bn[0], which is the flag bit).
  • a third bit stream bn[0-8] is obtained.
  • S107 Assign the first bit stream to the first to eighth bits of the third bit stream.
  • S108 Assign the inversion result of the 0th bit of the first bit stream (equal to the 1st bit of the third bit stream) to the 0th bit (ie, the identification bit) of the third bit stream.
  • a third bit stream bn[0-8] is obtained.
  • the encoding method includes:
  • S203 Assign the first bit stream to the first to eighth bits of the third bit stream.
  • a third bit stream bn[0-8] is obtained.
  • S208 assigning the second bit stream to the first to eighth bits of the third bit stream, and inverting the sixth bit of the third bit stream (bn[6], equal to the fifth bit of the first and second bit streams)
  • the 0th bit of the second bit stream is assigned to the 0th bit of the third bit stream (bn[0], which is the flag bit).
  • a third bit stream bn[0-8] is obtained.
  • the encoding method includes:
  • the remaining bits are unchanged and a second bit stream is obtained.
  • S307 assigning the inversion result of the 0th bit of the second bit stream to the 0th bit of the third bit stream (bn[0], which is the identification bit), and assigning the second bit stream to the third bit stream. 1 to 8 digits.
  • a third bit stream bn[0-8] is obtained.
  • S308 Assign the first bit stream to the first to eighth bits of the third bit stream.
  • the process jumps to S310; if the first bit of the third bit stream is 0, the process jumps to S311.
  • a third bit stream bn[0-8] is obtained.
  • a third bit stream bn[0-8] is obtained.
  • the encoding method includes:
  • S406 assign the inversion result of the 0th bit of the second bit stream to the 0th bit of the third bit stream (bn[0], which is the identification bit), and assign the second bit stream to the third bit stream. 1 to 8 digits.
  • a third bit stream bn[0-8] is obtained.
  • S407 Assign the first bit stream to the first to eighth bits of the third bit stream.
  • S408 Determine whether the first bit of the third bit stream (equal to the 0th bit of the first bit stream) is 1.
  • the process jumps to S409; if the first bit of the third bit stream is 0, the process jumps to S410.
  • a third bit stream bn[0-8] is obtained.
  • a third bit stream bn[0-8] is obtained.
  • an embodiment of the encoding apparatus of the present application includes: a processor 110.
  • the encoding device may further include a memory (not shown).
  • the processor 110 controls the operation of the encoding device, and the processor 110 may also be referred to as a CPU (Central Processing Unit).
  • Processor 110 may be an integrated circuit chip with the processing capabilities of a signal sequence.
  • the processor 110 can also be a general purpose processor, a digital signal sequence processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware.
  • DSP digital signal sequence processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the processor 110 is operative to execute instructions to implement the methods provided by any of the embodiments and possible combinations of the encoding methods of the present application.
  • an embodiment of the readable storage medium of the present application includes a memory 210 that stores instructions that, when executed, implement the methods provided by any one or both of the embodiments of the encoding method of the present application.
  • the memory 210 may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk, an optical disk, and the like.
  • ROM read-only memory
  • RAM random access memory
  • flash memory a hard disk
  • optical disk an optical disk
  • the disclosed methods and apparatus may be implemented in other manners.
  • the device implementations described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

本申请公开了一种编码方法,该方法包括:对第一比特流进行质量判断;若第一比特流不满足预设的质量标准,则对第一比特流进行转换,并输出第二比特流;将输出的第二比特流与标识位进行组合,以形成第三比特流,其中标识位由第二比特流的特定位以第一赋值方式进行赋值获得。本申请还公开了一种编码装置和可读存储介质。

Description

编码方法、设备及可读存储介质 【技术领域】
本申请涉及数据传输领域,特别是涉及一种编码方法、设备及可读存储介质。
【背景技术】
在串行数据传输中,传输的数据可以被编码成包含有时钟频率分量的码流,使得接收端可以从码流中提取时钟同步信息,时钟同步信息可以保证接收端按照正确的时序从接收到的信号中再生出原始数据。
4B5B是常用的编码,将输入的4位数据转换为5位后输出。一般使用查找设计好的码表来完成编码和译码工作,因此发送端和接收端都需要额外的存储器来存储码表。4B5B编码还可能降低编码质量,即逻辑值相同的连续位数量过多,例如在使用4B5B编码传输8位数据时。低质量的编码不利于接收端提取时钟同步信息,并且带来较大的直流分量,提高误码率。
【发明内容】
本申请主要解决的技术问题是提供一种编码方法、设备及可读存储介质,能够解决现有技术中的编码可能降低编码质量的问题。
为了解决上述技术问题,本申请提供了一种可读存储介质,存储有指令,指令被执行时实现以下方法:对第一比特流进行质量判断;若第一比特流不满足预设的质量标准,则对第一比特流进行转换,并输出第二比特流;将输出的第二比特流与标识位进行组合,以形成第三比特流,其中标识位由第二比特流的特定位以第一赋值方式进行赋值获得;若第一比特流满足预设的质量标准,则输出第一比特流;将输出的第一比特流与标识位进行组合,以形成第三比特流;将输出的第二比特流与标识位进行组合的步骤包括:将第三比特流的第0位的逻辑值设置为等于第二比特流的第0位,其中第三比特流的第1位及后续位由第二比特流的第0位及后续位进行转换和赋值获得。
为了解决上述技术问题,本申请提供了一种编码方法,该方法包括:对第 一比特流进行质量判断;若第一比特流不满足预设的质量标准,则对第一比特流进行转换,并输出第二比特流;将输出的第二比特流与标识位进行组合,以形成第三比特流,其中标识位由第二比特流的特定位以第一赋值方式进行赋值获得。
为了解决上述技术问题,本申请提供了一种编码装置,该装置包括处理器,处理器用于执行指令以实现前述的方法。
本申请的有益效果是:在编码过程中先判断第一比特流是否满足预设的质量标准,对不满足质量标准的第一比特流进行转换,并输出第二比特流,然后将输出的所述第一比特流或所述第二比特流与标识位进行组合,以形成第三比特流,转换之后第二比特流相比于第一比特流的编码质量得到了提升,第三比特流的编码质量得到保障。
【附图说明】
图1是本申请编码方法一实施例的流程示意图;
图2是本申请编码方法一具体实施例中的图1中S3的具体流程示意图;
图3是本申请编码方法又一具体实施例中的图1中S3的具体流程示意图;
图4是本申请编码方法又一具体实施例中的图1中S4的具体流程示意图;
图5是本申请编码方法又一具体实施例的流程示意图;
图6是本申请编码方法又一具体实施例的流程示意图;
图7是本申请编码方法又一具体实施例的流程示意图;
图8是本申请编码方法又一具体实施例的流程示意图;
图9是本申请编码设备一实施例的结构示意图;
图10是本申请可读存储介质一实施例的结构示意图。
【具体实施方式】
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,以下各实施例中不冲突的可以相互结合。显然,所描述的实施例仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
如图1所示,本申请编码方法一实施例包括:
S1:对第一比特流进行质量判断。
第一比特流可以为未经编码的数据,其位数可以根据实际传输需求而定,例如8位、16位等。质量判断可以为判断第一比特流的质量是否满足预设的质量标准。该质量标准可以与第一比特流中逻辑值相同的连续位有关。一般来说,满足质量标准的第一比特流中的逻辑值相同的连续位数不超过一阈值,该阈值的大小可以与第一比特流的位数相关,例如第一比特流的位数的一半加上一个正整数。
在本申请一具体实施例中,第一比特流为8位比特流的情况下,若第一比特流满足以下条件a、b、c和d中的至少一个,则判定第一比特流不满足质量标准:
a.第一比特流中的第4位至第7位的逻辑值相同;
b.第一比特流中的第1位至第6位的逻辑值相同;
c.第一比特流中的第0位至第5位的逻辑值相同;
d.第一比特流中的第6位和第7位的逻辑值相同,第0位至第4位的逻辑值相同,且与第6位和第7位的逻辑值相反。
可选的,可以将上述判断方式转换为对以下逻辑表达式计算结果的判断:
NAND(NAND(bm[4~7]),NAND(bm[1~6]),NAND(bm[0~5]),OR(NAND(bm[6~7]),OR(bm[0~4])),OR(OR(bm[6~7]),NAND(bm[0~4])),OR(bm[4~7]),OR(bm[1~6]),OR(bm[0~5]))(1)
其中,NAND为与非操作,OR为或操作,bm[i~j]为第一比特流的第i位至第j位,i和j均为0至7中的整数且i<j。
在式(1)中,当第一比特流的第4位至第7位均为1时,NAND(bm[4~7])为0。
当第一比特流的第1位至第6位均为1时,NAND(bm[1~6])为0。
当第一比特流的第0位至第5位均为1时,NAND(bm[0~5])为0。
当第一比特流的第6位至第7位均为1且第一比特流的第0位至第4位均为0时,NAND(bm[6~7])为0,OR(bm[0~4])为0,OR(NAND(bm[6~7]),OR(bm[0~4]))为0。
当第一比特流的第6位至第7位均为0且第一比特流的第0位至第4位均为1时,OR(bm[6~7])为0,NAND(bm[0~4])为0,OR(OR(bm[6~7]), NAND(bm[0~4]))为0。
当第一比特流的第4位至第7位均为0时,OR(bm[4~7])为0。
当第一比特流的第1位至第6位均为0时,OR(bm[1~6])为0。
当第一比特流的第0位至第5位均为0时,OR(bm[0~5])为0。
若式(1)的计算结果为1,意味着NAND(bm[4~7]),NAND(bm[1~6]),NAND(bm[0~5]),OR(NAND(bm[6~7]),OR(bm[0~4])),OR(0R(bm[6~7]),NAND(bm[0~4])),0R(bm[4~7]),OR(bm[1~6]),OR(bm[0~5])中的至少一个为0,结合上面的各个逻辑式为0的条件,可以得到第一比特流满足条件a、b、c和d中的至少一个,则第一比特流不满足质量标准。若式(1)的计算结果为0,则第一比特流满足质量标准。
在本申请另一具体实施例中,第一比特流为8位比特流的情况下,若第一比特流同时满足以下所有条件e、f、g和h,则判定第一比特流满足质量标准:
e.第一比特流中的第4位至第7位中的至少两位的逻辑值不同;
f.第一比特流中的第1位至第6位中的至少两位的逻辑值不同;
g.第一比特流中的第0位至第5位中的至少两位的逻辑值不同;
h.满足以下子条件中的至少一个:
h1.第一比特流中的第6位和第7位的逻辑值不同。
h2.第一比特流中的第0位至第4位的逻辑值不同。
h3.第一比特流中的第6位和第7位的逻辑值相同,第0位至第4位的逻辑值相同,且与第6位和第7位的逻辑值相同。
可选的,可以将上述判断方式转换为对以下逻辑表达式计算结果的判断:
AND(XOR(bm[4~7]),XOR(bm[1~6]),XOR(bm[0~5]),OR(NAND(bm[6~7]),OR(bm[0~4])),OR(OR(bm[6~7]),NAND(bm[0~4])))(2)
其中,AND为与操作,NAND为与非操作,OR为或操作,XOR为异或操作;bm[i-j]为第一比特流的第i位至第j位,i和j均为0至7中的整数且i<j。
在式(2)中,当第一比特流的第4位至第7位的逻辑值不同(即其中至少两位的逻辑值不同)时,XOR(bm[4~7])为1。
当第一比特流的第1位至第6位的逻辑值不同时,XOR(bm[1~6])为1。
当第一比特流的第0位至第5位的逻辑值不同时,XOR(bm[0~5])为1。
bm[6~7]和bm[0~4]可以联合讨论。
当第一比特流的第6位和第7位的逻辑值不同时,NAND(bm[6~7])和 OR(bm[6~7])均为1,无论第一比特流的第0位至第4位的逻辑值是否相同,OR(NAND(bm[6~7]),OR(bm[0~4]))和OR(OR(bm[6~7]),NAND(bm[0~4]))均为1。
当第一比特流的第0位至第4位的逻辑值不同时,NAND(bm[0~4])和OR(bm[0~4])均为1,无论第一比特流的第6位和第7位的逻辑值是否相同,OR(NAND(bm[6~7]),OR(bm[0~4]))和OR(OR(bm[6~7]),NAND(bm[0~4]))均为1。
在第一比特流的第6位和第7位的逻辑值相同且第一比特流的第0位至第4位的逻辑值相同的情况下:当第一比特流第6位和第7位均为0时,NAND(bm[6~7])为1,OR(NAND(bm[6~7]),OR(bm[0~4]))为1,同时OR(bm[6~7])为0,要满足OR(OR(bm[6~7]),NAND(bm[0~4]))为1,NAND(bm[0~4])应为1,即第一比特流的第0位至第4位均为0;当第一比特流第6位和第7位均为1时,OR(bm[6~7])为1,OR(OR(bm[6~7]),NAND(bm[0~4]))为1,同时NAND(bm[6~7])为0,要满足OR(NAND(bm[6~7]),OR(bm[0~4]))为1,OR(bm[0~4])应为1,即第一比特流的第0位至第4位均为1。
若式(2)的计算结果为1,意味着XOR(bm[4~7]),XOR(bm[1~6]),XOR(bm[0~5]),OR(NAND(bm[6~7]),OR(bm[0~4])),OR(OR(bm[6~7]),NAND(bm[0~4]))均为1,结合前一段的描述可以得到第一比特流同时满足所有条件e、f、g和h,则第一比特流满足质量标准。若式(2)的计算结果为0,则第一比特流不满足质量标准。
经过质量判断后,若第一比特流满足质量标准,则跳转到S2;若第一比特流不满足质量标准,则跳转到S3。
S2:输出第一比特流。
第一比特流满足预设的质量标准的情况下,不需要提高第一比特流的编码质量,可以直接输出。
跳转到S4。
S3:对第一比特流进行转换,并输出第二比特流。
转换的目的是为了提高第一比特流的编码质量。一般而言,转换之后得到的第二比特流可以满足预设的质量标准。输出第二比特流后跳转到S4。
如图2所示,在本申请一具体实施例中,本步骤可以具体包括:
S31:对第一比特流中的第一特定位集进行逻辑运算。
逻辑运算的结果可以为第一结果或第二结果,第一结果与第二结果不同。
若逻辑运算的结果为第一结果,则跳转到S32;若逻辑运算的结果为第二结 果,则跳转到S33。
S32:对第一比特流中的第二特定位集进行取反。
S33:对第一比特流中的第三特定位集进行取反。
第一特定位集、第二特定位集、第三特定位集中包括至少一位。一般而言,第二特定位集和第三特定位集中的至少部分位不同。
完成取反之后的第一比特流即可作为第二比特流输出。
举例说明,第一比特流为8位比特流时,可以对第一比特流中的第0位和第1位进行异或操作。若异或操作的结果为1,意味着第一比特流中的第0位和第1位不同,第一比特流中的高位中连续多位逻辑值相同的可能性较大,则对第一比特流中的第4位、第5位和第7位进行取反;若异或操作的结果为0,意味着第一比特流中的第0位和第1位相同,第一比特流中的低位中连续多位逻辑值相同的可能性较大,则对第一比特流中的第0位、第3位、第5位和第6位进行取反。
如图3所示,在本申请又一具体实施例中,本方法可以包括:
S35:利用第一比特流或第二比特流对第三比特流进行赋值。
S36:对赋值后的第三比特流中与至少部分第一特定位集、第二特定位集或第三特定位集对应的位进行逻辑运算或进行取反。
本实施例与图2对应的实施例的主要区别在于对第三比特流进行了逻辑运算或取反操作。例如可以先对第一比特流中的第一特定位集进行逻辑运算,然后将第一比特流赋值给第三比特流,再对第三比特流进行取反。又或者先对第一比特流中的第一特定位集进行逻辑运算,然后对第一比特流中的第二/第三特定位集中的一部分进行取反得到第二比特流,然后将第二比特流赋值给第三比特流,再对第三比特流中与第二/第三特定位集的剩余部分对应的位进行取反。在最后一种情况中,取反操作分为两步,分别对第一比特流和第三比特流进行。在其他实施例汇总,取反操作也可以对第一比特流和第二比特流、或者第一、第二和第三比特流进行。
举例说明,第一比特流为8位比特流时,可以对第一比特流中的第0位和第1位进行异或操作。若异或操作的结果为1,意味着第一比特流中的第0位和第1位不同,第一比特流中的高位中连续多位逻辑值相同的可能性较大,则对第一比特流中的第4位和第7位进行取反;若异或操作的结果为0,意味着第一比特流中的第0位和第1位相同,第一比特流中的低位中连续多位逻辑值相同 的可能性较大,则对第一比特流中的第0位、第3位和第6位进行取反。第一比特流经过第一次取反之后得到第二比特流,然后将第二比特流赋值给第三比特流,再对第三比特流中的第6位(相当于第一/第二比特流中的第5位)进行取反(无论异或操作的结果是0还是1)。
S4:将输出的第一比特流或第二比特流与标识位进行组合,以形成第三比特流。
标识位的位数可以为1,也可以为更多。具体的,可以将标识位直接插入第一/第二比特流前/中/后以形成第三比特流,也可以将第一/第二比特流的至少部分位进行逻辑运算后插入标识位,也可以采用其他组合方式,在此不做限制。一般而言,标识位与第一/第二比特流的组合不应影响编码质量,即第三比特流仍满足预设的质量标准。为实现这一目标,标识位的逻辑值可以与其插入之后的相邻位(一位或者两位)中的至少一位的逻辑值不同。例如,标识位插入在第一/第二比特流的第0位之前,标识位的逻辑值与第一/第二比特流的第0位的逻辑值不同。
如图4所示,在本申请又一具体实施例中,本步骤可以具体包括:
S41:若输出的为第一比特流,则利用第一比特流的特定位以第二赋值方式对标识位赋值并将标识位与第一比特流进行组合;若输出的为第二比特流,则利用第二比特流的特定位以第一赋值方式对标识位赋值,并将标识位与第二比特流进行组合。
标识位可以是第一/第二比特流中的任意位。组合之后的第三比特流中,标识位可以与特定位对应的位相邻,也可以不相邻。第一赋值方式不同于第二赋值方式,以通过标识位和特定位能够区分第三比特流是否进行过质量调整。例如,第一赋值方式可以为直接赋值和取反赋值中的一种,第二赋值方式可以为直接赋值和取反赋值中的另一种。接收端可以通过标识位和特定位的异或结果来判断收到的第三比特流是否经过质量调整,从而选择不同的解码方式。
实际应用中,可以将第一/第二比特流的特定位直接或者取反之后赋值给标识位,也可以采用其他等效的方式,例如判断特定位的逻辑值是否为0/1,根据判断结果结合是否需要取反来设置标识位的逻辑值。
举例说明,若输出的为第一比特流,则可以将第三比特流的第0位(即标识位)的逻辑值设置为等于第一比特流的第0位的取反结果,其中第三比特流的第1位及后续位由第一比特流的第0位及后续位进行赋值获得。赋值和标识 位设置之间的顺序并无限制,可以先将第一比特流的第0位的取反结果赋值给标识位,然后再将第一比特流的第0位及后续位赋值给第三比特流的第1位及后续位;也可以先将第一比特流的第0位及后续位赋值给第三比特流的第1位及后续位,然后再将第一比特流的第0位的取反结果或者第三比特流的第1位的取反结果赋值给标识位。
若输出的为第二比特流,则可以将第三比特流的第0位(即标识位)的逻辑值设置为等于第二比特流的第0位,其中第三比特流的第1位及后续位由第二比特流的第0位及后续位进行赋值获得。赋值和标识位设置之间的顺序并无限制,可以先将第二比特流的第0位赋值给标识位,然后再将第二比特流的第0位及后续位赋值给第三比特流的第1位及后续位;也可以先将第二比特流的第0位及后续位赋值给第三比特流的第1位及后续位,然后再将第二比特流的第0位或者第三比特流的第1位赋值给标识位。
在上面的例子中,标识位的逻辑值设置为等于第一比特流的第0位的取反结果或者等于第二比特流的第0位。实际也可以反过来,即标识位的逻辑值设置为等于第一比特流的第0位或者等于第二比特流的第0位的取反结果。
通过本实施例的实施,在编码过程中先判断第一比特流是否满足预设的质量标准,对不满足质量标准的第一比特流进行转换,并输出第二比特流,然后将输出的第一比特流或第二比特流与标识位进行组合,以形成第三比特流,转换之后第二比特流相比于第一比特流的编码质量得到了提升,从而保证了第三比特流的编码质量。
下面结合附图举例说明完整的编码过程。
如图5所示,在本申请又一具体实施例中,编码方法包括:
S101:获取第一比特流bm[0~7]。
S102:判断逻辑表达式(1)的计算结果是否为1。
图中的==表示等于,=表示赋值。
若逻辑表达式(1)的计算结果为1,则跳转到S103;若逻辑表达式(1)的计算结果为0,则跳转到S107。
S103:判断XOR(bm[0~1])的计算结果是否为1。
若XOR(bm[0~1])的计算结果为1,则跳转到S104;若XOR(bm[0~1])的计算结果为0,则跳转到S105。
S104:对bm[4]和bm[7]取反。
bm[]或bn[]前的~表示取反。
其余位不变,得到第二比特流,跳转到S106。
S105:对bm[0]、bm[3]和bm[6]取反。
其余位不变,得到第二比特流,跳转到S106。
S106:将第二比特流赋值给第三比特流的第1~8位,对第三比特流的第6位(bn[6],等于第一和第二比特流的第5位)取反,将第二比特流的第0位赋值给第三比特流的第0位(bn[0],为标识位)。
得到第三比特流bn[0~8]。
S107:将第一比特流赋值给第三比特流的第1~8位。
S108:将第一比特流的第0位(等于第三比特流的第1位)的取反结果赋值给第三比特流的第0位(即标识位)。
得到第三比特流bn[0~8]。
如图6所示,在本申请又一具体实施例中,编码方法包括:
S201:获取第一比特流bm[0~7]。
S202:判断逻辑表达式(2)的计算结果是否为1。
图中的==表示等于,=表示赋值。
若逻辑表达式(2)的计算结果为1,则跳转到S203;若逻辑表达式(2)的计算结果为0,则跳转到S207。
S203:将第一比特流赋值给第三比特流的第1~8位。
S204:将第一比特流的第0位(等于第三比特流的第1位)的取反结果赋值给第三比特流的第0位(即标识位)。
得到第三比特流bn[0~8]。
S205:判断XOR(bm[0~1])的计算结果是否为1。
若XOR(bm[0~1])的计算结果为1,则跳转到S206;若XOR(bm[0~1])的计算结果为0,则跳转到S207。
S206:对bm[4]和bm[7]取反。
bm[]或bn[]前的~表示取反。
其余位不变,得到第二比特流,跳转到S208。
S207:对bm[0]、bm[3]和bm[6]取反。
其余位不变,得到第二比特流,跳转到S208。
S208:将第二比特流赋值给第三比特流的第1~8位,对第三比特流的第6 位(bn[6],等于第一和第二比特流的第5位)取反,将第二比特流的第0位赋值给第三比特流的第0位(bn[0],为标识位)。
得到第三比特流bn[0~8]。
如图7所示,在本申请又一具体实施例中,编码方法包括:
S301:获取第一比特流bm[0~7]。
S302:判断逻辑表达式(1)的计算结果是否为1。
图中的==表示等于,=表示赋值。
若逻辑表达式(1)的计算结果为1,则跳转到S303;若逻辑表达式(1)的计算结果为0,则跳转到S308。
S303:判断XOR(bm[0~1])的计算结果是否为1。
若XOR(bm[0~1])的计算结果为1,则跳转到S304;若XOR(bm[0~1])的计算结果为0,则跳转到S305。
S304:对bm[4]和bm[7]取反。
bm[]或bn[]前的~表示取反。
跳转到S306。
S305:对bm[0]、bm[3]和bm[6]取反。
跳转到S306。
S306:对bm[5]取反。
其余位不变,得到第二比特流。
S307:将第二比特流的第0位的取反结果赋值给第三比特流的第0位(bn[0],为标识位),并将第二比特流赋值给第三比特流的第1~8位。
得到第三比特流bn[0~8]。
S308:将第一比特流赋值给第三比特流的第1~8位。
S309:判断第三比特流的第1位(等于第一比特流的第0位)是否为1。
若第三比特流的第1位为1,则跳转到S310;若第三比特流的第1位为0,则跳转到S311。
S310:将第三比特流的第0位(即标识位)设置为1。
得到第三比特流bn[0~8]。
S311:将第三比特流的第0位(即标识位)设置为0。
得到第三比特流bn[0~8]。
如图8所示,在本申请又一具体实施例中,编码方法包括:
S401:获取第一比特流bm[0~7]。
图中的==表示等于,=表示赋值。
S402:判断逻辑表达式(1)的计算结果是否为1。
若逻辑表达式(1)的计算结果为1,则跳转到S403;若逻辑表达式(1)的计算结果为0,则跳转到S407。
S403:判断XOR(bm[0~1])的计算结果是否为1。
若XOR(bm[0~1])的计算结果为1,则跳转到S404;若XOR(bm[0~1])的计算结果为0,则跳转到S405。
S404:对bm[4]、bm[5]和bm[7]取反。
bm[]或bn[]前的~表示取反。
其余位不变,得到第二比特流,跳转到S406。
S405:对bm[0]、bm[3]、bm[5]和bm[6]取反。
其余位不变,得到第二比特流,跳转到S406。
S406:将第二比特流的第0位的取反结果赋值给第三比特流的第0位(bn[0],为标识位),并将第二比特流赋值给第三比特流的第1~8位。
得到第三比特流bn[0~8]。
S407:将第一比特流赋值给第三比特流的第1~8位。
S408:判断第三比特流的第1位(等于第一比特流的第0位)是否为1。
若第三比特流的第1位为1,则跳转到S409;若第三比特流的第1位为0,则跳转到S410。
S409:将第三比特流的第0位(即标识位)设置为1。
得到第三比特流bn[0~8]。
S410:将第三比特流的第0位(即标识位)设置为0。
得到第三比特流bn[0~8]。
如图9所示,本申请编码设备一实施例包括:处理器110。除此之外,编码设备还可以包括存储器(图中未画出)。
处理器110控制编码设备的操作,处理器110还可以称为CPU(Central Processing Unit,中央处理单元)。处理器110可能是一种集成电路芯片,具有信号序列的处理能力。处理器110还可以是通用处理器、数字信号序列处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微 处理器或者该处理器也可以是任何常规的处理器等。
处理器110用于执行指令以实现本申请编码方法任一实施例及可能的组合所提供的方法。
如图10所示,本申请可读存储介质一实施例包括存储器210,存储器210存储有指令,该指令被执行时实现本申请编码方法任一实施例及可能的组合所提供的方法。
存储器210可以包括只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、闪存(Flash Memory)、硬盘、光盘等。
在本申请所提供的几个实施例中,应该理解到,所揭露的方法和装置,可以通过其它的方式实现。例如,以上所描述的装置实施方式仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟 或者光盘等各种可以存储程序代码的介质。
以上所述仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种可读存储介质,存储有指令,其中,所述指令被执行时实现以下方法:
    对第一比特流进行质量判断;
    若所述第一比特流不满足预设的质量标准,则对所述第一比特流进行转换,并输出第二比特流;
    将输出的所述第二比特流与标识位进行组合,以形成第三比特流,其中所述标识位由所述第二比特流的特定位以第一赋值方式进行赋值获得;
    若所述第一比特流满足预设的质量标准,则输出所述第一比特流;
    将输出的所述第一比特流与标识位进行组合,以形成所述第三比特流;
    所述将输出的所述第二比特流与标识位进行组合的步骤包括:
    将所述第三比特流的第0位的逻辑值设置为等于所述第二比特流的第0位,其中所述第三比特流的第1位及后续位由所述第二比特流的第0位及后续位进行转换和赋值获得。
  2. 一种编码方法,其中,所述方法包括:
    对第一比特流进行质量判断;
    若所述第一比特流不满足预设的质量标准,则对所述第一比特流进行转换,并输出第二比特流;
    将输出的所述第二比特流与标识位进行组合,以形成第三比特流,其中所述标识位由所述第二比特流的特定位以第一赋值方式进行赋值获得。
  3. 根据权利要求2所述的方法,其中,所述将输出的所述第二比特流与标识位进行组合的步骤包括:
    将所述第三比特流的第0位的逻辑值设置为等于所述第二比特流的第0位,其中所述第三比特流的第1位及后续位由所述第二比特流的第0位及后续位进行转换和赋值获得。
  4. 根据权利要求2所述的方法,其中,所述第一比特流为8位比特流;
    所述对第一比特流进行质量判断的步骤包括:
    若所述第一比特流满足以下条件中的至少一个,则判定所述第一比特流不满足所述质量标准:
    所述第一比特流中的第4位至第7位的逻辑值相同;
    所述第一比特流中的第1位至第6位的逻辑值相同;
    所述第一比特流中的第0位至第5位的逻辑值相同;
    所述第一比特流中的第6位和第7位的逻辑值相同,第0位至第4位的逻辑值相同,且与所述第6位和第7位的逻辑值相反。
  5. 根据权利要求2所述的方法,其中,所述第一比特流为8位比特流;所述对第一比特流进行质量判断的步骤包括:
    若所述第一比特流同时满足以下条件,则判定所述第一比特流满足所述质量标准:
    所述第一比特流中的第4位至第7位中的至少两位的逻辑值不同;
    所述第一比特流中的第1位至第6位中的至少两位的逻辑值不同;
    所述第一比特流中的第0位至第5位中的至少两位的逻辑值不同;
    并且满足以下子条件中的至少一个:
    所述第一比特流中的第6位和第7位的逻辑值不同;
    所述第一比特流中的第0位至第4位的逻辑值不同;或者
    所述第一比特流中的第6位和第7位的逻辑值相同,第0位至第4位的逻辑值相同,且与所述第6位和第7位的逻辑值相同。
  6. 根据权利要求2所述的方法,其中,所述对所述第一比特流进行转换,并输出第二比特流的步骤包括:
    对所述第一比特流中的第一特定位集进行逻辑运算;
    若所述逻辑运算的结果为第一结果,则对所述第一比特流中的第二特定位集进行取反;
    若所述逻辑运算的结果为第二结果,则对所述第一比特流中的第三特定位集进行取反。
  7. 根据权利要求6所述的方法,其中,所述方法进一步包括:
    利用所述第一比特流或第二比特流对所述第三比特流进行赋值;
    其中所述对所述第一比特流中的第一特定位集进行逻辑运算的步骤、所述对所述第一比特流中的第二特定位集进行取反的步骤或者所述对所述第一比特流中的第三特定位集进行取反的步骤包括:
    对赋值后的所述第三比特流中与至少部分所述第一特定位集、所述第二特定位集或所述第三特定位集对应的位进行逻辑运算或进行取反。
  8. 根据权利要求6所述的方法,其中,所述第一比特流为8位比特流;
    所述对所述第一比特流进行转换,并输出第二比特流的步骤包括:
    对所述第一比特流中的第0位和第1位进行异或操作;
    若异或操作的结果为1,则对所述第一比特流中的第4位、第5位和第7位进行取反;
    若异或操作的结果为0,则对所述第一比特流中的第0位、第3位、第5位和第6位进行取反。
  9. 根据权利要求8所述的方法,其中,所述方法进一步包括:
    利用所述第二比特流的第0位及后续位对所述第三比特流的第1位及后续位进行赋值;
    其中,对所述第一比特流中的第0位、第3位、第4位、第6位、第7位进行取反是针对所述第一比特流进行操作,对所述第一比特流中的第5位进行取反是针对所述第三比特流中的第6位进行操作。
  10. 根据权利要求2所述的方法,其中,所述方法进一步包括:
    若所述第一比特流满足预设的质量标准,则输出所述第一比特流;
    将输出的所述第一比特流与标识位进行组合,以形成第三比特流。
  11. 根据权利要求10所述的方法,其中,所述将所述第一比特流与标识位进行组合的步骤包括:
    利用所述第一比特流的特定位以第二赋值方式对所述标识位赋值并将所述标识位与所述第一比特流进行组合;
    其中所述第一赋值方式不同于所述第二赋值方式,以通过所述标识位和所述特定位能够区分所述第三比特流是否进行过质量调整。
  12. 根据权利要求11所述的方法,其中,所述利用所述第一比特流的特定位以第二赋值方式对所述标识位赋值并将所述标识位与所述第一比特流进行组合的步骤包括:
    将所述第三比特流的第0位的逻辑值设置为等于所述第一比特流的第0位的取反结果,其中所述第三比特流的第1位及后续位由所述第一比特流的第0位及后续位进行赋值获得。
  13. 一种编码设备,其中,包括处理器,所述处理器用于执行指令以对第一比特流进行质量判断;若所述第一比特流不满足预设的质量标准,则对所述第一比特流进行转换,并输出第二比特流;将输出的所述第二比特流与标识位进行组合,以形成第三比特流,其中所述标识位由所述第二比特流的特定位以 第一赋值方式进行赋值获得。
  14. 根据权利要求13所述的编码设备,其中,所述处理器具体用于执行指令以将所述第三比特流的第0位的逻辑值设置为等于所述第二比特流的第0位,其中所述第三比特流的第1位及后续位由所述第二比特流的第0位及后续位进行转换和赋值获得。
  15. 根据权利要求13所述的编码设备,其中,所述第一比特流为8位比特流;所述处理器具体用于执行指令以在所述第一比特流满足以下条件中的至少一个的情况下判定所述第一比特流不满足所述质量标准:
    所述第一比特流中的第4位至第7位的逻辑值相同;
    所述第一比特流中的第1位至第6位的逻辑值相同;
    所述第一比特流中的第0位至第5位的逻辑值相同;
    所述第一比特流中的第6位和第7位的逻辑值相同,第0位至第4位的逻辑值相同,且与所述第6位和第7位的逻辑值相反。
  16. 根据权利要求13所述的编码设备,其中,所述第一比特流为8位比特流;所述处理器具体用于执行指令以在所述第一比特流同时满足以下条件的情况下判定所述第一比特流满足所述质量标准:
    所述第一比特流中的第4位至第7位中的至少两位的逻辑值不同;
    所述第一比特流中的第1位至第6位中的至少两位的逻辑值不同;
    所述第一比特流中的第0位至第5位中的至少两位的逻辑值不同;
    并且满足以下子条件中的至少一个:
    所述第一比特流中的第6位和第7位的逻辑值不同;
    所述第一比特流中的第0位至第4位的逻辑值不同;或者
    所述第一比特流中的第6位和第7位的逻辑值相同,第0位至第4位的逻辑值相同,且与所述第6位和第7位的逻辑值相同。
  17. 根据权利要求13所述的编码设备,其中,所述处理器具体用于执行指令以对所述第一比特流中的第一特定位集进行逻辑运算;若所述逻辑运算的结果为第一结果,则对所述第一比特流中的第二特定位集进行取反;若所述逻辑运算的结果为第二结果,则对所述第一比特流中的第三特定位集进行取反。
  18. 根据权利要求17所述的编码设备,其中,所述处理器进一步用于执行指令以利用所述第一比特流或第二比特流对所述第三比特流进行赋值;其中所述对所述第一比特流中的第一特定位集进行逻辑运算的步骤、所述对所述第一 比特流中的第二特定位集进行取反的步骤或者所述对所述第一比特流中的第三特定位集进行取反的步骤包括:对赋值后的所述第三比特流中与至少部分所述第一特定位集、所述第二特定位集或所述第三特定位集对应的位进行逻辑运算或进行取反。
  19. 根据权利要求13所述的编码设备,其中,所述处理器进一步用于执行指令以在所述第一比特流满足预设的质量标准的情况下输出所述第一比特流;将输出的所述第一比特流与标识位进行组合,以形成第三比特流。
  20. 根据权利要求19所述的编码设备,其中,所述处理器具体用于执行指令以利用所述第一比特流的特定位以第二赋值方式对所述标识位赋值并将所述标识位与所述第一比特流进行组合;其中所述第一赋值方式不同于所述第二赋值方式,以通过所述标识位和所述特定位能够区分所述第三比特流是否进行过质量调整。
PCT/CN2018/107471 2018-05-11 2018-09-26 编码方法、设备及可读存储介质 WO2019214141A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810450416.1 2018-05-11
CN201810450416.1A CN108768587B (zh) 2018-05-11 2018-05-11 编码方法、设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2019214141A1 true WO2019214141A1 (zh) 2019-11-14

Family

ID=64010518

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/107471 WO2019214141A1 (zh) 2018-05-11 2018-09-26 编码方法、设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN108768587B (zh)
WO (1) WO2019214141A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110474711B (zh) * 2018-05-11 2021-11-09 Tcl华星光电技术有限公司 编码方法、设备及可读存储介质
CN109309548B (zh) * 2018-05-11 2020-01-03 深圳市华星光电技术有限公司 编码方法、设备及可读存储介质
CN110086575B (zh) * 2019-05-06 2021-10-08 Tcl华星光电技术有限公司 编码方法、解码方法、相关装置及存储介质
CN113407358B (zh) * 2021-03-19 2023-10-31 Tcl华星光电技术有限公司 数据编码方法、装置及存储介质
CN113438051A (zh) * 2021-06-11 2021-09-24 Tcl华星光电技术有限公司 编码方法、编码装置及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1339922A (zh) * 2000-08-18 2002-03-13 株式会社媒体糊 编码信号的分离和合并装置、方法及计算机程序产品
US20040151208A1 (en) * 2003-01-31 2004-08-05 Maupin Patrick E. Parallel encoding/decoding for communications protocol
CN103428830A (zh) * 2012-05-15 2013-12-04 深圳市华奥通通信技术有限公司 一种无线通信系统及方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030208488A1 (en) * 2000-09-20 2003-11-06 North Dakota State University System and method for organizing, compressing and structuring data for data mining readiness
EP1579427A4 (en) * 2003-01-09 2007-05-16 Dilithium Networks Pty Ltd METHOD AND APPARATUS FOR IMPROVING THE QUALITY OF VOICE TRANSCODING
CN2609301Y (zh) * 2003-04-22 2004-03-31 海信集团有限公司 显示器图像信号Gamma校正的8位/10位转换电路
KR101756834B1 (ko) * 2008-07-14 2017-07-12 삼성전자주식회사 오디오/스피치 신호의 부호화 및 복호화 방법 및 장치
US8744021B1 (en) * 2012-11-30 2014-06-03 Motorola Solutions, Inc. Systems, methods, and devices for improving signal quality
CN204758734U (zh) * 2015-07-25 2015-11-11 烟台正信电气有限公司 一种电能质量监测信号处理装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1339922A (zh) * 2000-08-18 2002-03-13 株式会社媒体糊 编码信号的分离和合并装置、方法及计算机程序产品
US20040151208A1 (en) * 2003-01-31 2004-08-05 Maupin Patrick E. Parallel encoding/decoding for communications protocol
CN103428830A (zh) * 2012-05-15 2013-12-04 深圳市华奥通通信技术有限公司 一种无线通信系统及方法

Also Published As

Publication number Publication date
CN108768587A (zh) 2018-11-06
CN108768587B (zh) 2021-04-27

Similar Documents

Publication Publication Date Title
WO2019214141A1 (zh) 编码方法、设备及可读存储介质
WO2019214139A1 (zh) 编码方法、设备及可读存储介质
WO2019227831A1 (zh) 编码方法、设备及可读存储介质
CN108777606B (zh) 解码方法、设备及可读存储介质
JP3285354B2 (ja) 最大値探索回路
WO2019214140A1 (zh) 编码方法、设备及可读存储介质
CN110474709B (zh) 编码方法、设备及可读存储介质
US9998145B2 (en) Data processing method and device
US20220321256A1 (en) Decoding method, decoding device, and readable storage medium
US7549000B2 (en) Apparatus and method for generating bitstream of S/PDIF data in HDMI
CN111478885B (zh) 一种非对称加解密方法、设备及存储介质
JPS6096964A (ja) 画像データを適応予測する装置とその方法
CN112398484B (zh) 一种编码方法及相关设备
WO2019214138A1 (zh) 编码方法、设备及可读存储介质
WO2019237624A1 (zh) 加扰方法、设备及可读存储介质
WO2019242180A1 (zh) 解码方法、设备及可读存储介质
WO2019237625A1 (zh) 解扰方法、设备及可读存储介质
CN101228698B (zh) 4电平逻辑解码器以及解码4电平输入数据信号的方法
US7397395B2 (en) Representative majority voter for bus invert coding
US7764792B1 (en) System and method for encoding data transmitted on a bus
CN102751994B (zh) 一种基于两个有限群符号的短码长分组码译码器装置
KR101311617B1 (ko) 저전력 대규모 집적 회로 시스템을 위한 어드레스 버스코딩/디코딩 방법 및 장치
CN110290391A (zh) 一种指数哥伦布码解码方法、系统及电子设备和存储介质
CN115833847B (zh) Polar码译码方法、装置、通信设备和存储介质
US10338890B1 (en) Random values from data errors

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18917850

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18917850

Country of ref document: EP

Kind code of ref document: A1