bbudge@, please review this change to add software VP8 encoder support to PPB_VideoEncoder. sievers@, just ...
5 years, 10 months ago
(2015-02-25 12:30:38 UTC)
#2
bbudge@, please review this change to add software VP8 encoder support to
PPB_VideoEncoder.
sievers@, just need an owner for build system stuff, but feel free to comment on
the entire CL.
Thanks!
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/pepper_video_encoder_host.cc File content/renderer/pepper/pepper_video_encoder_host.cc (right): https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/pepper_video_encoder_host.cc#newcode169 content/renderer/pepper/pepper_video_encoder_host.cc:169: PP_HardwareAcceleration demand) { Now that we know how merging ...
5 years, 9 months ago
(2015-03-02 20:01:07 UTC)
#5
I also added modification to the example to allow the user to select the desired ...
5 years, 9 months ago
(2015-03-03 15:23:28 UTC)
#6
I also added modification to the example to allow the user to select the desired
profile.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
File content/renderer/pepper/pepper_video_encoder_host.cc (right):
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/pepper_video_encoder_host.cc:169:
PP_HardwareAcceleration demand) {
On 2015/03/02 20:01:06, bbudge wrote:
> Now that we know how merging supported profiles will work with software
> fallback, we should fix the supported profile struct to use PP_Bool for
hardware
> / software rather than the enum. If you prefer to do this in another CL, leave
a
> TODO here to fix this.
Leaving this for another CL.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
File content/renderer/pepper/video_encoder_shim.cc (right):
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:23: const int32_t kMaxHeight =
1080;
On 2015/03/02 20:01:06, bbudge wrote:
> Needs a comment explaining these constants.
Done.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:42: struct Frame {
On 2015/03/02 20:01:06, bbudge wrote:
> Suggestion: s/Frame/PendingEncode
> So you don't have frame.frame below.
Done.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:63:
scoped_refptr<base::SingleThreadTaskRunner> shim_task_runner_;
On 2015/03/02 20:01:06, bbudge wrote:
> Name suggestion: task_runner_ or media_task_runner_. This isn't really
specific
> to the shim.
Done.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:71: const
base::WeakPtr<VideoEncoderShim>& proxy)
On 2015/03/02 20:01:06, bbudge wrote:
> s/proxy/shim
> And above in class decl.
Done.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:86: 3; //
media::cast::Vp8Encoder::kNumberOfVp8VideoBuffers;
On 2015/03/02 20:01:06, bbudge wrote:
> This comment confused me, since it refers to a private enum value. It would be
> better to refer the reader to the comments on the
media::cast::VideoSenderConfig
> struct. Looking at the actual source in vp8_encoder.cc, I don't think it holds
> more than 1 video frame at a time, so you could return 1 to the shim below.
> Perhaps defining some constants at the top of this file and commenting them
> would help here.
Done.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:94: 3, input_visible_size, 4 *
1000000));
On 2015/03/02 20:01:06, bbudge wrote:
> 4 * 1000000 should be a constant with a comment.
Done.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:125: return;
On 2015/03/02 20:01:06, bbudge wrote:
> I don't think you need this 'if' - the 'while' handles this case too.
Done.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:136: encoder_->Encode(frame.frame,
base::TimeTicks::Now(), encoded_frame.get());
On 2015/03/02 20:01:06, bbudge wrote:
> nit: .get() isn't necessary.
That doesn't compile on GCC : no known conversion for argument 3 from
'scoped_ptr<media::cast::EncodedFrame>' to 'media::cast::EncodedFrame*
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:150: // freed on the right thread.
On 2015/03/02 20:01:06, bbudge wrote:
> comment formatting is a little weird. Maybe put it above the PostTask call?
Done.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:156: // VideoEncoderShim :
On 2015/03/02 20:01:06, bbudge wrote:
> nit: remove
Done.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:178: // TODO(llandwerlin): find
correct values from libvpx.
On 2015/03/02 20:01:06, bbudge wrote:
> Move TODO to definitions at top of file.
Done.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:197: return false;
On 2015/03/02 20:01:06, bbudge wrote:
> Is it possible that other formats could work? I see that vp8_encoder.cc sets
> this format.
Looking at the VPX code, it depends on the codec and profile.
VP8 only accepts I420 and YV12.
VP9 always accepts I420 and YV12 and for some profiles, I422/I444/I440.
I put I420 as a restriction because it seems to be the norm all over the
chromium code base (from the capture to the encoders).
I avoided using libvpx directly because it's been used in several other places
through the chromium code base. Do you think it would make sense to drop the
usage of media/cast/sender/ and directly rely on libvpx?
I think this would give us VP9 support.
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:202: return false;
On 2015/03/02 20:01:06, bbudge wrote:
> Is this input validation needed? Doesn't the host check against invalid
> profiles?
> (Except for the I420 check.)
Fair, removing.
bbudge
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/video_encoder_shim.cc File content/renderer/pepper/video_encoder_shim.cc (right): https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/video_encoder_shim.cc#newcode197 content/renderer/pepper/video_encoder_shim.cc:197: return false; On 2015/03/03 15:23:28, llandwerlin wrote: > On ...
5 years, 9 months ago
(2015-03-05 01:43:59 UTC)
#7
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
File content/renderer/pepper/video_encoder_shim.cc (right):
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
content/renderer/pepper/video_encoder_shim.cc:197: return false;
On 2015/03/03 15:23:28, llandwerlin wrote:
> On 2015/03/02 20:01:06, bbudge wrote:
> > Is it possible that other formats could work? I see that vp8_encoder.cc sets
> > this format.
>
> Looking at the VPX code, it depends on the codec and profile.
> VP8 only accepts I420 and YV12.
> VP9 always accepts I420 and YV12 and for some profiles, I422/I444/I440.
>
> I put I420 as a restriction because it seems to be the norm all over the
> chromium code base (from the capture to the encoders).
>
> I avoided using libvpx directly because it's been used in several other places
> through the chromium code base. Do you think it would make sense to drop the
> usage of media/cast/sender/ and directly rely on libvpx?
> I think this would give us VP9 support.
It would be nice to have more profiles. I don't know much about the video stack,
so I'm going to ask those folks what approach they recommend.
5 years, 9 months ago
(2015-03-10 11:07:26 UTC)
#8
On 2015/03/05 01:43:59, bbudge wrote:
>
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
> File content/renderer/pepper/video_encoder_shim.cc (right):
>
>
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
> content/renderer/pepper/video_encoder_shim.cc:197: return false;
> On 2015/03/03 15:23:28, llandwerlin wrote:
> > On 2015/03/02 20:01:06, bbudge wrote:
> > > Is it possible that other formats could work? I see that vp8_encoder.cc
sets
> > > this format.
> >
> > Looking at the VPX code, it depends on the codec and profile.
> > VP8 only accepts I420 and YV12.
> > VP9 always accepts I420 and YV12 and for some profiles, I422/I444/I440.
> >
> > I put I420 as a restriction because it seems to be the norm all over the
> > chromium code base (from the capture to the encoders).
> >
> > I avoided using libvpx directly because it's been used in several other
places
> > through the chromium code base. Do you think it would make sense to drop the
> > usage of media/cast/sender/ and directly rely on libvpx?
> > I think this would give us VP9 support.
>
> It would be nice to have more profiles. I don't know much about the video
stack,
> so I'm going to ask those folks what approach they recommend.
Any news?
bbudge
On 2015/03/10 11:07:26, llandwerlin wrote: > On 2015/03/05 01:43:59, bbudge wrote: > > > https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/video_encoder_shim.cc ...
5 years, 9 months ago
(2015-03-11 13:28:39 UTC)
#9
On 2015/03/10 11:07:26, llandwerlin wrote:
> On 2015/03/05 01:43:59, bbudge wrote:
> >
>
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
> > File content/renderer/pepper/video_encoder_shim.cc (right):
> >
> >
>
https://codereview.chromium.org/956893002/diff/20001/content/renderer/pepper/...
> > content/renderer/pepper/video_encoder_shim.cc:197: return false;
> > On 2015/03/03 15:23:28, llandwerlin wrote:
> > > On 2015/03/02 20:01:06, bbudge wrote:
> > > > Is it possible that other formats could work? I see that vp8_encoder.cc
> sets
> > > > this format.
> > >
> > > Looking at the VPX code, it depends on the codec and profile.
> > > VP8 only accepts I420 and YV12.
> > > VP9 always accepts I420 and YV12 and for some profiles, I422/I444/I440.
> > >
> > > I put I420 as a restriction because it seems to be the norm all over the
> > > chromium code base (from the capture to the encoders).
> > >
> > > I avoided using libvpx directly because it's been used in several other
> places
> > > through the chromium code base. Do you think it would make sense to drop
the
> > > usage of media/cast/sender/ and directly rely on libvpx?
> > > I think this would give us VP9 support.
> >
> > It would be nice to have more profiles. I don't know much about the video
> stack,
> > so I'm going to ask those folks what approach they recommend.
>
> Any news?
Not yet, I'll ping them.
bbudge
Since we're not getting much guidance, let's land this with VP8 support only. I made ...
5 years, 9 months ago
(2015-03-16 18:27:48 UTC)
#10
Issue 956893002: content: pepper: VideoEncoder: add software encoder support
(Closed)
Created 5 years, 10 months ago by llandwerlin-old
Modified 5 years, 9 months ago
Reviewers: no sievers, bbudge
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 47