Comments (7)
could not reproduce this issue...
the only part of this commit that might affect the decoding flow is in rkmpp_dqbuf(), but it looks fine
from libv4l-rkmpp.
maybe we can try to compare the v4l-rkmpp's verbose logs.
from libv4l-rkmpp.
Here are the logs with env LIBV4L_RKMPP_LOG_LEVEL=7
rkmpp_fine.log.gz
rkmpp_slow.log.gz
from libv4l-rkmpp.
reverting changes to rkmpp_dqbuf
would solve it.
diff --git a/src/libv4l-rkmpp.c b/src/libv4l-rkmpp.c
index 7ad4b53..9ddbf69 100644
--- a/src/libv4l-rkmpp.c
+++ b/src/libv4l-rkmpp.c
@@ -669,6 +669,7 @@ int rkmpp_dqbuf(struct rkmpp_context *ctx, struct v4l2_buffer *buffer)
pthread_mutex_lock(&queue->queue_mutex);
rkmpp_buffer = TAILQ_FIRST(&queue->avail_buffers);
+ TAILQ_REMOVE(&queue->avail_buffers, rkmpp_buffer, entry);
pthread_mutex_unlock(&queue->queue_mutex);
/* Update poll event after avail list changed */
@@ -680,10 +681,11 @@ int rkmpp_dqbuf(struct rkmpp_context *ctx, struct v4l2_buffer *buffer)
RETURN_ERR(EINVAL, -1);
}
- pthread_mutex_lock(&queue->queue_mutex);
+ if (rkmpp_buffer_keyframe(rkmpp_buffer))
+ rkmpp_buffer_clr_keyframe(rkmpp_buffer);
+ if (rkmpp_buffer_error(rkmpp_buffer))
+ rkmpp_buffer_clr_error(rkmpp_buffer);
rkmpp_buffer_clr_available(rkmpp_buffer);
- TAILQ_REMOVE(&queue->avail_buffers, rkmpp_buffer, entry);
- pthread_mutex_unlock(&queue->queue_mutex);
rkmpp_buffer_clr_queued(rkmpp_buffer);
from libv4l-rkmpp.
And a smaller patch to fix:
diff --git a/src/libv4l-rkmpp.c b/src/libv4l-rkmpp.c
index 7ad4b53..0179b92 100644
--- a/src/libv4l-rkmpp.c
+++ b/src/libv4l-rkmpp.c
@@ -669,6 +669,7 @@ int rkmpp_dqbuf(struct rkmpp_context *ctx, struct v4l2_buffer *buffer)
pthread_mutex_lock(&queue->queue_mutex);
rkmpp_buffer = TAILQ_FIRST(&queue->avail_buffers);
+ TAILQ_REMOVE(&queue->avail_buffers, rkmpp_buffer, entry);
pthread_mutex_unlock(&queue->queue_mutex);
/* Update poll event after avail list changed */
@@ -682,7 +683,6 @@ int rkmpp_dqbuf(struct rkmpp_context *ctx, struct v4l2_buffer *buffer)
pthread_mutex_lock(&queue->queue_mutex);
rkmpp_buffer_clr_available(rkmpp_buffer);
- TAILQ_REMOVE(&queue->avail_buffers, rkmpp_buffer, entry);
pthread_mutex_unlock(&queue->queue_mutex);
rkmpp_buffer_clr_queued(rkmpp_buffer);
from libv4l-rkmpp.
huh, there's indeed a mistake around there, try:
--- a/src/libv4l-rkmpp.c
+++ b/src/libv4l-rkmpp.c
@@ -671,9 +671,6 @@ int rkmpp_dqbuf(struct rkmpp_context *ctx, struct v4l2_buffer *buffer)
rkmpp_buffer = TAILQ_FIRST(&queue->avail_buffers);
pthread_mutex_unlock(&queue->queue_mutex);
- /* Update poll event after avail list changed */
- rkmpp_update_poll_event(ctx);
-
ret = rkmpp_to_v4l2_buffer(ctx, rkmpp_buffer, buffer);
if (ret < 0) {
LOGE("failed to convert buffer\n");
@@ -687,6 +684,9 @@ int rkmpp_dqbuf(struct rkmpp_context *ctx, struct v4l2_buffer *buffer)
rkmpp_buffer_clr_queued(rkmpp_buffer);
+ /* Update poll event after avail list changed */
+ rkmpp_update_poll_event(ctx);
+
LOGV(2, "dequeue buffer: %d(%" PRIu64 "), size: %d, type: %d\n",
buffer->index, rkmpp_buffer->timestamp,
rkmpp_buffer->bytesused, buffer->type);
from libv4l-rkmpp.
Yes that does fix my issue!
from libv4l-rkmpp.
Related Issues (20)
- Dependency chain in README HOT 3
- Feature request: H265 decoding HOT 9
- Chromium 91 support HOT 5
- 关于libv4l-rkmpp的使用 HOT 4
- some videos are displayed all green HOT 15
- is it possible to support AV1 decoding? HOT 14
- v4l2-ctl 通过libv4l-rkmpp抓取h264帧 HOT 1
- VLC support HOT 1
- rockchip_mpp not found HOT 3
- about decode size limit HOT 3
- Can't play av1 video with big bit rate HOT 5
- 是否可以在Electron中使用vpu进行视频解码 HOT 6
- does it possible to decode more than 1 video at the same time HOT 4
- Use Fuse instead of libv4l-utils HOT 14
- chromium has dropped libv4l2 since v117 HOT 1
- Trouble diagnosing RKMPP not loading when moving from chromium 100 - 114 HOT 8
- chromium v121 can't use egl to render video output HOT 17
- Handling 10-bit HEVC/VP9/AV1 videos? HOT 5
- use LibYUVImageProcessorBackend in case NV12 rendering is not supported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libv4l-rkmpp.