boiler parsing dc coeff, first after start or EOB is always read as dc

This commit is contained in:
Muaz Ahmad 2023-11-28 16:39:01 +05:00
parent 6cfed66432
commit 6aa84c775f

View file

@ -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; _ = ac_freqs;
_ = dc_freqs; _ = dc_freqs;
_ = dc_rle; const diff = block[0] - dc_diff.*;
_ = dc_diff; try rle.append(RLE_Unit{
_ = block; .symbol = get_size(diff),
.value = diff,
});
} }
pub fn generate_jpg(buff: util.Buffers, alloc: std.mem.Allocator) !void { pub fn generate_jpg(buff: util.Buffers, alloc: std.mem.Allocator) !void {