]> git.sesse.net Git - ffmpeg/log
ffmpeg
11 years agoidcin: set start_time and packet duration instead of manually tracking pts.
Justin Ruggles [Wed, 1 Aug 2012 20:06:23 +0000 (16:06 -0400)]
idcin: set start_time and packet duration instead of manually tracking pts.

Also, use 1 / sample_rate for audio stream time_base.

11 years agoidcin: set channel_layout
Justin Ruggles [Wed, 1 Aug 2012 19:59:12 +0000 (15:59 -0400)]
idcin: set channel_layout

11 years agoidcin: fix check for presence of an audio stream
Justin Ruggles [Wed, 1 Aug 2012 19:57:31 +0000 (15:57 -0400)]
idcin: fix check for presence of an audio stream

11 years agoidcin: validate header parameters
Justin Ruggles [Wed, 1 Aug 2012 19:53:20 +0000 (15:53 -0400)]
idcin: validate header parameters

Avoids using unsupported parameters and signed integer overflows.

11 years agoidcinvideo: correctly set AVFrame defaults
Justin Ruggles [Wed, 1 Aug 2012 19:46:08 +0000 (15:46 -0400)]
idcinvideo: correctly set AVFrame defaults

11 years agoyadif: Port inline assembly to yasm
Daniel Kang [Wed, 9 Jan 2013 15:34:46 +0000 (09:34 -0600)]
yadif: Port inline assembly to yasm

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agoau: remove unnecessary casts
Justin Ruggles [Sun, 23 Dec 2012 20:09:37 +0000 (15:09 -0500)]
au: remove unnecessary casts

11 years agoau: return AVERROR codes instead of -1
Justin Ruggles [Sun, 23 Dec 2012 20:06:46 +0000 (15:06 -0500)]
au: return AVERROR codes instead of -1

11 years agoau: cosmetics: pretty-print and remove pointless comments
Justin Ruggles [Sun, 23 Dec 2012 20:03:08 +0000 (15:03 -0500)]
au: cosmetics: pretty-print and remove pointless comments

11 years agoau: use ff_raw_write_packet()
Justin Ruggles [Sun, 23 Dec 2012 19:14:38 +0000 (14:14 -0500)]
au: use ff_raw_write_packet()

11 years agoau: set stream start time and packet durations
Justin Ruggles [Sun, 23 Dec 2012 19:12:28 +0000 (14:12 -0500)]
au: set stream start time and packet durations

11 years agoau: use %u when printing id and channels since they are unsigned
Justin Ruggles [Sun, 23 Dec 2012 18:39:47 +0000 (13:39 -0500)]
au: use %u when printing id and channels since they are unsigned

11 years agoau: validate sample rate
Justin Ruggles [Sun, 23 Dec 2012 18:39:31 +0000 (13:39 -0500)]
au: validate sample rate

11 years agoau: move skipping of unused data to before parameter validation
Justin Ruggles [Sun, 23 Dec 2012 18:33:33 +0000 (13:33 -0500)]
au: move skipping of unused data to before parameter validation

Also do not unnecessarily skip 0 bytes.

11 years agoau: do not arbitrarily limit channel count
Justin Ruggles [Sun, 23 Dec 2012 18:26:44 +0000 (13:26 -0500)]
au: do not arbitrarily limit channel count

Nothing in the AU specification sets a limit on channel count.
We only need to avoid an overflow in the packet size calculation.

11 years agoau: do not set pkt->size directly
Justin Ruggles [Sun, 23 Dec 2012 18:21:27 +0000 (13:21 -0500)]
au: do not set pkt->size directly

It is already set by av_get_packet() even for partial reads.

11 years agoau: set block_align and use it in au_read_packet()
Justin Ruggles [Sun, 23 Dec 2012 18:20:59 +0000 (13:20 -0500)]
au: set block_align and use it in au_read_packet()

11 years agoau: set bit rate
Justin Ruggles [Sun, 23 Dec 2012 18:19:31 +0000 (13:19 -0500)]
au: set bit rate

11 years agoau: validate bits-per-sample separately from codec tag
Justin Ruggles [Sun, 23 Dec 2012 18:17:05 +0000 (13:17 -0500)]
au: validate bits-per-sample separately from codec tag

11 years agortpdec_vp8: Mark broken packets with AV_PKT_FLAG_CORRUPT
Martin Storsjö [Tue, 8 Jan 2013 21:21:15 +0000 (23:21 +0200)]
rtpdec_vp8: Mark broken packets with AV_PKT_FLAG_CORRUPT

This allows the caller to either include them (and get more packets
decoded, but possibly some nonperfect frames), or discard them (by
setting fflags=discardcorrupt).

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoxan: Convert to bytestream2
Alexandra Khirnova [Tue, 8 Jan 2013 20:47:20 +0000 (21:47 +0100)]
xan: Convert to bytestream2

Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years agooggenc: add a page_duration option and deprecate the pagesize option
Justin Ruggles [Sun, 30 Dec 2012 22:00:00 +0000 (17:00 -0500)]
oggenc: add a page_duration option and deprecate the pagesize option

This uses page duration instead of byte size to determine when to buffer
the page. Also, it tries to avoid continued pages by buffering the current
page if there are already packets in the page and adding the next packet
would require it to be continued on a new page. This can improve seeking
performance.

The default page duration is 1 second, which is much saner than filling
all page segments by default.

11 years agox86: lavr: add SSE2/AVX dither_int_to_float()
Justin Ruggles [Wed, 31 Oct 2012 19:40:12 +0000 (15:40 -0400)]
x86: lavr: add SSE2/AVX dither_int_to_float()

11 years agox86: lavr: add SSE2 quantize() for dithering
Justin Ruggles [Wed, 31 Oct 2012 19:40:12 +0000 (15:40 -0400)]
x86: lavr: add SSE2 quantize() for dithering

11 years agodoc/APIchanges: fill in missing dates and hashes.
Justin Ruggles [Tue, 8 Jan 2013 03:04:30 +0000 (22:04 -0500)]
doc/APIchanges: fill in missing dates and hashes.

11 years agortpdec_vp8: Request a keyframe if RTP packets are lost
Martin Storsjö [Tue, 11 Dec 2012 14:03:33 +0000 (16:03 +0200)]
rtpdec_vp8: Request a keyframe if RTP packets are lost

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agortpdec: Support sending RTCP feedback packets
Martin Storsjö [Tue, 11 Dec 2012 13:59:24 +0000 (15:59 +0200)]
rtpdec: Support sending RTCP feedback packets

This sends NACK for missed packets and PLI (picture loss indication)
if a depacketizer indicates that it needs a new keyframe, according
to RFC 4585.

This is only enabled if the SDP indicated that feedback is supported
(via the AVPF or SAVPF profile names).

The feedback packets are throttled to a certain maximum interval
(currently 250 ms) to make sure the feedback packets don't eat up
too much bandwidth (which might be counterproductive). The RFC
specifies a more elaborate feedback packet scheduling.

The feedback packets are currently sent independently from normal
RTCP RR packets, which is not totally spec compliant, but works
fine in the environments I've tested it in. (RFC 5506 allows this,
but requires a SDP attribute for enabling it.)

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agortpdec: Store the dynamic payload handler in the rtpdec context
Martin Storsjö [Tue, 11 Dec 2012 13:52:18 +0000 (15:52 +0200)]
rtpdec: Store the dynamic payload handler in the rtpdec context

This allows calling other dynamic payload handler functions if
needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agortpdec_vp8: Avoid a warning about a possibly unused variable
Martin Storsjö [Mon, 7 Jan 2013 20:02:07 +0000 (22:02 +0200)]
rtpdec_vp8: Avoid a warning about a possibly unused variable

The warning is a false positive, but I prefer actually initializing
it over masking it with av_uninit, since the code is not performance
critical.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agortpdec_vp8: Make sure the previous packet is returned
Martin Storsjö [Mon, 7 Jan 2013 19:42:46 +0000 (21:42 +0200)]
rtpdec_vp8: Make sure the previous packet is returned

This is a bug from c7d4de3d73 - if the previous frame wasn't
returned yet (due to missing the final packets), but we have
enough data of it to return the first partition, we write that into
pkt and set returned_old_frame. That commit forgot returning 0 for
the case where this current packet didn't have the end_packet flag
set.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agortpdec_vp8: Set the timestamp when returning a deferred packet
Martin Storsjö [Mon, 7 Jan 2013 19:42:40 +0000 (21:42 +0200)]
rtpdec_vp8: Set the timestamp when returning a deferred packet

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agohlsenc: Make the start_number option set the right variable
Kanglin [Sat, 5 Jan 2013 08:50:04 +0000 (16:50 +0800)]
hlsenc: Make the start_number option set the right variable

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agortsp: Respect max_delay for the reordering queue when using custom IO
Martin Storsjö [Mon, 7 Jan 2013 19:26:59 +0000 (21:26 +0200)]
rtsp: Respect max_delay for the reordering queue when using custom IO

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agortsp: Recheck the reordering queue if getting a new packet
Martin Storsjö [Mon, 7 Jan 2013 16:39:04 +0000 (18:39 +0200)]
rtsp: Recheck the reordering queue if getting a new packet

If we timed out and consumed a packet from the reordering queue,
but didn't return a packet to the caller, recheck the queue status.
Otherwise, we could end up in an infinite loop, trying to consume
a queued packet that has already been consumed.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agolavr: log channel conversion description for any-to-any functions
Justin Ruggles [Sat, 29 Dec 2012 19:22:55 +0000 (14:22 -0500)]
lavr: log channel conversion description for any-to-any functions

11 years agolavr: mix: reduce the mixing matrix when possible
Justin Ruggles [Fri, 28 Dec 2012 21:58:55 +0000 (16:58 -0500)]
lavr: mix: reduce the mixing matrix when possible

If the matrix results in an output channel not getting a contribution
from any input channel and the corresponding input channel does not
contribute to any outputs, we can skip the channel during mixing and
silence it after mixing.

If the matrix results in an input channel not contributing to any output
channels and it is not in the output mix, or if the input channel only
contributes fully to the same output channel, we can skip the channel
during mixing.

If the matrix results in an output channel only getting full
contribution from the corresponding input channel and that input channel
does not contribute to any other output channels, we can skip the
channel during mixing.

11 years agolavr: cosmetics: reindent
Justin Ruggles [Fri, 21 Dec 2012 21:31:26 +0000 (16:31 -0500)]
lavr: cosmetics: reindent

11 years agolavr: add a public function for setting a custom channel map
Justin Ruggles [Wed, 19 Dec 2012 19:58:57 +0000 (14:58 -0500)]
lavr: add a public function for setting a custom channel map

This allows reordering, duplication, and silencing of input channels.

11 years agolavr: typedef internal structs in internal.h
Justin Ruggles [Fri, 21 Dec 2012 21:26:51 +0000 (16:26 -0500)]
lavr: typedef internal structs in internal.h

Simplifies header dependencies by not including all other internal headers
in internal.h.

11 years agodoc: Extend commit message section
Derek Buitenhuis [Sun, 6 Jan 2013 18:33:13 +0000 (13:33 -0500)]
doc: Extend commit message section

If a bug exists on the tracker, its ID should always be included
in fix messages.

Also, any relevant bug fixes should be CC'd to libav-stable, so
we can actually track what needs to be backported, instead of
just randomly combing the git history and old CVEs.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agodoc: Mention memory allocation in the fuzz testing section
Derek Buitenhuis [Sun, 6 Jan 2013 18:25:07 +0000 (13:25 -0500)]
doc: Mention memory allocation in the fuzz testing section

It's obviously undesireable to blindly allocate memory based on
a damaged 'size' value, for example.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agodoc: Mention zzuf in the fuzz testing section
Derek Buitenhuis [Sun, 6 Jan 2013 18:24:06 +0000 (13:24 -0500)]
doc: Mention zzuf in the fuzz testing section

It's pretty much the best tool for the job, and it's what we
all use now anyway.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agodoc: Merge disjointed bits about emailing patches
Derek Buitenhuis [Sun, 6 Jan 2013 18:10:27 +0000 (13:10 -0500)]
doc: Merge disjointed bits about emailing patches

We obviously prefer git-send-email(1), and the disjointed nature
of the two statements was misleading.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agodoc: Fix a few typos in the developer documentation
Derek Buitenhuis [Sun, 6 Jan 2013 18:21:18 +0000 (13:21 -0500)]
doc: Fix a few typos in the developer documentation

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agoxwma: Remove unused variable
Benjamin Larsson [Sun, 16 Sep 2012 02:09:24 +0000 (04:09 +0200)]
xwma: Remove unused variable

Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years agoasfdec: Fix printf format string length modifier
Diego Biurrun [Mon, 31 Dec 2012 10:26:17 +0000 (11:26 +0100)]
asfdec: Fix printf format string length modifier

11 years agooggdec: make sure the private parse data is cleaned up
Luca Barbato [Fri, 4 Jan 2013 15:05:51 +0000 (16:05 +0100)]
oggdec: make sure the private parse data is cleaned up

11 years agooggdec: free the ogg streams on read_header failure
Luca Barbato [Fri, 4 Jan 2013 14:44:02 +0000 (15:44 +0100)]
oggdec: free the ogg streams on read_header failure

Plug an annoying memory leak on broken files.

11 years agoDrop Snow codec
Diego Biurrun [Mon, 24 Sep 2012 15:57:14 +0000 (17:57 +0200)]
Drop Snow codec

Snow is a toy codec with no real-world use and horrible code.

11 years agoPrepare for 10_alpha1 Release
Reinhard Tartler [Sun, 6 Jan 2013 15:23:12 +0000 (16:23 +0100)]
Prepare for 10_alpha1 Release

11 years agox86: sbrdsp: Implement SSE qmf_post_shuffle
Christophe Gisquet [Sun, 25 Nov 2012 06:55:28 +0000 (07:55 +0100)]
x86: sbrdsp: Implement SSE qmf_post_shuffle

255 to 174 cycles on Arrandale / Win64. Unrolling yields no gain.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years agox86: sbrdsp: Implement SSE sum64x5
Christophe Gisquet [Sat, 24 Nov 2012 22:15:07 +0000 (23:15 +0100)]
x86: sbrdsp: Implement SSE sum64x5

698 to 174 cycles on Arrandale. Unrolling is a 6 cycles gain.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years agox86: ABS1: port to cpuflags
Diego Biurrun [Sun, 15 Jul 2012 16:11:36 +0000 (18:11 +0200)]
x86: ABS1: port to cpuflags

11 years agov210x: cosmetics, reformat
Anton Khirnov [Sat, 17 Nov 2012 14:39:18 +0000 (15:39 +0100)]
v210x: cosmetics, reformat

11 years agov210x: return meaningful error codes.
Anton Khirnov [Sat, 17 Nov 2012 14:34:17 +0000 (15:34 +0100)]
v210x: return meaningful error codes.

11 years agor210dec: return meaningful error codes.
Anton Khirnov [Sat, 17 Nov 2012 14:31:35 +0000 (15:31 +0100)]
r210dec: return meaningful error codes.

11 years agovb: cosmetics, reformat
Anton Khirnov [Sat, 17 Nov 2012 14:20:42 +0000 (15:20 +0100)]
vb: cosmetics, reformat

11 years agovb: return meaningful error codes.
Anton Khirnov [Sat, 17 Nov 2012 14:17:34 +0000 (15:17 +0100)]
vb: return meaningful error codes.

11 years agoptx: return meaningful error codes.
Anton Khirnov [Sat, 17 Nov 2012 12:46:51 +0000 (13:46 +0100)]
ptx: return meaningful error codes.

11 years agotiff: return meaningful error codes.
Anton Khirnov [Sat, 17 Nov 2012 12:40:37 +0000 (13:40 +0100)]
tiff: return meaningful error codes.

11 years agovqavideo: return meaningful error codes.
Anton Khirnov [Sat, 17 Nov 2012 07:35:45 +0000 (08:35 +0100)]
vqavideo: return meaningful error codes.

11 years agomss2: return meaningful error codes.
Anton Khirnov [Sat, 17 Nov 2012 08:04:48 +0000 (09:04 +0100)]
mss2: return meaningful error codes.

11 years agov210dec: return meaningful error codes
Anton Khirnov [Sat, 17 Nov 2012 07:14:34 +0000 (08:14 +0100)]
v210dec: return meaningful error codes

11 years agoindeo2: cosmetics, reformat
Anton Khirnov [Sat, 17 Nov 2012 07:11:30 +0000 (08:11 +0100)]
indeo2: cosmetics, reformat

11 years agoindeo2: check decoding errors.
Anton Khirnov [Sat, 17 Nov 2012 07:08:40 +0000 (08:08 +0100)]
indeo2: check decoding errors.

11 years agoindeo2: return meaningful error codes
Anton Khirnov [Sat, 17 Nov 2012 07:06:19 +0000 (08:06 +0100)]
indeo2: return meaningful error codes

11 years agorl2: cosmetics, reformat
Anton Khirnov [Sat, 17 Nov 2012 06:45:05 +0000 (07:45 +0100)]
rl2: cosmetics, reformat

11 years agorl2: use fixed-width integer types where appropriate
Anton Khirnov [Sat, 17 Nov 2012 06:40:45 +0000 (07:40 +0100)]
rl2: use fixed-width integer types where appropriate

11 years agorl2: return meaningful error codes.
Anton Khirnov [Sat, 17 Nov 2012 06:37:08 +0000 (07:37 +0100)]
rl2: return meaningful error codes.

11 years agocljr: return a meaningful error code.
Anton Khirnov [Sat, 17 Nov 2012 06:32:09 +0000 (07:32 +0100)]
cljr: return a meaningful error code.

11 years agofraps: cosmetics, reformat
Anton Khirnov [Sat, 17 Nov 2012 06:06:01 +0000 (07:06 +0100)]
fraps: cosmetics, reformat

11 years agofraps: return meaningful error codes.
Anton Khirnov [Sat, 17 Nov 2012 05:57:27 +0000 (06:57 +0100)]
fraps: return meaningful error codes.

11 years agokgv1dec: return meaningful error codes.
Anton Khirnov [Fri, 16 Nov 2012 21:40:36 +0000 (22:40 +0100)]
kgv1dec: return meaningful error codes.

11 years agokmvc: return meaningful error codes.
Anton Khirnov [Fri, 16 Nov 2012 21:36:10 +0000 (22:36 +0100)]
kmvc: return meaningful error codes.

11 years agownv1: return meaningful error codes.
Anton Khirnov [Fri, 16 Nov 2012 17:35:31 +0000 (18:35 +0100)]
wnv1: return meaningful error codes.

11 years agodpx: return meaningful error codes.
Anton Khirnov [Fri, 16 Nov 2012 17:24:55 +0000 (18:24 +0100)]
dpx: return meaningful error codes.

11 years agotruemotion1: return meaningful error codes
Anton Khirnov [Fri, 16 Nov 2012 14:25:32 +0000 (15:25 +0100)]
truemotion1: return meaningful error codes

11 years agopnm: return meaningful error codes.
Anton Khirnov [Fri, 16 Nov 2012 10:45:34 +0000 (11:45 +0100)]
pnm: return meaningful error codes.

11 years agoxl: return a meaningful error code.
Anton Khirnov [Fri, 16 Nov 2012 10:32:09 +0000 (11:32 +0100)]
xl: return a meaningful error code.

11 years agoxan: return a meaningful error code.
Anton Khirnov [Fri, 16 Nov 2012 05:36:15 +0000 (06:36 +0100)]
xan: return a meaningful error code.

11 years agoxxan: return meaningful error codes.
Anton Khirnov [Fri, 16 Nov 2012 05:31:39 +0000 (06:31 +0100)]
xxan: return meaningful error codes.

11 years agozmbv: return more meaningful error codes.
Anton Khirnov [Thu, 15 Nov 2012 17:18:12 +0000 (18:18 +0100)]
zmbv: return more meaningful error codes.

11 years agoyop: use a meaningful error code.
Anton Khirnov [Thu, 15 Nov 2012 19:49:17 +0000 (20:49 +0100)]
yop: use a meaningful error code.

11 years agoc93: return meaningful error codes.
Anton Khirnov [Thu, 15 Nov 2012 09:29:28 +0000 (10:29 +0100)]
c93: return meaningful error codes.

11 years agobmv: return meaningful error codes.
Anton Khirnov [Thu, 15 Nov 2012 09:10:13 +0000 (10:10 +0100)]
bmv: return meaningful error codes.

11 years agobmp: return meaningful error codes.
Anton Khirnov [Thu, 15 Nov 2012 08:26:36 +0000 (09:26 +0100)]
bmp: return meaningful error codes.

11 years agobink: operate with pointers to AVFrames instead of whole structs.
Anton Khirnov [Wed, 14 Nov 2012 07:23:11 +0000 (08:23 +0100)]
bink: operate with pointers to AVFrames instead of whole structs.

This is more correct and avoids breaking extended_data.

11 years agobink: return meaningful error codes.
Anton Khirnov [Wed, 14 Nov 2012 20:47:37 +0000 (21:47 +0100)]
bink: return meaningful error codes.

11 years agobfi: return meaningful error codes.
Anton Khirnov [Wed, 14 Nov 2012 15:09:39 +0000 (16:09 +0100)]
bfi: return meaningful error codes.

11 years agobethsoftvideo: return meaningful error codes.
Anton Khirnov [Wed, 14 Nov 2012 15:09:39 +0000 (16:09 +0100)]
bethsoftvideo: return meaningful error codes.

11 years agoavs: return meaningful error codes.
Anton Khirnov [Wed, 14 Nov 2012 15:09:39 +0000 (16:09 +0100)]
avs: return meaningful error codes.

11 years agoaura: return meaningful error codes.
Anton Khirnov [Wed, 14 Nov 2012 14:11:23 +0000 (15:11 +0100)]
aura: return meaningful error codes.

11 years agoasvdec: return meaningful error codes.
Anton Khirnov [Wed, 14 Nov 2012 13:59:40 +0000 (14:59 +0100)]
asvdec: return meaningful error codes.

11 years agoansi: return a meaningful error code
Anton Khirnov [Wed, 14 Nov 2012 13:29:53 +0000 (14:29 +0100)]
ansi: return a meaningful error code

11 years agoanm: return meaningful error codes
Anton Khirnov [Wed, 14 Nov 2012 13:01:50 +0000 (14:01 +0100)]
anm: return meaningful error codes

11 years agoaasc: return meaningful error codes.
Anton Khirnov [Wed, 14 Nov 2012 08:11:07 +0000 (09:11 +0100)]
aasc: return meaningful error codes.

11 years ago8bps: return meaningful error codes.
Anton Khirnov [Wed, 14 Nov 2012 07:59:03 +0000 (08:59 +0100)]
8bps: return meaningful error codes.

11 years ago4xm: operate with pointers to AVFrames instead of whole structs.
Anton Khirnov [Wed, 14 Nov 2012 07:23:11 +0000 (08:23 +0100)]
4xm: operate with pointers to AVFrames instead of whole structs.

This is more correct and avoids breaking extended_data.

11 years ago4xm: eliminate a pointless indirection
Anton Khirnov [Wed, 14 Nov 2012 07:09:01 +0000 (08:09 +0100)]
4xm: eliminate a pointless indirection

11 years ago4xm: simplify code with FFSWAP
Anton Khirnov [Tue, 13 Nov 2012 20:57:13 +0000 (21:57 +0100)]
4xm: simplify code with FFSWAP