Граф коммитов

1231 Коммитов

Автор SHA1 Сообщение Дата
hkuang 36eeb1799d Merge "Revert "Revert 3 patches from Hangyu to get Chrome to build:"" 2014-06-25 11:42:08 -07:00
hkuang b336356198 Revert "Revert 3 patches from Hangyu to get Chrome to build:"
This patch reverts the previous revert from Jim and also add a
variable user_priv in the FrameWorker to save the user_priv
passed from the application. In the decoder_get_frame function,
the user_priv will be binded with the img. This change is needed
or it will fail the unit test added here:
https://gerrit.chromium.org/gerrit/#/c/70610/

This reverts commit 9be46e4565.

Change-Id: I376d9a12ee196faffdf3c792b59e6137c56132c1
2014-06-25 11:21:37 -07:00
James Zern b2b07755e0 vp9: check tile column count
the max is 6. there are assumptions throughout the decode regarding
this; fixes a crash with a fuzzed bitstream

$ zzuf -s 5861 -r 0.01:0.05 -b 6- \
  < vp90-2-00-quantizer-00.webm.ivf \
  | dd of=invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.ivf \
    bs=1 count=81883

Change-Id: I6af41bb34252e88bc156a4c27c80d505d45f5642
2014-06-24 19:26:11 -07:00
Jingning Han 961bafc366 Merge "Remove unused vp9_init_quant_tables function" 2014-06-23 09:37:30 -07:00
Jim Bankoski 9be46e4565 Revert 3 patches from Hangyu to get Chrome to build:
Avoids failures:
MSE_ClearKey/EncryptedMediaTest.Playback_VP9Video_WebM/0
MSE_ClearKey_Prefixed/EncryptedMediaTest.Playback_VP9Video_WebM/0
MSE_ExternalClearKey_Prefixed/EncryptedMediaTest.Playback_VP9Video_WebM/0
MSE_ExternalClearKey/EncryptedMediaTest.Playback_VP9Video_WebM/0
MSE_ExternalClearKeyDecryptOnly/EncryptedMediaTest.Playback_VP9Video_WebM/0
MSE_ExternalClearKeyDecryptOnly_Prefixed/EncryptedMediaTest.Playback_VP9Video_WebM/0
SRC_ExternalClearKey/EncryptedMediaTest.Playback_VP9Video_WebM/0
SRC_ExternalClearKey_Prefixed/EncryptedMediaTest.Playback_VP9Video_WebM/0
SRC_ClearKey_Prefixed/EncryptedMediaTest.Playback_VP9Video_WebM/0

Patches are
This reverts commit 9bc040859b
This reverts commit 6f5aba069a
This reverts commit 9bc040859b

I1f250441	Revert "Refactor the vp9_get_frame code for frame parallel."
Ibfdddce5	Revert "Delay decreasing reference count in frame-parallel decoding."
I00ce6771	Revert "Introduce FrameWorker for decoding."

Need better testing in libvpx for these commits

Change-Id: Ifa1f279b0cabf4b47c051ec26018f9301c1e130e
2014-06-21 11:36:51 -07:00
Jim Bankoski 3431f575ed Merge "Fix bug in error handling that causes segfault" 2014-06-20 16:46:31 -07:00
hkuang 9bc040859b Introduce FrameWorker for decoding.
When decoding in serial mode, there will be only
one FrameWorker doing decoding. When decoding in
parallel mode, there will be several FrameWorkers
doing decoding in parallel.

Change-Id: If53fc5c49c7a0bf5e773f1ce7008b8a62fdae257
2014-06-20 14:46:45 -07:00
Jim Bankoski 88ba08818e Fix bug in error handling that causes segfault
See: https://code.google.com/p/chromium/issues/detail?id=362697

The code properly catches an invalid stream but seg faults instead of
returning an error due to a buffer not having been initialized. This
code fixes that.

Change-Id: I695595e742cb08807e1dfb2f00bc097b3eae3a9b
2014-06-20 14:44:50 -07:00
Jingning Han 3b9c19aaa7 Remove unused vp9_init_quant_tables function
This function is not effectively used, hence removed.

Change-Id: I2e8e48fa07c7518931690f3b04bae920cb360e49
2014-06-18 11:51:41 -07:00
Adrian Grange dbd1184a5a Improve vp9_rb_bytes_read
Change-Id: I69eba120eb3d8ec43b5552451c8a9bd009390795
2014-06-18 08:31:45 -07:00
hkuang e4c5f7e2b6 Delay decreasing reference count in frame-parallel decoding.
The current decoding scheme will decrease the reference count
of the output frame when finish decoding. Then the application
could copy the frame from the decoder buffer to application buffer.
In frame-parallel decoding, a decoded frame will not be outputted
until several frames later which depends on thread numbers. So
the decoded frame's reference count should be decreased only
after application finish copying the frame out. But due to the
limitation of vpx_codec_get_frame, decoder could not know when
application finish decoding. So use a index last_show_frame to
release the last output frame's reference count.

Change-Id: I403ee0d01148ac1182e5a2d87cf7dcc302b51e63
2014-06-13 10:53:33 -07:00
hkuang 537cb06036 Initially add frame_parallel_decode flag.
Stub flag temporarily set to 0 until frame parallel
decoding implementations are finished.

Change-Id: I8ab768138e8f8f8eb809875703b2502ea0fe7cea
2014-06-11 17:29:29 -07:00
Dmitry Kovalev f5628853d7 Fixing failed ARM build.
Change-Id: I3f74418f07c2dfdd7725a5b4a8ef5c5f4aca6289
2014-06-02 11:14:12 -07:00
Dmitry Kovalev e14f900ae3 Merge "Moving itxm_add pointer from MACROBLOCKD to MACROBLOCK." 2014-05-29 11:16:39 -07:00
Dmitry Kovalev e7135a9344 Removing decoded_key_frame flag.
Change-Id: I79576920efb7f3f6f197d386727409759d8bda8d
2014-05-21 15:51:40 -07:00
hkuang 0958bbd185 Merge "Fix the memory alignment issue due to patch: https://gerrit.chromium.org/gerrit/#/c/70162/" 2014-05-21 12:12:21 -07:00
Dmitry Kovalev 35a83677a5 Moving itxm_add pointer from MACROBLOCKD to MACROBLOCK.
The final goal is eventually to get rid of both itxm_add and fwd_txm4x4.
This patch does it in the decoder.

Change-Id: Ibb3db57efbcbb1ac387c6742538a9fcf2c6f24a5
2014-05-21 11:09:44 -07:00
Dmitry Kovalev 66ce10c13d Merge "Deadline is not supported in VP9 decoder, removing it completely." 2014-05-21 10:37:39 -07:00
hkuang b9e1e994e1 Fix the memory alignment issue due to patch:
https://gerrit.chromium.org/gerrit/#/c/70162/

Change-Id: I797be6a4b21460de6d791125fc20d2be3a35364f
2014-05-21 10:08:06 -07:00
hkuang 20c1edf612 Refactor decode_tiles and loopfilter code.
The current decode_tiles decodes the frame one tile by one tile
and then loopfilter the whole frame or use another worker thread to
do loopfiltering.

|------|------|------|------|
|Tile1-|Tile2-|Tile3-|Tile4-|
|------|------|------|------|

For example, if a tile video has one row and four cols, decode_tiles
will decode the Tile1, then Tile2, then Tile3, then Tile4.
And during decode each tile, decode_tile will decode row by row in
each tile.

For frame parallel decoding, decode_tiles will decode video in row order
across the tiles. So the order will be:
"Decode 1st row of Tile1" -> "Decode 1st row of Tile2"
-> "Decode 1st row of Tile3" -> "Decode 1st row of Tile4"
-> "Decode 2nd row of Tile1" -> "Decode 2nd row of Tile2"
-> "Decode 2nd row of Tile3" -> "Decode 2nd row of Tile4"-> "loopfilter 1st row"

Change-Id: I2211f9adc6d142fbf411d491031203cb8a6dbf6b
2014-05-20 14:47:45 -07:00
Dmitry Kovalev 5ac6d9778f Merge "Making vp9_initialize_dec() static." 2014-05-19 10:27:07 -07:00
Dmitry Kovalev 79ba41903f Removing MACROBLOCKD dependency from loop filter.
Change-Id: I9ef40f3d95ab8f94f69e92ea25678a40956bc1ce
2014-05-16 09:48:26 -07:00
Yaowu Xu 04c40d3d93 cleanup -wextra warnings:
vp9_decoder.c
  vp9_dthread.c

Change-Id: Iaafe941545db98e9e3559096a955894646084ac2
2014-05-15 15:59:25 -07:00
hkuang 1fe6496b17 Merge "Refactor calling loopfilter code." 2014-05-15 10:51:10 -07:00
hkuang bf8c58be5a Refactor calling loopfilter code.
This change is mainly for a follow CL that will refactor the
decode_tiles.

Change-Id: I52de6f8dbada75a64d9a94ebb5975136ed0960b4
2014-05-15 10:21:18 -07:00
Dmitry Kovalev 39015ea200 Making vp9_initialize_dec() static.
Change-Id: I831fe91dfadf4e89f5bbba6ab7a9917d8dd2ed55
2014-05-14 16:33:00 -07:00
Yaowu Xu ed09580777 vp9_decodeframe.c: cleanup -wextra warnings
Change-Id: I0315cea6a5e58182bc2556e9825ec2ef0b1480c3
2014-05-14 09:46:11 -07:00
Dmitry Kovalev d31b836193 Deadline is not supported in VP9 decoder, removing it completely.
Change-Id: I7675f23150404913f4b457add69fb846f6921997
2014-05-13 17:35:46 -07:00
Dmitry Kovalev eecc750b33 Merge "Moving loopfilter call to vp9_decode_frame()." 2014-05-13 17:20:26 -07:00
Dmitry Kovalev ae7d3ef39f Moving loopfilter call to vp9_decode_frame().
Inline loopfilter has been already handled in vp9_decode_frame().
Collecting all similar code in one place now.

Change-Id: I358a0280fc7c2b27cca520bc1e8c16c4eb6491dd
2014-05-12 16:19:19 -07:00
Dmitry Kovalev ccfb4b920a Adding get_tile_buffers() function.
Change-Id: I910c437b80af90c50831e1fbff75842d4276a027
2014-05-12 12:49:29 -07:00
Adrian Grange 3305909bc2 Merge "Fix check of debug counts for corrupt frame" 2014-05-11 09:13:55 -07:00
Adrian Grange 99892e85d5 Fix check of debug counts for corrupt frame
Fixes the idecoder in the case where:
  cm->error_resilient_mode == 0, and
  cm->frame_parallel_decoding_mode == 0, but
  new_fb->corrupted == 1.

The assert in debug_check_frame_counts fails to
take into account the case of a corrupt frame.

Change-Id: Idf318a68458cc88d65d6f3f408a10d8ffe87e43f
2014-05-09 10:12:23 -07:00
Dmitry Kovalev 0dacecaf20 Removing VP9DecoderConfig.
We only used two members from that struct: max_threads and inv_tile_order.
Moving them directly to VP9Decoder struct.

Change-Id: If696a4e5b5b41868a55f3cc971e1d7c1dd9d5f69
2014-05-08 16:24:36 -07:00
Dmitry Kovalev 25110038f7 Merge "Using crop_{width, height} instead of {width, height}." 2014-04-30 15:01:26 -07:00
Jim Bankoski 29af017fc0 corrupted frames shouldn't affect stats
Don't update the stats if we have a corrupted frame.

Change-Id: I65a13adc50e0389b4201d3b671f0225195dfaff4
TODO: Test case that shows this problem.
2014-04-30 10:13:29 -07:00
Dmitry Kovalev 49d8bdc29b Using crop_{width, height} instead of {width, height}.
Change-Id: I6dc9741cdcd700f5c4a387f58da7feb58dd4bbda
2014-04-29 16:12:44 -07:00
Dmitry Kovalev 571c70e554 Removing WRITE_RECON_BUFFER related code.
That code is not used, we could easily return it back using vpx_img_write()
function.

Change-Id: Id107875c6feab6ad245a518f6b437b6ed4b1246d
2014-04-25 16:43:58 -07:00
Joey Parrish 18c08607e0 Add VPXD_SET_DECRYPTOR support to the VP9 decoder.
Change-Id: I88f86c8ff9af34e0b6531028b691921b54c2fc48
2014-04-23 16:11:54 -07:00
Dmitry Kovalev e608418899 Renaming MB_PREDICTION_MODE to PREDICTION_MODE.
Actually, it would be great to have two separate enums INTRA_MODES and
INTER_MODES in future.

Change-Id: I6c4147cf0002853da9c1e03fe9514eab876f01c8
2014-04-22 17:48:31 -07:00
Yaowu Xu bae205fd6a Remove an unused function
Change-Id: I0f2592ecfc5197dfb94975260cb2f862315e7895
2014-04-20 14:50:35 -07:00
Dmitry Kovalev ab3d8e6fc5 Renaming VP9D_CONFIG to VP9DecoderConfig.
Change-Id: I9677aab1c7bb0ca9e989cb21348a3a2c926d8f5a
2014-04-11 14:50:11 -07:00
Dmitry Kovalev 59fd74229e Merge "Removing unused initial_{width, height} from VP9Decoder." 2014-04-11 10:23:35 -07:00
Dmitry Kovalev b5bf64668e Merge "Cleaning up vp9_dthread.{c, h}." 2014-04-10 21:44:33 -07:00
Dmitry Kovalev 69c6671ead Cleaning up vp9_dthread.{c, h}.
Change-Id: If33087462293605f79d9281af133091fff33a876
2014-04-10 16:17:49 -07:00
Dmitry Kovalev 65e650e0c0 Merge "Revert "Converting set_prev_mi() to get_prev_mi()."" 2014-04-09 20:44:30 -07:00
Dmitry Kovalev 46a20d67cb Removing unused initial_{width, height} from VP9Decoder.
Change-Id: I039474b34863bc3db9c6cda82485c32826a1b5d1
2014-04-09 16:18:29 -07:00
Dmitry Kovalev 60def47f21 Revert "Converting set_prev_mi() to get_prev_mi()."
This reverts commit 22a3e30790

Change-Id: I460d905edf5fb2006da58c18fbe02c04d0c631bb
2014-04-09 15:23:16 -07:00
James Zern db8af0b0b3 Merge "Fix TODO typo" 2014-04-09 11:29:44 -07:00
Dmitry Kovalev 5ed83c3220 Merge "Converting set_prev_mi() to get_prev_mi()." 2014-04-09 10:27:05 -07:00