Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#8055 closed defect (invalid)

Incorrect colorspace conversion

Reported by: thx4ever Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Just do a colorspace conversion from nv12 or yuv420p to P010le colorspace

ffmpeg -c:v h264_qsv -i "C:\Users\thx4ever\Desktop\Nova pasta\1_1_video.h264" -c:v rawvideo -pix_fmt p010le C:\P010_out.yuv
ffmpeg version 4.1.git Copyright (c) 2000-2019 the FFmpeg developers
built with msvc
configuration: --enable-gpl --enable-version3 --enable-bzlib --enable-iconv --enable-lzma --enable-sdl2 --enable-zlib --enable-avisynth --enable-libmp3lame --enable-libvorbis --enable-libspeex --enable-libopus --enable-libilbc --enable-libtheora --enable-libx264 --enable-libx265 --enable-libxvid --enable-libvpx --enable-libgme --enable-libmodplug --enable-libsoxr --enable-libfreetype --enable-fontconfig --enable-libfribidi --enable-libass --enable-libxml2 --enable-gnutls --disable-schannel --enable-gcrypt --enable-libssh --enable-libcdio --enable-libbluray --enable-opengl --enable-libmfx --enable-ffnvcodec --enable-cuda --enable-amf --toolchain=msvc
libavutil 56. 30.100 / 56. 30.100
libavcodec 58. 53.101 / 58. 53.101
libavformat 58. 28.102 / 58. 28.102
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 56.101 / 7. 56.101
libswscale 5. 4.101 / 5. 4.101
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100

Attachments (4)

sample_AVC.264 (2.3 MB ) - added by thx4ever 5 years ago.
Sample_AVC_source
sample_ffmpeg_yuv_p010le_converted_5_frames.7z (1.9 MB ) - added by thx4ever 5 years ago.
5 frames sample converted from sample_AVC to P010le using ffmpeg
garbage_created_by_ffmpeg.png (123.7 KB ) - added by thx4ever 5 years ago.
sample_YUV_intel10bits(P010LE).7z (1.9 MB ) - added by thx4ever 5 years ago.
sample(YUV-P010LE)_from_intel_media_sdk_sample_decode

Change History (10)

by thx4ever, 5 years ago

Attachment: sample_AVC.264 added

Sample_AVC_source

by thx4ever, 5 years ago

5 frames sample converted from sample_AVC to P010le using ffmpeg

by thx4ever, 5 years ago

comment:1 by Hendrik, 5 years ago

What makes you think that YUV View actually knows what P010 is and how to display it?
As far as I can tell, P010 output looks fine to me.

by thx4ever, 5 years ago

sample(YUV-P010LE)_from_intel_media_sdk_sample_decode

comment:2 by thx4ever, 5 years ago

Check my latest added yuv file that was converted from sample_AVC to P010LE yuv from Intel Media SDK sample_decode
I can confirm that the latest yuv i added from intel media sdk Works fine to convert using ffmpeg to HEVC 10bit or H264 10bit
Also ffmpeg has a bug when encoding HEVC using Intel HEVC Software, it Always set internally the stream to 1280x736 from 1280x720, that looks bad on my HDTV, it show a green bar at botton, i dont have this problem in Intel Media SDK sample_multi_transcode, it correctly encode internally 1280x720 and ffmpeg encode has 1280x736

comment:3 by Carl Eugen Hoyos, 5 years ago

Priority: importantnormal
Resolution: invalid
Status: newclosed

This has currently no similarities with a valid ticket.
If you only want to report that FFmpeg uses a name for a pix_fmt that you consider unclear: We will not change it.

comment:4 by thx4ever, 5 years ago

Resolution: invalid
Status: closedreopened

I think i was unclear, what i want is convert 8bit vídeo to 10bit colorspace

comment:5 by Carl Eugen Hoyos, 5 years ago

Resolution: invalid
Status: reopenedclosed

comment:6 by Balling, 4 years ago

What? YUView? Why?? Just use ffplay.

Yeah, there should have been some bug in media_sdk_sample_decode, because if you will try your command, and will then ffplay p010 file with:

ffplay -video_size 1280x720 -pixel_format p010le -f rawvideo -i P010_out.yuv

it will play fine (except that it defaults to BT.709 matrix with sRGB primaries, as no metadata in the yuv file, but it is correct!! the avc bitstream will have the same values).

On the other hand AFAIK my old CPU does not have modern QSV stuff. I am not sure. In that case just omit -c:v h264_qsv or add instead -hwaccel cuda.

what i want is convert 8bit vídeo to 10bit colorspace

Please, do not do this. You will propagate quantization errors further in 10 bit file.

Last edited 3 years ago by Balling (previous) (diff)
Note: See TracTickets for help on using tickets.