mirror of https://git.tukaani.org/xz.git
Revert "liblzma: Simple/BCJ filters: Allow disabling generic BCJ options."
This reverts commit 177bdc922c
and also does equivalent change to arm64.c.
Now that ARM64 filter will use lzma_options_bcj, this change
is not needed anymore.
This commit is contained in:
parent
8370ec8edf
commit
b56bc8251d
|
@ -49,7 +49,7 @@ arm_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||||
const lzma_filter_info *filters, bool is_encoder)
|
const lzma_filter_info *filters, bool is_encoder)
|
||||||
{
|
{
|
||||||
return lzma_simple_coder_init(next, allocator, filters,
|
return lzma_simple_coder_init(next, allocator, filters,
|
||||||
&arm_code, 0, 4, 4, is_encoder, true);
|
&arm_code, 0, 4, 4, is_encoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ arm64_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||||
const lzma_filter_info *filters, bool is_encoder)
|
const lzma_filter_info *filters, bool is_encoder)
|
||||||
{
|
{
|
||||||
return lzma_simple_coder_init(next, allocator, filters,
|
return lzma_simple_coder_init(next, allocator, filters,
|
||||||
&arm64_code, 0, 4, 4, is_encoder, true);
|
&arm64_code, 0, 4, 4, is_encoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ armthumb_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||||
const lzma_filter_info *filters, bool is_encoder)
|
const lzma_filter_info *filters, bool is_encoder)
|
||||||
{
|
{
|
||||||
return lzma_simple_coder_init(next, allocator, filters,
|
return lzma_simple_coder_init(next, allocator, filters,
|
||||||
&armthumb_code, 0, 4, 2, is_encoder, true);
|
&armthumb_code, 0, 4, 2, is_encoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ ia64_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||||
const lzma_filter_info *filters, bool is_encoder)
|
const lzma_filter_info *filters, bool is_encoder)
|
||||||
{
|
{
|
||||||
return lzma_simple_coder_init(next, allocator, filters,
|
return lzma_simple_coder_init(next, allocator, filters,
|
||||||
&ia64_code, 0, 16, 16, is_encoder, true);
|
&ia64_code, 0, 16, 16, is_encoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ powerpc_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||||
const lzma_filter_info *filters, bool is_encoder)
|
const lzma_filter_info *filters, bool is_encoder)
|
||||||
{
|
{
|
||||||
return lzma_simple_coder_init(next, allocator, filters,
|
return lzma_simple_coder_init(next, allocator, filters,
|
||||||
&powerpc_code, 0, 4, 4, is_encoder, true);
|
&powerpc_code, 0, 4, 4, is_encoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -237,7 +237,7 @@ lzma_simple_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||||
size_t (*filter)(void *simple, uint32_t now_pos,
|
size_t (*filter)(void *simple, uint32_t now_pos,
|
||||||
bool is_encoder, uint8_t *buffer, size_t size),
|
bool is_encoder, uint8_t *buffer, size_t size),
|
||||||
size_t simple_size, size_t unfiltered_max,
|
size_t simple_size, size_t unfiltered_max,
|
||||||
uint32_t alignment, bool is_encoder, bool is_generic_bcj)
|
uint32_t alignment, bool is_encoder)
|
||||||
{
|
{
|
||||||
// Allocate memory for the lzma_simple_coder structure if needed.
|
// Allocate memory for the lzma_simple_coder structure if needed.
|
||||||
lzma_simple_coder *coder = next->coder;
|
lzma_simple_coder *coder = next->coder;
|
||||||
|
@ -270,7 +270,7 @@ lzma_simple_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_generic_bcj && filters[0].options != NULL) {
|
if (filters[0].options != NULL) {
|
||||||
const lzma_options_bcj *simple = filters[0].options;
|
const lzma_options_bcj *simple = filters[0].options;
|
||||||
coder->now_pos = simple->start_offset;
|
coder->now_pos = simple->start_offset;
|
||||||
if (coder->now_pos & (alignment - 1))
|
if (coder->now_pos & (alignment - 1))
|
||||||
|
|
|
@ -69,6 +69,6 @@ extern lzma_ret lzma_simple_coder_init(lzma_next_coder *next,
|
||||||
size_t (*filter)(void *simple, uint32_t now_pos,
|
size_t (*filter)(void *simple, uint32_t now_pos,
|
||||||
bool is_encoder, uint8_t *buffer, size_t size),
|
bool is_encoder, uint8_t *buffer, size_t size),
|
||||||
size_t simple_size, size_t unfiltered_max,
|
size_t simple_size, size_t unfiltered_max,
|
||||||
uint32_t alignment, bool is_encoder, bool is_generic_bcj);
|
uint32_t alignment, bool is_encoder);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -61,7 +61,7 @@ sparc_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||||
const lzma_filter_info *filters, bool is_encoder)
|
const lzma_filter_info *filters, bool is_encoder)
|
||||||
{
|
{
|
||||||
return lzma_simple_coder_init(next, allocator, filters,
|
return lzma_simple_coder_init(next, allocator, filters,
|
||||||
&sparc_code, 0, 4, 4, is_encoder, true);
|
&sparc_code, 0, 4, 4, is_encoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -128,8 +128,7 @@ x86_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|
||||||
const lzma_filter_info *filters, bool is_encoder)
|
const lzma_filter_info *filters, bool is_encoder)
|
||||||
{
|
{
|
||||||
const lzma_ret ret = lzma_simple_coder_init(next, allocator, filters,
|
const lzma_ret ret = lzma_simple_coder_init(next, allocator, filters,
|
||||||
&x86_code, sizeof(lzma_simple_x86), 5, 1, is_encoder,
|
&x86_code, sizeof(lzma_simple_x86), 5, 1, is_encoder);
|
||||||
true);
|
|
||||||
|
|
||||||
if (ret == LZMA_OK) {
|
if (ret == LZMA_OK) {
|
||||||
lzma_simple_coder *coder = next->coder;
|
lzma_simple_coder *coder = next->coder;
|
||||||
|
|
Loading…
Reference in New Issue