A method of encoding a video stream in a video encoder is provided that includes computing an offset into a transform matrix based on a transform block size, wherein a size of the transform matrix is larger than the transform block size, and wherein the transform matrix is one selected from a group consisting of a DCT transform matrix and an IDCT transform matrix, and transforming a residual block to generate a DCT coefficient block, wherein the offset is used to select elements of rows and columns of a DCT submatrix of the transform block size from the transform matrix.
This application relates to the field of data compression technology, and in particular to a method, apparatus, device, and storage medium for seismic data compression. The method includes: acquiring co-offset seismic data; performing a two-dimensional DCT transform on the co-offset seismic data to obtain frequency-wavenumber domain data; processing the frequency-wavenumber domain data based on the SPECK compression algorithm to obtain primary coded data; and performing adaptive arithmetic coding on the primary coded data to obtain target compressed data. This application facilitates improved efficiency in real-time transmission and storage of seismic data.