aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxpress
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2025-07-05 02:34:11 +0200
committerXavier Del Campo Romero <xavi92@disroot.org>2025-07-05 02:34:11 +0200
commitbeb76e4dd362374b8f42cd971d394bba1074cd8d (patch)
tree3ea4cc342737afb9225c01160c92647ba66c78bd /libpsn00b/psxpress
parent5d9aa2d3dfc7d6e51c2eb942ab4cdbae5571a40a (diff)
downloadpsn00bsdk-fix-include.tar.gz
Replace .include with #includefix-include
For some reason, both mipsel-unknown-elf-gcc 8.2.0 and mipsel-non-elf 15.1.0 were unable to resolve .include assembler directives. As a workaround, it is still possible to use the preprocessor, and therefore the usual #include preprocessor directive. However, this requires the assembly files to use the uppercase .S file extension.
Diffstat (limited to 'libpsn00b/psxpress')
-rw-r--r--libpsn00b/psxpress/vlc.S (renamed from libpsn00b/psxpress/vlc.s)26
1 files changed, 13 insertions, 13 deletions
diff --git a/libpsn00b/psxpress/vlc.s b/libpsn00b/psxpress/vlc.S
index 5707a21..e2efba4 100644
--- a/libpsn00b/psxpress/vlc.s
+++ b/libpsn00b/psxpress/vlc.S
@@ -5,7 +5,7 @@
# duplicated for each block type, but it can probably be shortened with no
# performance impact...
-.include "gtereg.inc"
+#include "gtereg.inc"
.set noreorder
.set noat
@@ -128,9 +128,9 @@ DecDCTvlcContinue:
_vlc_skip_context_load:
# Determine how many bytes to output.
- # if (max_size <= 0) max_size = 0x3fff0000
- # max_size = min((max_size - 1) * 2, remaining)
- # remaining -= max_size
+ ## if (max_size <= 0) max_size = 0x3fff0000
+ ## max_size = min((max_size - 1) * 2, remaining)
+ ## remaining -= max_size
bgtz max_size, .Lmax_size_valid
addiu max_size, -1
lui max_size, 0x3fff
@@ -174,9 +174,9 @@ _vlc_skip_context_load:
.Lprocess_dc_v2_coefficient: # if (!coeff_index && !is_v3)
# The DC coefficient in version 2 frames is not compressed. Value 0x1ff is
# used to signal the end of the bitstream.
- # prefix = window >> (32 - 10)
- # if (prefix == 0x1ff) break
- # *output = prefix | quant_scale
+ ## prefix = window >> (32 - 10)
+ ## if (prefix == 0x1ff) break
+ ## *output = prefix | quant_scale
srl value, window, 22
beq value, temp, .Lstop_processing
or value, quant_scale
@@ -195,7 +195,7 @@ _vlc_skip_context_load:
# block types (packed as two nibbles). Prefix 111111111 is used to signal
# the end of the bitstream.
# prefix = window >> (32 - 9)
- # if (prefix == 0x1ff) break
+ ## if (prefix == 0x1ff) break
# lengths = huffman_table->dc[prefix >> 2]
srl length, window, 23
beq length, temp, .Lstop_processing
@@ -223,7 +223,7 @@ _vlc_skip_context_load:
srlv value, window, $at
# Decode the sign bit, then add the decoded delta to the current value.
- # if (!(window >> 31)) value -= (1 << dc_length) - 1
+ ## if (!(window >> 31)) value -= (1 << dc_length) - 1
bltz window, .Ldc_cr_positive
li temp, -1
srlv temp, temp, $at
@@ -253,7 +253,7 @@ _vlc_skip_context_load:
srlv value, window, $at
# Decode the sign bit, then add the decoded delta to the current value.
- # if (!(window >> 31)) value -= (1 << dc_length) - 1
+ ## if (!(window >> 31)) value -= (1 << dc_length) - 1
bltz window, .Ldc_cb_positive
li temp, -1
srlv temp, temp, $at
@@ -286,7 +286,7 @@ _vlc_skip_context_load:
srlv value, window, $at
# Decode the sign bit, then add the decoded delta to the current value.
- # if (!(window >> 31)) value -= (1 << dc_length) - 1
+ ## if (!(window >> 31)) value -= (1 << dc_length) - 1
bltz window, .Ldc_y_positive
li temp, -1
srlv temp, temp, $at
@@ -329,7 +329,7 @@ _vlc_skip_context_load:
# Prefix 10 marks the end of a block.
# *output = 0xfe00
# coeff_index = 0
- # if (--block_index < Y3) block_index = Cr
+ ## if (--block_index < Y3) block_index = Cr
sll window, 1
addiu bit_offset, -2
sh temp, 0(output)
@@ -538,7 +538,7 @@ _vlc_skip_context_load:
addiu output, 2
.Lstop_processing:
- # If remaining = 0, skip flushing the context, pad the output buffer with
+ ## If remaining = 0, skip flushing the context, pad the output buffer with
# end-of-block codes if necessary and return 0. Otherwise flush the context
# and return 1.
beqz remaining, .Lpad_output_buffer