mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-08 13:50:20 +00:00
remapQP, formatQuantizer, getACPredMode and InitZigzagScan now call jxrlib's strPredQuant.c, strcodec.c and image.c from 3rdparty/jxrlib through a C bridge. The guest adapters only reject null pointers, more than 16 channels and scaled shifts that would overflow the QP. A new test compares every quantizer index, random quantizer tables, random macroblocks and the scan tables against jxrlib directly.
20 lines
761 B
C
20 lines
761 B
C
#include "strcodec.h"
|
|
#include <stdint.h>
|
|
|
|
void JxrQuantizerReferenceRemap_nid_no_patch(void* quantizer, int32_t shift, int32_t scaled) {
|
|
remapQP((CWMIQuantizer*)quantizer, shift, scaled);
|
|
}
|
|
|
|
void JxrQuantizerReferenceFormat_nid_no_patch(void** quantizers, uint8_t mode, size_t channels, size_t position,
|
|
int32_t shiftedUv, int32_t scaled) {
|
|
formatQuantizer((CWMIQuantizer**)quantizers, mode, channels, position, shiftedUv, scaled);
|
|
}
|
|
|
|
int32_t JxrQuantizerReferenceAcMode_nid_no_patch(void* macroblock, int32_t format) {
|
|
return getACPredMode((CWMIMBInfo*)macroblock, (COLORFORMAT)format);
|
|
}
|
|
|
|
void JxrQuantizerReferenceZigzag_nid_no_patch(void* context) {
|
|
InitZigzagScan((CCodingContext*)context);
|
|
}
|