mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
ffmpeg: update RPi4 HEVC patch to 18.3-Leia-b0e4133
Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
ee01247de3
commit
ff14fc75de
@ -1020,10 +1020,10 @@ index 0000000000..6a1d95f195
|
||||
+#endif // __CTRL_FILES_H__
|
||||
diff --git a/libavcodec/rpi_hevc.c b/libavcodec/rpi_hevc.c
|
||||
new file mode 100644
|
||||
index 0000000000..a000077f33
|
||||
index 0000000000..fcf03d849c
|
||||
--- /dev/null
|
||||
+++ b/libavcodec/rpi_hevc.c
|
||||
@@ -0,0 +1,1065 @@
|
||||
@@ -0,0 +1,1075 @@
|
||||
+// FFMPEG HEVC decoder hardware accelerator
|
||||
+// Andrew Holme, Argon Design Ltd
|
||||
+// Copyright (c) June 2017 Raspberry Pi Ltd
|
||||
@ -1331,6 +1331,12 @@ index 0000000000..a000077f33
|
||||
+
|
||||
+static int check_status(RPI_T *rpi) {
|
||||
+ int status, c, p;
|
||||
+
|
||||
+ // this is the definition of successful completion of phase 1
|
||||
+ // it assures that status register is zero and all blocks in each tile have completed
|
||||
+ if (rpi->apb_read(rpi->id, RPI_CFSTATUS) == rpi->apb_read(rpi->id, RPI_CFNUM))
|
||||
+ return 0;
|
||||
+
|
||||
+ status = rpi->apb_read(rpi->id, RPI_STATUS);
|
||||
+ p = (status>>4)&1;
|
||||
+ c = (status>>3)&1;
|
||||
@ -1340,7 +1346,7 @@ index 0000000000..a000077f33
|
||||
+ if (c) rpi->max_coeff64 += rpi->max_coeff64/2;
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+ return 2;
|
||||
+}
|
||||
+
|
||||
+//////////////////////////////////////////////////////////////////////////////
|
||||
@ -1697,6 +1703,7 @@ index 0000000000..a000077f33
|
||||
+
|
||||
+ int i, a64, x;
|
||||
+ char *buf;
|
||||
+ int status = 1;
|
||||
+
|
||||
+ // End of phase 1 command compilation
|
||||
+ if (pps->entropy_coding_sync_enabled_flag) {
|
||||
@ -1725,7 +1732,8 @@ index 0000000000..a000077f33
|
||||
+ rpi->axi_dump(rpi->id, ((uint64_t)a64)<<6, rpi->cmd_len * sizeof(struct RPI_CMD));
|
||||
+ rpi->apb_write_addr(rpi->id, RPI_CFBASE, a64);
|
||||
+ rpi->wait_interrupt(rpi->id, 1);
|
||||
+ if (check_status(rpi)==0) break; // No PU/COEFF overflow?
|
||||
+ status = check_status(rpi);
|
||||
+ if (status != 1) break; // No PU/COEFF overflow?
|
||||
+ }
|
||||
+ pthread_mutex_unlock(&rpi->mutex_phase1);
|
||||
+
|
||||
@ -1830,10 +1838,12 @@ index 0000000000..a000077f33
|
||||
+
|
||||
+ rpi->apb_dump_regs(rpi->id, 0x0, 32);
|
||||
+ rpi->apb_dump_regs(rpi->id, 0x8000, 24);
|
||||
+ // only do phase if phase 1 completed without errors
|
||||
+ if (status == 0) {
|
||||
+ rpi->apb_write(rpi->id, RPI_NUMROWS, rpi->PicHeightInCtbsY);
|
||||
+ rpi->apb_read_drop(rpi->id, RPI_NUMROWS); // Read back to confirm write has reached block
|
||||
+ rpi->wait_interrupt(rpi->id, 2);
|
||||
+
|
||||
+ }
|
||||
+//printf("%s: %dx%d %d\n", __FUNCTION__, f->width, f->height, f->linesize[0]);
|
||||
+#if defined(AXI_BUFFERS)
|
||||
+ // Copy YUV output frame
|
||||
|
Loading…
x
Reference in New Issue
Block a user