mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-06 07:12:28 +01:00
ffmpeg: update cellAtracXDec to ffmpeg 7
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux-aarch64.sh, gcc, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (51ae32f468089a8169aaf1567de355ff4a3e0842, rpcs3/rpcs3-binaries-mac, .ci/build-mac.sh, Intel) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, .ci/build-mac-arm64.sh, Apple Silicon) (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run
Build RPCS3 / RPCS3 Windows Clang (win64, clang, clang64) (push) Waiting to run
Build RPCS3 / RPCS3 FreeBSD (push) Waiting to run
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux-aarch64.sh, gcc, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (51ae32f468089a8169aaf1567de355ff4a3e0842, rpcs3/rpcs3-binaries-mac, .ci/build-mac.sh, Intel) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, .ci/build-mac-arm64.sh, Apple Silicon) (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run
Build RPCS3 / RPCS3 Windows Clang (win64, clang, clang64) (push) Waiting to run
Build RPCS3 / RPCS3 FreeBSD (push) Waiting to run
This commit is contained in:
parent
e5848f4731
commit
a053abfba4
|
|
@ -111,7 +111,41 @@ void AtracXdecDecoder::alloc_avcodec()
|
||||||
fmt::throw_exception("avcodec_find_decoder() failed");
|
fmt::throw_exception("avcodec_find_decoder() failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
ensure(!(codec->capabilities & AV_CODEC_CAP_SUBFRAMES));
|
packet = av_packet_alloc();
|
||||||
|
if (!packet)
|
||||||
|
{
|
||||||
|
fmt::throw_exception("av_packet_alloc() failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
frame = av_frame_alloc();
|
||||||
|
if (!frame)
|
||||||
|
{
|
||||||
|
fmt::throw_exception("av_frame_alloc() failed");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AtracXdecDecoder::free_avcodec()
|
||||||
|
{
|
||||||
|
if (packet)
|
||||||
|
{
|
||||||
|
av_packet_free(&packet);
|
||||||
|
}
|
||||||
|
if (frame)
|
||||||
|
{
|
||||||
|
av_frame_free(&frame);
|
||||||
|
}
|
||||||
|
if (ctx)
|
||||||
|
{
|
||||||
|
avcodec_free_context(&ctx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AtracXdecDecoder::init_avcodec()
|
||||||
|
{
|
||||||
|
if (ctx)
|
||||||
|
{
|
||||||
|
avcodec_free_context(&ctx);
|
||||||
|
}
|
||||||
|
|
||||||
ctx = avcodec_alloc_context3(codec);
|
ctx = avcodec_alloc_context3(codec);
|
||||||
if (!ctx)
|
if (!ctx)
|
||||||
|
|
@ -133,34 +167,6 @@ void AtracXdecDecoder::alloc_avcodec()
|
||||||
frame->buf[0] = av_buffer_create(frame->data[0], ATXDEC_SAMPLES_PER_FRAME * sizeof(f32) * frame->ch_layout.nb_channels, [](void*, uint8_t*){}, nullptr, 0);
|
frame->buf[0] = av_buffer_create(frame->data[0], ATXDEC_SAMPLES_PER_FRAME * sizeof(f32) * frame->ch_layout.nb_channels, [](void*, uint8_t*){}, nullptr, 0);
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
packet = av_packet_alloc();
|
|
||||||
if (!packet)
|
|
||||||
{
|
|
||||||
fmt::throw_exception("av_packet_alloc() failed");
|
|
||||||
}
|
|
||||||
|
|
||||||
frame = av_frame_alloc();
|
|
||||||
if (!frame)
|
|
||||||
{
|
|
||||||
fmt::throw_exception("av_frame_alloc() failed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AtracXdecDecoder::free_avcodec()
|
|
||||||
{
|
|
||||||
av_packet_free(&packet);
|
|
||||||
av_frame_free(&frame);
|
|
||||||
avcodec_free_context(&ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AtracXdecDecoder::init_avcodec()
|
|
||||||
{
|
|
||||||
if (int err = avcodec_close(ctx); err)
|
|
||||||
{
|
|
||||||
fmt::throw_exception("avcodec_close() failed (err=0x%x='%s')", err, utils::av_error_to_string(err));
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx->block_align = nbytes;
|
ctx->block_align = nbytes;
|
||||||
ctx->ch_layout.nb_channels = nch_in;
|
ctx->ch_layout.nb_channels = nch_in;
|
||||||
ctx->sample_rate = sampling_freq;
|
ctx->sample_rate = sampling_freq;
|
||||||
|
|
|
||||||
|
|
@ -192,10 +192,10 @@ struct AtracXdecDecoder
|
||||||
|
|
||||||
// HLE exclusive
|
// HLE exclusive
|
||||||
b8 config_is_set = false; // For savestates
|
b8 config_is_set = false; // For savestates
|
||||||
const AVCodec* codec;
|
const AVCodec* codec = nullptr;
|
||||||
AVCodecContext* ctx;
|
AVCodecContext* ctx = nullptr;
|
||||||
AVPacket* packet;
|
AVPacket* packet = nullptr;
|
||||||
AVFrame* frame;
|
AVFrame* frame = nullptr;
|
||||||
|
|
||||||
u8 spurs_stuff[84]; // 120 bytes on LLE, pointers to CellSpurs, CellSpursTaskset, etc.
|
u8 spurs_stuff[84]; // 120 bytes on LLE, pointers to CellSpurs, CellSpursTaskset, etc.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue