Re: [FFmpeg-devel] [PATCH] nut: Add PAL8 support

2016-02-09 Thread Mats Peterson

On 02/09/2016 07:27 PM, Michael Niedermayer wrote:

Signed-off-by: Michael Niedermayer 
---
  libavcodec/raw.c|1 +
  libavformat/nut.c   |2 ++
  tests/ref/fate/filter-pixfmts-copy  |2 +-
  tests/ref/fate/filter-pixfmts-crop  |2 +-
  tests/ref/fate/filter-pixfmts-field |2 +-
  tests/ref/fate/filter-pixfmts-hflip |2 +-
  tests/ref/fate/filter-pixfmts-null  |2 +-
  tests/ref/fate/filter-pixfmts-scale |2 +-
  tests/ref/fate/filter-pixfmts-vflip |2 +-
  9 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/libavcodec/raw.c b/libavcodec/raw.c
index 4f7417a..bfa2537 100644
--- a/libavcodec/raw.c
+++ b/libavcodec/raw.c
@@ -154,6 +154,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = {
  { AV_PIX_FMT_YUVA422P,MKTAG('Y', '4', 10 ,  8 ) },
  { AV_PIX_FMT_YUVA444P,MKTAG('Y', '4',  0 ,  8 ) },
  { AV_PIX_FMT_YA8, MKTAG('Y', '2',  0 ,  8 ) },
+{ AV_PIX_FMT_PAL8,MKTAG('P', 'A', 'L',  8 ) },

  { AV_PIX_FMT_YUVA420P9LE,  MKTAG('Y', '4', 11 ,  9 ) },
  { AV_PIX_FMT_YUVA420P9BE,  MKTAG( 9 , 11 , '4', 'Y') },
diff --git a/libavformat/nut.c b/libavformat/nut.c
index 7d5f1ba..f4901e6 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -168,6 +168,8 @@ const AVCodecTag ff_nut_video_tags[] = {
  { AV_CODEC_ID_RAWVIDEO, MKTAG('X', 'Y', 'Z' , 36 ) },
  { AV_CODEC_ID_RAWVIDEO, MKTAG(36 , 'Z' , 'Y', 'X') },

+{ AV_CODEC_ID_RAWVIDEO, MKTAG('P', 'A', 'L', 8 ) },
+
  { AV_CODEC_ID_RAWVIDEO, MKTAG(0xBA, 'B', 'G', 8   ) },
  { AV_CODEC_ID_RAWVIDEO, MKTAG(0xBA, 'B', 'G', 16  ) },
  { AV_CODEC_ID_RAWVIDEO, MKTAG(16  , 'G', 'B', 0xBA) },
diff --git a/tests/ref/fate/filter-pixfmts-copy 
b/tests/ref/fate/filter-pixfmts-copy
index ead7290..7bab4b8 100644
--- a/tests/ref/fate/filter-pixfmts-copy
+++ b/tests/ref/fate/filter-pixfmts-copy
@@ -35,7 +35,7 @@ monob   a6869bab4f6e64fe13dcab13b41775b3
  monow   0404328f1838a6503371478a559ca20d
  nv128e24feb2c544dc26a20047a71e4c27aa
  nv21335d85c9af6110f26ae9e187a82ed2cf
-pal8d9a58fa1964ba9a3b902797b0b1af0ab
+pal8ff5929f5b42075793b2c34cb441bede5
  rgb00de71e5a1f97f81fb51397a0435bfa72
  rgb24   f4438057d046e6d98ade4e45294b21be
  rgb444be115e5259b91f4a416546b09570347633
diff --git a/tests/ref/fate/filter-pixfmts-crop 
b/tests/ref/fate/filter-pixfmts-crop
index a930323..0b54641 100644
--- a/tests/ref/fate/filter-pixfmts-crop
+++ b/tests/ref/fate/filter-pixfmts-crop
@@ -33,7 +33,7 @@ gray16be38f599da990224de86e3dc7a543121a9
  gray16le9ff7c866bd98def4e6c91542c1c45f80
  nv1292cda427f794374731ec0321ee00caac
  nv211bcfc197f4fb95de85ba58182d8d2f69
-pal8c89abc9660914b2e6c2e6f8c29e86503
+pal81f2cdc8e718f95c875dbc1034a688bfb
  rgb0736646b70dd9a0be22b8da8041e35035
  rgb24   c5fbbf816bb2000f4d2914e335698ef5
  rgb444be44a33306889f7fa1a71ec831b860fd0a
diff --git a/tests/ref/fate/filter-pixfmts-field 
b/tests/ref/fate/filter-pixfmts-field
index e3df496..e599571 100644
--- a/tests/ref/fate/filter-pixfmts-field
+++ b/tests/ref/fate/filter-pixfmts-field
@@ -35,7 +35,7 @@ monob   599b938a6207de81bd96c902c2511676
  monow   8486b94cd7c498b0effd33cb7e8e63df
  nv1216f7a46708ef25ebd0b72e47920cc11e
  nv217294574037cc7f9373ef5695d8ebe809
-pal8379b8c80f4422a353ad286f7120f2fb6
+pal80658c18dcd8d052d59dfbe23f5b368d9
  rgb0ca3fa6e865b91b3511c7f2bf62830059
  rgb24   25ab271e26a5785be169578d99da5dd0
  rgb444bea05fabc91e485ec02461be900cd72ef3
diff --git a/tests/ref/fate/filter-pixfmts-hflip 
b/tests/ref/fate/filter-pixfmts-hflip
index bd1481a..98c165b 100644
--- a/tests/ref/fate/filter-pixfmts-hflip
+++ b/tests/ref/fate/filter-pixfmts-hflip
@@ -33,7 +33,7 @@ gray16becf7294d9aa23e1b838692ec01ade587b
  gray16led91ce41e304419bcf32ac792f01bd64f
  nv12801e58f1be5fd0b5bc4bf007c604b0b4
  nv219f10dfff8963dc327d3395af21f0554f
-pal8cfe90d91bea5172babd97c3828270ea5
+pal85b7c77d99817b4f52339742a47de7797
  rgb00092452f37d73da20193265ace0b7d57
  rgb24   21571104e6091a689feabb7867e513dd
  rgb444be38d6d0e9aa15ce95f3fffcde8437632d
diff --git a/tests/ref/fate/filter-pixfmts-null 
b/tests/ref/fate/filter-pixfmts-null
index ead7290..7bab4b8 100644
--- a/tests/ref/fate/filter-pixfmts-null
+++ b/tests/ref/fate/filter-pixfmts-null
@@ -35,7 +35,7 @@ monob   a6869bab4f6e64fe13dcab13b41775b3
  monow   0404328f1838a6503371478a559ca20d
  nv128e24feb2c544dc26a20047a71e4c27aa
  nv21

Re: [FFmpeg-devel] [PATCH] nut: Add PAL8 support

2016-02-09 Thread Mats Peterson

On 02/09/2016 08:35 PM, Mats Peterson wrote:

On 02/09/2016 08:23 PM, Mats Peterson wrote:


Wonderful, Michael.

Mats


But there is no provision for storing the proper palette yet, as far as
I can see. Correct me if I'm wrong.



And as far as I know, neither writing AVI or QuickTime will include the 
palette. That has to be fixed at some point as well


Mats

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] nut: Add PAL8 support

2016-02-09 Thread Michael Niedermayer
On Tue, Feb 09, 2016 at 08:35:07PM +0100, Mats Peterson wrote:
> On 02/09/2016 08:23 PM, Mats Peterson wrote:
> 
> >Wonderful, Michael.
> >
> >Mats
> 
> But there is no provision for storing the proper palette yet, as far
> as I can see. Correct me if I'm wrong.

ive tried both converting to pal8 nut from yuv420p as well as storing
rawvideo nut pal8 from a actual pal8 source, both worked

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] nut: Add PAL8 support

2016-02-09 Thread Mats Peterson

On 02/09/2016 09:01 PM, Michael Niedermayer wrote:

On Tue, Feb 09, 2016 at 08:35:07PM +0100, Mats Peterson wrote:

On 02/09/2016 08:23 PM, Mats Peterson wrote:


Wonderful, Michael.

Mats


But there is no provision for storing the proper palette yet, as far
as I can see. Correct me if I'm wrong.


ive tried both converting to pal8 nut from yuv420p as well as storing
rawvideo nut pal8 from a actual pal8 source, both worked

I'm currently compiling here, so I can't tell yet... Anyway, AVI stores 
the palette in the output file, but only when using "-vcodec copy". 
QuickTime doesn't store any palette whatsoever. Just a parenthesis.


Mats

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] nut: Add PAL8 support

2016-02-09 Thread Mats Peterson

On 02/09/2016 09:06 PM, Mats Peterson wrote:

On 02/09/2016 09:03 PM, Mats Peterson wrote:

I'm currently compiling here, so I can't tell yet... Anyway, AVI stores
the palette in the output file, but only when using "-vcodec copy".
QuickTime doesn't store any palette whatsoever. Just a parenthesis.



Yes, Michael, nut works just fine, and it includes the palette alright.
I'll update my little patch at one place to use 'P','A','L',8 rather
than 'P','A','L','8'.



No, it doesn't work after all. At first I used "ffmpeg -i in.avi 
out.nut", that is of course not enough to use rawvideo. When using 
"ffmpeg -i in.avi -vcodec rawvideo out.nut", the palette won't be included.


Mats

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] nut: Add PAL8 support

2016-02-09 Thread Mats Peterson

On 02/09/2016 09:03 PM, Mats Peterson wrote:

I'm currently compiling here, so I can't tell yet... Anyway, AVI stores
the palette in the output file, but only when using "-vcodec copy".
QuickTime doesn't store any palette whatsoever. Just a parenthesis.



Yes, Michael, nut works just fine, and it includes the palette alright. 
I'll update my little patch at one place to use 'P','A','L',8 rather 
than 'P','A','L','8'.


Mats

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] nut: Add PAL8 support

2016-02-09 Thread Michael Niedermayer
On Tue, Feb 09, 2016 at 09:09:18PM +0100, Mats Peterson wrote:
> On 02/09/2016 09:06 PM, Mats Peterson wrote:
> >On 02/09/2016 09:03 PM, Mats Peterson wrote:
> >>I'm currently compiling here, so I can't tell yet... Anyway, AVI stores
> >>the palette in the output file, but only when using "-vcodec copy".
> >>QuickTime doesn't store any palette whatsoever. Just a parenthesis.
> >>
> >
> >Yes, Michael, nut works just fine, and it includes the palette alright.
> >I'll update my little patch at one place to use 'P','A','L',8 rather
> >than 'P','A','L','8'.
> >
> 
> No, it doesn't work after all. At first I used "ffmpeg -i in.avi
> out.nut", that is of course not enough to use rawvideo. When using
> "ffmpeg -i in.avi -vcodec rawvideo out.nut", the palette won't be
> included.

avi -> nut works here too
./ffmpeg -i fate-suite/zmbv/wc2_001-partial.avi -vcodec rawvideo test.nut


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] nut: Add PAL8 support

2016-02-09 Thread Mats Peterson

On 02/09/2016 08:23 PM, Mats Peterson wrote:


Wonderful, Michael.

Mats


But there is no provision for storing the proper palette yet, as far as 
I can see. Correct me if I'm wrong.


Mats

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] nut: Add PAL8 support

2016-02-09 Thread Mats Peterson

On 02/09/2016 09:01 PM, Michael Niedermayer wrote:

ive tried both converting to pal8 nut from yuv420p as well as storing
rawvideo nut pal8 from a actual pal8 source, both worked


Yes, it works fine. My bad. It seems nut is storing the palette at the 
end of the packet data rather than using a side data packet. When I'm 
aligning the frame, I have to copy the palette from the packet to the 
frame. A new patch is on the way don't bother about the previous ones.


Mats

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel