|
|
@ -631,6 +631,8 @@ static int epic_decode_run_length(ePICContext *dc, int x, int y, int tile_width, |
|
|
|
(NN != N) << 1 | |
|
|
|
(NN != N) << 1 | |
|
|
|
(NNW != NW); |
|
|
|
(NNW != NW); |
|
|
|
WWneW = ff_els_decode_bit(&dc->els_ctx, &dc->W_ctx_rung[idx]); |
|
|
|
WWneW = ff_els_decode_bit(&dc->els_ctx, &dc->W_ctx_rung[idx]); |
|
|
|
|
|
|
|
if (WWneW < 0) |
|
|
|
|
|
|
|
return WWneW; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (WWneW) |
|
|
|
if (WWneW) |
|
|
@ -837,10 +839,13 @@ static int epic_decode_tile(ePICContext *dc, uint8_t *out, int tile_height, |
|
|
|
if (y < 2 || x < 2 || x == tile_width - 1) { |
|
|
|
if (y < 2 || x < 2 || x == tile_width - 1) { |
|
|
|
run = 1; |
|
|
|
run = 1; |
|
|
|
got_pixel = epic_handle_edges(dc, x, y, curr_row, above_row, &pix); |
|
|
|
got_pixel = epic_handle_edges(dc, x, y, curr_row, above_row, &pix); |
|
|
|
} else |
|
|
|
} else { |
|
|
|
got_pixel = epic_decode_run_length(dc, x, y, tile_width, |
|
|
|
got_pixel = epic_decode_run_length(dc, x, y, tile_width, |
|
|
|
curr_row, above_row, |
|
|
|
curr_row, above_row, |
|
|
|
above2_row, &pix, &run); |
|
|
|
above2_row, &pix, &run); |
|
|
|
|
|
|
|
if (got_pixel < 0) |
|
|
|
|
|
|
|
return got_pixel; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!got_pixel && !epic_predict_from_NW_NE(dc, x, y, run, |
|
|
|
if (!got_pixel && !epic_predict_from_NW_NE(dc, x, y, run, |
|
|
|
tile_width, curr_row, |
|
|
|
tile_width, curr_row, |
|
|
|