boiler parsing dc coeff, first after start or EOB is always read as dc
This commit is contained in:
parent
6cfed66432
commit
6aa84c775f
1 changed files with 10 additions and 4 deletions
|
@ -57,12 +57,18 @@ const Scan = struct {
|
|||
}
|
||||
};
|
||||
|
||||
fn parse_block(block: *util.BlockQuantized, dc_diff: *i16, dc_rle: *RLE_Seq, dc_freqs: []u32, ac_freqs: []u32) !void {
|
||||
inline fn get_size(v: i16) u8 {
|
||||
_ = v;
|
||||
}
|
||||
|
||||
fn parse_block(block: *util.BlockQuantized, dc_diff: *i16, rle: *RLE_Seq, dc_freqs: []u32, ac_freqs: []u32) !void {
|
||||
_ = ac_freqs;
|
||||
_ = dc_freqs;
|
||||
_ = dc_rle;
|
||||
_ = dc_diff;
|
||||
_ = block;
|
||||
const diff = block[0] - dc_diff.*;
|
||||
try rle.append(RLE_Unit{
|
||||
.symbol = get_size(diff),
|
||||
.value = diff,
|
||||
});
|
||||
}
|
||||
|
||||
pub fn generate_jpg(buff: util.Buffers, alloc: std.mem.Allocator) !void {
|
||||
|
|
Loading…
Reference in a new issue