Distorted Video i.MX6 gStreamer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Distorted Video i.MX6 gStreamer

Jump to solution
13,864 Views
ryanerb
Contributor III

Hello,

I am having problems with distorted video.  I have done quite a bit of testing.

Attached is a picture of the issue (toward bottom)

My gStreamer pipelines must be correct because other resolutions work fine.

The problem only occurs when you play a video that has the same resolution as the display.


Display is HDMI.

For instance, a 1920x1080p video played on a 1280x720p video plays perfect.  A 1280x720p video played on a 1920x1080p video plays perfect.

But a 1280x720p video played on a 1280x720p Display plays distorted. Also a 1920x1080p video played on a 1920x1080p display plays distorted.

I have tested Yocto 1.5 (3.10.17) and Yocto 1.3 (kernel 3.0.35)

Below is some snippets of information from my system that may help.

I am using the Big Buck Bunny Video for testing as well as video test source (free download HERE)

I am not sure if the issue is in the driver or the gstreamer plugin?

___________________________________

INFO BELOW:

PIPELINE:

gst-launch videotestsrc ! video/x-raw-yuv,width=1280,height=720 ! mfw_v4lsink device=/dev/video16

Other info:

root@ventana:~# cat /sys/class/graphics/fb0/mode

S:1280x720p-60

root@ventana:~# cat /sys/class/graphics/fb0/modes

S:1920x1080p-60

S:1920x1080p-50

S:1280x720p-60

S:1280x720p-50

S:720x576p-50

S:720x576p-50

S:720x480p-60

S:720x480p-60

V:640x480p-60

D:1280x720p-60

V:640x480p-60

Poky 8.0.2 (Yocto Project 1.3.2 Reference Distro) 1.3.2 ventana ttymxc1

ventana login: root

root@ventana:~# uname -a

Linux ventana 3.0.35-4.4.0-gateworks+yocto+gaabbed9 #1 SMP PREEMPT Fri May 2 09:54:05 PDT 2014 armv7l GNU/Linux

root@ventana:~#  gst-inspect | grep imx

vpu.imx:  vpudec: VPU-based video decoder

vpu.imx:  vpuenc: VPU-based video encoder

v4lsink.imx:  mfw_v4lsink: v4l2 video sink

isink.imx:  mfw_isink: IPU-based video sink

tvsrc.imx:  tvsrc: v4l2 based tv src

mp3enc.imx:  mfw_mp3encoder: mp3 audio encoder

v4lsrc.imx:  mfw_v4lsrc: v4l2 based camera src

audiopeq.imx:  mfw_audio_pp: audio post equalizer

amrdec.imx:  mfw_amrdecoder: amr audio decoder

aiur.imx: webm: webm

aiur.imx:  aiurdemux: aiur universal demuxer

beep.imx: ac3: ac3

beep.imx: 3ca: ac3

beep.imx:  beepdec: beep audio decoder

beep.imx:  beepdec.vorbis: Vorbis decoder

beep.imx:  beepdec.ac3: AC3 decoder

beep.imx:  beepdec.wma: WMA decoder

beep.imx:  beepdec.mp3: MP3 decoder

beep.imx:  beepdec.aac: AAC LC decoder

ipucsc.imx:  mfw_ipucsc: IPU-based video converter

aacdec.imx:  mfw_aacdecoder: aac audio decoder

vorbisdec.imx:  mfw_vorbisdecoder: vorbis audio decoder

Console output after running command:

root@ventana:~# gst-launch videotestsrc ! video/x-raw-yuv,width=1280,height=720 ! mfw_v4lsink device=/dev/video16

this is powerful mx6q

MFW_GST_V4LSINK_PLUGIN 3.0.1 build on Apr 29 2014 02:30:21.

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

[  409.674205] mxc_v4l2_output mxc_v4l2_output.0: Bypass IC.

>>V4L_SINK: Actually buffer status:

        hardware buffer : 12

        software buffer : 0

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

full screen size:1280x720

[V4L Update Display]: left=0, top=0, width=1280, height=720

New clock: GstSystemClock

Here is some more console output for a simple gplay with a Big Buck Bunny Video:

root@ventana:~# gplay /media/sda1/big_buck_bunny_720p_h264.mov

playbin2 is employed!

fsl_player_init(): Successfully initialize!

fsl_player_set_media_location(): filename=/media/sda1/big_buck_bunny_720p_h264.mov

[Stopped  ][Vol=01][00:00:00/00:00:00][fps:0]Aiur: 3.0.1

Core: MPEG4PARSER_06.04.22  build on Aug 22 2012 09:58:20

  mime: video/quicktime; audio/x-m4a; application/x-3gp

  file: /usr/lib/imx-mm/parser/lib_mp4_parser_arm11_elinux.so

Content Info:

        URI:

              file:///media/sda1/big_buck_bunny_720p_h264.mov

        Idx File:

              /home/root/.aiur/.media.sda1.big_buck_bunny_720p_h264.mov.aidx

        Seekable  : Yes

        Size(byte): 416751190

Movie Info:

        Seekable  : Yes

        Live      : No

        Duration  : 0:09:56.461696000

        ReadMode  : File

        Track     : 3

Track 00 [video_0000] Enabled

        Duration: 0:09:56.458304000

        Language: und

        Mime:

              video/x-h264, parsed=(boolean)true, width=(int)1280, height=(int)720, framerate=

              (fraction)24/1, codec_data=(buffer)00000001274d401fa9180a00b7600d4040406db0ad7bd

              f010000000128de09c8

[INFO]  Product Info: i.MX6Q/D/S

vpudec versions :smileyhappy:

        plugin: 3.0.1

        wrapper: 1.0.24(VPUWRAPPER_ARM_LINUX Build on Apr 29 2014 02:05:43)

        vpulib: 5.4.6

        firmware: 2.1.5.32515

Track 01 [subtitle]: Disabled

        Codec: 0, SubCodec: 0

Track 02 [audio_0000] Enabled

        Duration: 0:09:56.480000000

        Language: und

        Mime:

              audio/mpeg, mpegversion=(int)4, channels=(int)6, rate=(int)48000, bitrate=(int)4

              48000, framed=(boolean)true, codec_data=(buffer)11b0

BLN_MAD-MMCODECS_AACD_ARM_03.07.00  build on Jul 17 2012 17:47:46.

MFW_GST_AAC_PLUGIN 3.0.1 build on Apr 29 2014 02:30:35.

FOUND GST_MESSAGE_TAG!

          codec: AAC

  language code: und

        bitrate: 448000

FOUND GST_MESSAGE_TAG!

container format: MOV/MP4/3GP

FOUND GST_MESSAGE_TAG!

          codec: H.264/AVC

  language code: und

this is powerful mx6q

MFW_GST_V4LSINK_PLUGIN 3.0.1 build on Apr 29 2014 02:30:21.

[INFO]  bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0

FOUND GST_MESSAGE_TAG!

    audio codec: AAC decoder

        bitrate: 448000

sampling frequency (Hz): 48000

number of channels: 6

[WARN]  VPU iram is less than needed, some parts don't use iram

[  486.470340] mxc_v4l2_output mxc_v4l2_output.0: Bypass IC.

>>V4L_SINK: Actually buffer status:

        hardware buffer : 13

        software buffer : 0

[Stopped  ][Vol=01][00:00:00/00:09:56][fps:0]get GST_MESSAGE_ELEMENT prepare-xwindow-id;

get GST_MESSAGE_ELEMENT playbin2-stream-changed, uri=(string)file:///media/sda1/big_buck_bunny_720p_h264.mov;

full screen size:1280x720

[V4L Update Display]: left=0, top=0, width=1280, height=720

fsl_player_play()

FSL_PLAYER_01.00_LINUX build on Apr 29 2014 02:31:04

        [h]display the operation Help

        [p]Play

        [s]Stop

        [e]Seek

        [a]Pause when playing, play when paused

        [v]Volume

        [m]Switch to mute or not

        [>]Play next file

        [<]Play previous file

        [r]Switch to repeated mode or not

        [f]Set full screen or not

        [z]resize the width and height

        [t]Rotate

        [c]Setting play rate

        [i]Display the metadata

        [x]eXit

[Playing  ][Vol=01][00:00:25/00:09:56][fps:24]^C Aborted by signal Interrupt...

Running time 0:00:26.922666666 render fps 23.995

Total rendered:647

[Playing  ][Vol=01][00:00:00/00:00:00][fps:24]

20140604_171246-resized-800.jpg

arpan_chakravarty KevinWong

Labels (1)
Tags (2)
1 Solution
4,498 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

It seems there is some issue in clk_round_rate(), I haven't found the root cause, but I think you can use the followed workaround to get the 27MHz BT656 pixel clock:

In file ipu_disp.c, function ipu_init_sync_panel():

   rounded_pixel_clk =

    clk_round_rate(ipu->di_clk[disp], pixel_clk);

+   if(pixel_fmt == IPU_PIX_FMT_BT656)

+    rounded_pixel_clk = 108000000;

   ret = clk_set_rate(ipu->di_clk[disp],

      rounded_pixel_clk);

   if (ret) {

    dev_err(ipu->dev,

     "set di clk rate error:%d\n", ret);

    return ret;

   }

   dev_dbg(ipu->dev, "di clk:%d\n", rounded_pixel_clk);

   ret = clk_set_parent(ipu->pixel_clk_sel[disp],

      ipu->di_clk[disp]);

View solution in original post

37 Replies
3,210 Views
daiane_angolini
NXP Employee
NXP Employee

full screen size:1920x1080

(...)

root@imx6qsabresd:~# cat /proc/cmdline

console=ttymxc0,115200 root=/dev/mmcblk0p2 rootwait rw video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24

root@imx6qsabresd:~# fbset

mode "1920x1080-60"

    # D: 148.500 MHz, H: 67.500 kHz, V: 60.000 Hz

    geometry 1920 1080 1920 1080 16

    timings 6734 148 88 36 4 44 5

    hsync high

    vsync high

    rgba 5/11,6/5,5/0,0/0

endmode

I was not able to reproduce the issue with 1080p HDMI resolution + 1080p resolution movie.

          video/x-h264, parsed=(boolean)true, width=(int)1280, height=(int)720, framerate=
          (fraction)2997/125

root@imx6qsabresd:~# fbset

mode "1280x720-50"

    # D: 74.250 MHz, H: 37.500 kHz, V: 50.000 Hz

    geometry 1280 720 1280 720 16

    timings 13468 220 440 20 5 40 5

    hsync high

    vsync high

    rgba 5/11,6/5,5/0,0/0

endmode

Or with 1280x720

With both movies I can see it clear in my HDMI.

Can you, please, help me to reproduce it?

At first log you can see my /proc/cmd

First movie (1080p) is big buck bunny, second is another trailer.  Do you think it may be caused by the media file?

I used gplay for both.

0 Kudos
3,210 Views
ryanerb
Contributor III

Hello Daiane,

Can you please test with videotestsrc.

Please use the below command line and adjust the number depending on what your resolution is:

gst-launch videotestsrc ! video/x-raw-yuv,width=1280,height=720 ! mfw_v4lsink device=/dev/video16


Let me know what you see.


Thanks,

Ryan


3,210 Views
ryanerb
Contributor III

Hello Daiane,

Looking for an update and trying to resolve by end of this week.

Please feel free to ask any more questions so we can get this resolved.

Please let me know the results of the videotestsrc test.

Thank you,
Ryan

3,210 Views
daiane_angolini
NXP Employee
NXP Employee

this is my board/u-boot

U-Boot 2014.01 (Jun 05 2014 - 05:20:06)

CPU:   Freescale i.MX6DL rev1.1 at 792 MHz

kernel:

Linux imx6dlsabresd 3.10.17-1.0.0_ga+g232293e

MM:

3.0.11

and this is the image I used to test:

http://ci.ossystems.com.br/public/fsl-community-bsp/daisy/19/framebuffer/imx6dlsabresd

I tested again with the same movies I had test before. And I was not able to reproduce the issue.

What is the board you are using? I only have access today to one imx6dlsabresd, but I can test imx6dlsabreauto next week.

Can you, please, try to reproduce using a Freescale Reference Board?

0 Kudos
3,210 Views
ryanerb
Contributor III

Hello,

I only have a Sabre-Lite and Nitrogen 6x so I cannot test on a Freescale Reference board.

Can you tell post your results of the videotestsrc command?

Please use the below command line and adjust the number depending on what your resolution is:

gst-launch videotestsrc ! video/x-raw-yuv,width=1280,height=720 ! mfw_v4lsink device=/dev/video16



Thank you,

Ryan

0 Kudos
3,210 Views
daiane_angolini
NXP Employee
NXP Employee

The exact command line you shared works fine over here.

update:

and fbset shows the resolution 1280x720-50

D: 74.250

H: 37.500

V: 50.000

0 Kudos
3,210 Views
ryanerb
Contributor III

Hi Daiane,

Could you provide a few more details, such as what resolution you were running at and if you were using HDMI or LVDS?

Thank you,

Ryan

0 Kudos
3,210 Views
daiane_angolini
NXP Employee
NXP Employee

it is only HDMI

please see the fbset info I updated in last reply (sorry)

0 Kudos
3,209 Views
timharvey
Contributor IV

Daiane,

Thanks for your help here.

We are using a Gateworks Ventana GW5400 board, which is closely based off the SabreSD reference design. We are now running yocto v1.6 with MM 3.0.11 with the fsl 3.10.17-1.0.0_ga kernel (with some patches on top to fully support our board - source is here: Commits · Gateworks/linux-imx6 · GitHub)

Here are some updated specifics - I would appreciate it if you could repeat this on your SabreSD with HDMI out and see if you get the same results as us.

root@ventana:~# uname -a

Linux ventana 3.10.17-1.0.0_ga+yocto+g44f5a1b #1 SMP Mon Jun 23 13:53:13 PDT 2014 armv7l GNU/Linux

root@ventana:~# cat /proc/cmdline

# no video= params to override the deafult mxcfb configuration from devicetree which is HDMI, CVBS, LVDS for our board

console=ttymxc1,115200 root=ubi0:rootfs ubi.mtd=2 rootfstype=ubifs debug

root@ventana:~# dmesg | grep mxc_sdc_fb

[    0.650594] mxc_sdc_fb fb.31: registered mxc display driver hdmi IPU1_DISP1

[    0.685380] mxc_sdc_fb fb.32: registered mxc display driver adv739x IPU2_DISP0

[    0.695182] mxc_sdc_fb fb.33: registered mxc display driver ldb IPU1_DISP0

root@ventana:~# dmesg | grep "i.MX6"

[    0.000000] Machine: Freescale i.MX6 Quad/DualLite (Device Tree), model: Gateworks Ventana i.MX6 Dual/Quad GW54XX

[    0.000000] CPU identified as i.MX6Q, silicon rev 1.2

root@ventana:~# opkg list_installed | grep gst-fsl-plugin

gst-fsl-plugin - 3.0.11-r0

gst-fsl-plugin-gplay - 3.0.11-r0

root@ventana:~# cat /sys/class/graphics/fb0/modes

S:1920x1080p-60

S:1920x1080p-50

S:1280x720p-60

S:1280x720p-50

S:720x576p-50

S:720x576p-50

S:720x480p-60

S:720x480p-60

V:640x480p-60

D:720x480p-59

D:1280x720p-60

V:640x480p-60

root@ventana:~# cat /sys/class/graphics/fb0/mode

S:1920x1080p-60

root@ventana:~# fbset

mode "1920x1080-60"

    # D: 148.500 MHz, H: 67.500 kHz, V: 60.000 Hz

    geometry 1920 1080 1920 1080 24

    timings 6734 148 88 36 4 44 5

    hsync high

    vsync high

    rgba 8/16,8/8,8/0,0/0

endmode

# default display output is 1080p

# attempt 480p input source to 1080p output (this shows fine)

gst-launch videotestsrc ! video/x-raw-yuv,width=720,height=480 ! mfw_v4lsink device=/dev/video16 sync=false

MFW_GST_V4LSINK_PLUGIN 3.0.11 build on Jun 23 2014 14:43:24.

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

>>V4L_SINK: Actually buffer status:

        hardware buffer : 12

        software buffer : 0

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

full screen size:1920x1080

[V4L Update Display]: left=0, top=0, width=1920, height=1080

set v4l display crop sucessfully

New clock: GstSystemClock

^CCaught interrupt -- handling interrupt.

Interrupt: Stopping pipeline ...

Execution ended after 15521986668 ns.

Setting pipeline to PAUSED ...

Running time 0:00:15.523626668 render fps 54.240

Setting pipeline to READY ...

Setting pipeline to NULL ...

Total rendered:842

Freeing pipeline ...

[--->FINALIZE v4l_sink

root@ventana:~#

# attempt a 1080p input to a 1080p output (this shows display issues)

root@ventana:~# gst-launch videotestsrc ! video/x-raw-yuv,width=1920,height=1080 ! mfw_v4lsink device=/dev/video16 sync=false

MFW_GST_V4LSINK_PLUGIN 3.0.11 build on Jun 23 2014 14:43:24.

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...[ 1627.986231] mxc_v4l2_output v4l2_out.38: Bypass IC.

>>V4L_SINK: Actually buffer status:

        hardware buffer : 12

        software buffer : 0

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

full screen size:1920x1080

[V4L Update Display]: left=0, top=0, width=1920, height=1080

set v4l display crop sucessfully

New clock: GstSystemClock

^CCaught interrupt -- handling interrupt.

Interrupt: Stopping pipeline ...

Execution ended after 20274201669 ns.

Setting pipeline to PAUSED ...

Running time 0:00:20.274989669 render fps 23.132

Setting pipeline to READY ...

Setting pipeline to NULL ...

Total rendered:469

Freeing pipeline ...

[--->FINALIZE v4l_sink

root@ventana:~#

# change the default 1080p output to 480p

root@ventana:~# echo "S:720x480p-60" > /sys/class/graphics/fb0/mode

root@ventana:~# cat /sys/class/graphics/fb0/mode

S:720x480p-60

root@ventana:~# fbset

mode "720x480-60"

    # D: 27.000 MHz, H: 31.469 kHz, V: 59.940 Hz

    geometry 720 480 720 480 12

    timings 37037 60 16 30 9 62 6

    nonstd 842094158

    rgba 8/16,8/8,8/0,0/0

endmode

# now we are at 480p output

# 480p source to a 480p output shows display issues

root@ventana:~# gst-launch videotestsrc ! video/x-raw-yuv,width=720,height=480 ! mfw_v4lsink device=/dev/video16 sync=false                                   

MFW_GST_V4LSINK_PLUGIN 3.0.11 build on Jun 23 2014 14:43:24.

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

>>V4L_SINK: Actually buffer status:

        hardware buffer : 12

        software buffer : 0

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

full screen size:720x480

[V4L Update Display]: left=0, top=0, width=720, height=480

set v4l display crop sucessfully

New clock: GstSystemClock

^CCaught interrupt -- handling interrupt.

Interrupt: Stopping pipeline ...

Execution ended after 5508465000 ns.

Setting pipeline to PAUSED ...

Running time 0:00:05.509253001 render fps 59.899

Setting pipeline to READY ...

Setting pipeline to NULL ...

Total rendered:330

Freeing pipeline ...

[--->FINALIZE v4l_sink

# change back to 1080p

# 720p input to 1080p output shows fine

root@ventana:~# gst-launch videotestsrc ! video/x-raw-yuv,width=720,height=480 ! mfw_v4lsink device=/dev/video16 sync=false

MFW_GST_V4LSINK_PLUGIN 3.0.11 build on Jun 23 2014 14:43:24.

Setting pipeline to PAUSED ...

Pipeline is PREROLLING ...

>>V4L_SINK: Actually buffer status:

        hardware buffer : 12

        software buffer : 0

Pipeline is PREROLLED ...

Setting pipeline to PLAYING ...

full screen size:1920x1080

[V4L Update Display]: left=0, top=0, width=1920, height=1080

set v4l display crop sucessfully

New clock: GstSystemClock

^CCaught interrupt -- handling interrupt.

Interrupt: Stopping pipeline ...

Execution ended after 4256313001 ns.

Setting pipeline to PAUSED ...

Running time 0:00:04.257095334 render fps 54.027

Setting pipeline to READY ...

Setting pipeline to NULL ...

Total rendered:230

Freeing pipeline ...

[--->FINALIZE v4l_sink

The above seems to indicate to me that whenever scaling is necessary the output is fine, but whenever the input resolution matches the output we have problems.

With the following patch, this issue appears to be resolved, but I'm not clear if its a valid fix or if it will cause other issues:

diff --git a/drivers/media/platform/mxc/output/mxc_vout.c b/drivers/media/platfo

index 9cb4568..89326d9 100644

--- a/drivers/media/platform/mxc/output/mxc_vout.c

+++ b/drivers/media/platform/mxc/output/mxc_vout.c

@@ -1219,6 +1219,7 @@ static int mxc_vout_try_task(struct mxc_vout_output *vout)

        }

        /* assume task.output already set by S_CROP */

        vout->linear_bypass_pp = is_pp_bypass(vout);

+vout->linear_bypass_pp = 0;

        if (vout->linear_bypass_pp) {

                v4l2_info(vout->vfd->v4l2_dev, "Bypass IC.\n");

                output->format = input->format;

Are you saying that you cannot recreate the issue above using a SabreSD with 3.10.17_1.0.0-ga kernel, yocto1.6 userspace, and default kernel cmdline such that HDMI is fb0?

Thanks,

Tim

0 Kudos
3,210 Views
daiane_angolini
NXP Employee
NXP Employee

Sorry, do you mean I follow the same commands and share my log?

0 Kudos
3,210 Views
daiane_angolini
NXP Employee
NXP Employee

Linux imx6dlsabreauto 3.10.17-1.0.0_ga+g232293e #1 SMP PREEMPT Fri Jun 6 02:55:58 UTC 2014 armv7l GNU/Linux

console=ttymxc3,115200 root=/dev/mmcblk0p2 rootwait rw video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24

mxc_sdc_fb fb.22: register mxc display driver hdmi

mxc_sdc_fb fb.23: register mxc display driver hdmi

mxc_sdc_fb fb.23: NO mxc display driver found!

Machine: Freescale i.MX6 Quad/DualLite (Device Tree), model: Freescale i.MX6 DualLite/Solo SABRE Automotive Board

CPU identified as i.MX6DL, silicon rev 1.1

U:1280x720p-120

U:1280x720p-100

U:1920x1080p-30

U:1920x1080p-25

U:1920x1080p-24

U:1920x1080p-50

U:1440x576p-50

U:1440x576p-50

U:1440x288p-50

U:1440x288p-50

U:1280x720p-50

U:720x576p-50

U:720x576p-50

U:1920x1080p-60

U:1440x480p-60

U:1440x480p-60

U:1440x240p-60

U:1440x240p-60

U:1280x720p-60

U:720x480p-60

U:720x480p-60

U:640x480p-60

U:1920x1080p-60

mode "1920x1080-60"

        # D: 148.500 MHz, H: 67.500 kHz, V: 60.000 Hz

        geometry 1920 1080 1920 1080 12

        timings 6734 148 88 36 4 44 5

        accel false

        rgba 5/11,6/5,5/0,0/0

endmode

I don't have opkg on my pre-built image, so I past the verbose version of my gstreamer:

[Stopped  ][Vol=01][00:00:00/00:00:00][fps:0]Aiur: 3.0.11

Core: AVI_PARSER_03.05.10  build on Dec 27 2013 09:55:15

  mime: video/x-msvideo

  file: /usr/lib/imx-mm/parser/lib_avi_parser_arm11_elinux.so.3.1

Content Info:

        URI:

              file:///media/sda1/big_buck_bunny_1080p_surround.avi

        Idx File:

              /home/root/.aiur/.media.sda1.big_buck_bunny_1080p_surround.avi.aidx

        Seekable  : Yes

        Size(byte): 928670754

Movie Info:

        Seekable  : Yes

        Live      : No

        Duration  : 0:00:03.072000000

        ReadMode  : Track

        Track    : 2

Track 00 [video_000000] Enabled

        Duration: 0:00:02.666662000

        Language: und

        Mime:

              video/mpeg, mpegversion=(int)4, parsed=(boolean)true, width=(int)1920, height=(i

              nt)1080, framerate=(fraction)5000000/208333

[INFO]  Product Info: i.MX6Q/D/S

vpudec versions :smileyhappy:

        plugin: 3.0.11

        wrapper: 1.0.46(VPUWRAPPER_ARM_LINUX Build on Jun  6 2014 02:56:47)

        vpulib: 5.4.23

        firmware: 3.1.1.46056

Track 01 [audio_000000] Enabled

        Duration: 0:00:03.072000000

        Language: und

        Mime:

0 Kudos
3,201 Views
timharvey
Contributor IV

to rule out gplay/vpudec doing something different on my platform can you please show me the output and verify correct colorbar display of the following on your board:

cat /sys/class/graphics/fb0/mode

fbset

gst-launch videotestsrc ! video/x-raw-yuv,width=1920,height=1080 ! mfw_v4lsink device=/dev/video16

Thanks,

Tim

0 Kudos
3,201 Views
timharvey
Contributor IV

We are using the Freescale patches to support BT656/BT1120 in order to support analog video output from here: Patch to Support BT656 and BT1120 Output For i.MX6 BSP

It is something in this patch that is causing the issue - if I revert that patch the issue goes away.

Is there a reason why Freescale is not supporting the patches at Patch to Support BT656 and BT1120 Output For i.MX6 BSP in their BSP? From the community posts here I see that several customers are using that and thus going through the trouble of porting and possibly debugging the patch every kernel version.

Thanks,

Tim

3,201 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Hi Tim, after applied the BT656 output patch, you should pay attention to the frame buffer format, for BT656, the video data output from display interface should be the UYVY format, so when it is the second display on iMX6S/DL, the frame buffer will be UYVY format too.

In v4l2 output driver, the patch had added code to identify the DIFMT and FBFMT, that was used to fix the video playback color space issue.

There are also many discussions in the original patch link for this limitation.

3,201 Views
timharvey
Contributor IV

Hi Qiang,

Thanks for the reply.

I'm not using BT656 in this example. I'm not sure where the issue is yet, but the BT656 output patch applied to the 3.10.17 kernel is causing issues when the CC is bypassed. My current work-around is to always force the CC to not be bypassed.  Please see https://community.freescale.com/message/417495#416126 above. If I'm misunderstanding please point me to the specific portion of the patch that is supposed to deal with this.

I'm suspecting that your updated BT656 output patch on 2013-08-09 which includes '0003-Enhance-dual-display-support-for-BT656-output.patch' also resolves another issue I'm currently having with regards to dual display CVBS+HDMI.

As 3.10.17_1.0.0_ga is a 'ga' kernel, can you please port your patches to this kernel? Its obvious that several Freescale customers are depending on those patches.

Thanks,

Tim

3,201 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

I will create a BT656 output patch for 3.10.17_1.0.0_ga in next week.

3,201 Views
timharvey
Contributor IV

Qiang Li,

Thanks for your support!

The following may be useful for reference (these are my current patches of your work for 3.10.17)

- ipuv3: support bt656/bt1120 output · 5580cda · Gateworks/linux-imx6 · GitHub - your first-rev bt656 patch for 3.10.17 with device-tree support added

- video: mxc: add adv739x TV encoder · e748192 · Gateworks/linux-imx6 · GitHub - your first-rev adv7393 patch for 3.10.17 with device-tree support added

- ipu_disp: define BT656_IF_DI_MSB in Kconfig · 9fa30d9 · Gateworks/linux-imx6 · GitHub - Kconfig support for selecting MSB of BT656/BT1120

Regards,

Tim

0 Kudos
3,201 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Hi Tim, I had released the patch "L3.10.17_1.0.0_GA_bt656_output_patch_2014-07-21.zip" at https://community.freescale.com/docs/DOC-94019

The video playback issue with IC bypass had been fixed in it.

3,201 Views
timharvey
Contributor IV

Thanks,

I'm testing it now along with the adv7393 patch of yours that I ported to 3.10.17 (link above).


This patch does seem to resolve the IC bypass issue as well as a similar issue I encountered with mfw_isink.


I'm still having issues however with dual-display (HDMI+CVBS) due to the IPU pixel clock. Your patch moves HDMI to IPU1_DI1 so that CVBS on IPU1_DI0 can have a different clock. I see that you set the pll3_pfd1_540m clock rate and set the axi_sel parent to periph for imx6dl but you do not do this for imx6q. What is the reason this isn't done for IMX6Q?


Regards,


Tim

0 Kudos
3,201 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

In default BSP, for iMX6dl, the IPU internal clock was sourced from pll3_pfd1_540m, it is OK for 27MHz BT656 clock, but for BT1120 mode 1080i resolution, the frequency for pll3_pfd1_540m will be changed, it will impact the IPU internal clock. So I moved ipu clock to mmdc_ch0_axi clock source, this is the default setting for iMX6dq, so no modification was needed for iMX6dq.

0 Kudos