阅读:3022回复:4

Amlogic T972 播放视频模糊问题

楼主#
更多 发布于:2022-08-05 11:15
0度情况下视频清晰度正常。

非0度 (90,180,270)旋转很模糊
用了311d2的显存buffer大小,还是很模糊
DDR频率也拉高了还是一样。有没有解决方法?

最新喜欢:

zhaoyf13zhaoyf...
沙发#
发布于:2022-08-11 08:53
这个问题非专业人士恐怕要靠Amlogic的大佬帮忙解决了
[url]http://190.lsal.cn/195/1329.gif?0728100424873[/url]
yam
yam
论坛版主
论坛版主
  • 社区居民
  • 优秀斑竹
  • VIP会员
  • 荣誉会员
板凳#
发布于:2022-08-15 15:47
diff --git a/drivers/amlogic/media/video_processor/ppmgr/ppmgr_vpp.c b/drivers/amlogic/media/video_processor/ppmgr/ppmgr_vpp.c
old mode 100644
new mode 100755
index 07d3045..a218b91
--- a/drivers/amlogic/media/video_processor/ppmgr/ppmgr_vpp.c
+++ b/drivers/amlogic/media/video_processor/ppmgr/ppmgr_vpp.c
@@ -86,9 +86,9 @@
 #define RECEIVER_NAME "ppmgr"
 #define PROVIDER_NAME   "ppmgr"
 
-#define MM_ALLOC_SIZE SZ_16M
-#define MAX_WIDTH  960
-#define MAX_HEIGHT 736
+#define MM_ALLOC_SIZE (SZ_16M + SZ_32M)
+#define MAX_WIDTH 1080
+#define MAX_HEIGHT 1920
 #define THREAD_INTERRUPT 0
 #define THREAD_RUNNING 1
 #define INTERLACE_DROP_MODE 1
@@ -221,6 +221,7 @@ u32 index2canvas(u32 index)
  return ppmgr_canvas_tab[index];
 }
 
+#define PPMGR2_CANVAS_INDEX_SRC (PPMGR_CANVAS_INDEX + 8)
 /************************************************
  *
  *   ppmgr as a frame provider
@@ -892,9 +893,9 @@ static void vf_rotate_adjust(struct vframe_s *vf, struct vframe_s *new_vf,
  new_vf->ratio_control = vf->ratio_control;
  }
 
- if (h > 1280) {
- w = w * 1280 / h;
- h = 1280;
+ if (h > 1920) {
+ w = w * 1920 / h;
+ h = 1920;
  }
 
  new_vf->width = w;
@@ -1172,6 +1173,7 @@ static void process_vf_rotate(struct vframe_s *vf,
  struct vframe_s *new_vf;
  struct ppframe_s *pp_vf;
  struct canvas_s cs0, cs1, cs2, cd;
+// struct vframe_s src_vf;
  u32 canvas_id;
  int ret = 0;
  unsigned int cur_angle = 0;
@@ -1299,6 +1301,26 @@ static void process_vf_rotate(struct vframe_s *vf,
  vfq_push(&q_ready, new_vf);
  return;
  }
+
+ if (vf->width > vf->height) {
+ if (cur_angle % 2) {
+ ppmgr_device.disp_width = MAX_WIDTH;
+ ppmgr_device.disp_height = MAX_HEIGHT;
+ } else {
+ ppmgr_device.disp_width = MAX_HEIGHT;
+ ppmgr_device.disp_height = MAX_WIDTH;
+ }
+ } else {
+ if (cur_angle % 2) {
+ ppmgr_device.disp_width = MAX_HEIGHT;
+ ppmgr_device.disp_height = MAX_WIDTH;
+ } else {
+ ppmgr_device.disp_width = MAX_HEIGHT;
+ ppmgr_device.disp_height = MAX_WIDTH;
+ }
+ }
+
+
 #ifdef CONFIG_AMLOGIC_POST_PROCESS_MANAGER_3D_PROCESS
  platform_type = get_platform_type();
  if (platform_type == PLATFORM_TV)
@@ -3058,7 +3080,7 @@ int ppmgr_buffer_init(int vout_mode)
  u32 decbuf_size;
  unsigned int buf_start;
  int buf_size;
- struct vinfo_s vinfo = {.width = 1280, .height = 720, };
+ struct vinfo_s vinfo = {.width = 1080, .height = 1920, };
  /* int flags = CODEC_MM_FLAGS_DMA; */
  int flags = CODEC_MM_FLAGS_DMA | CODEC_MM_FLAGS_CMA_CLEAR;
  const char *keep_owner = "ppmgr_scr";
diff --git a/include/linux/amlogic/media/canvas/canvas.h b/include/linux/amlogic/media/canvas/canvas.h
old mode 100644
new mode 100755
index 98de6f3..1a3d31c
--- a/include/linux/amlogic/media/canvas/canvas.h
+++ b/include/linux/amlogic/media/canvas/canvas.h
@@ -68,7 +68,7 @@ struct canvas_config_s {
  */
 #define AMVDEC_CANVAS_MAX1        0xbf
 #define AMVDEC_CANVAS_MAX2        0x25
-#define AMVDEC_CANVAS_START_INDEX 0x78
+#define AMVDEC_CANVAS_START_INDEX 0x80
 
 extern void canvas_config_config(u32 index, struct canvas_config_s *cfg);
地板#
发布于:2022-09-08 21:42
zhaoyf13:这个问题非专业人士恐怕要靠Amlogic的大佬帮忙解决了回到原帖
是的,折腾好久了
4楼#
发布于:2022-09-09 09:04
yam:diff --git a/drivers/amlogic/media/video_processor/ppmgr/ppmgr_vpp.c b/drivers/amlogic/media/video_processor/ppmgr/ppmgr...回到原帖
感谢
游客

返回顶部